From patchwork Fri Mar 24 14:46:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Berger X-Patchwork-Id: 9643029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F110B601E9 for ; Fri, 24 Mar 2017 14:52:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E14CC2522B for ; Fri, 24 Mar 2017 14:52:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D267325F31; Fri, 24 Mar 2017 14:52:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84A832522B for ; Fri, 24 Mar 2017 14:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QKWKl+fa9H/UdrB7W/D4ur7c2h/TBzgOmkqhM8df0Iw=; b=Ca8Z/ztEGKGmyE8/gzOvsTcUEN FG8xTjCgOWWnXxnxvM4t/8fr/Zc8H6l1jP7hjXPPN+yrU8Qzkif+xCG/c9+7QBfGW+zP/rOK/lY2p d2QMOUMLAu5/1DjL9JbKGws4mlYiQTdQguEXGDAE6QRRywgYhL3+Ae06lQ0JOgb4eriKchladFc8X WbyMwJpWWIgqNRyce0mF865h+ydq8CRy1Q5U/lt+mkH2yq3W9HMUod5hsEfJCajZaWsXe9fFyZzq4 PG4aRkUiFQQysKnBu/2U9PDEJtWonnk7ZXna0lVXxBHfwnEAwaKtPQ652I1zc6nJAE72mU6Rw1cFR Hh2Mq9Gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1crQa0-0007BD-By; Fri, 24 Mar 2017 14:52:40 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crQZk-0006wE-Bg for linux-arm-kernel@bombadil.infradead.org; Fri, 24 Mar 2017 14:52:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=StSMF/qGv7lVdMedtJDttfLWvkJKTN5vaIxZiFPRr0U=; b=IWGB7UlO2t/HnY7R8t6BY0vN8 tZSrWcNHz7uTpFhzA489NCAlqxLAkzWdpdN080u1gIhDDUCmD3DlJiJk4mFyNZaiJCWmDABlk/vB9 qMK/Txg+8Xu3BT194AKKJuVDQAmWFf7BYqlB2Ov70w9kpURGmCzrBmfjMJi6FE4TY50tx1R/72TQ+ xbt319hUMVh2ndtgBiFKYzx3gpoqpc4Ak1mCsdWtLfyjChtUb4W0VIc66QHrB1o6lVmPTKRAK3hZW QNeKWzQSsG5mpVaT7X9Du7Y4bRFJXTwA2WbCdhxj4j/5a98znhiE0uGUAZuYyJyhQZ68bl6/F/BNo 6bftihUWg==; Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crQW4-0003qK-0n for linux-arm-kernel@lists.infradead.org; Fri, 24 Mar 2017 14:48:36 +0000 Received: by mail-wm0-x244.google.com with SMTP id n11so1067647wma.0 for ; Fri, 24 Mar 2017 07:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=StSMF/qGv7lVdMedtJDttfLWvkJKTN5vaIxZiFPRr0U=; b=ADxYfnVMEhpJnU4uQrBxjSqPmn9/caCcmuVgJS2PjMmo8tIJNGDgc4+Dxi8aI7A1MG GRYjE2+1u6dYLOVgyfOJbt9SEWaHhz5uGGcSpRVpXYDW/9a8k0blfGZdvR0Th/TWE7lr FmXCxpkTFXEg+dqh/zcVxgmYXSD3Lq0z5d2BLGLrM8EQZyS/G/Zwg/gmQKSUYU6BuZdw rV1fFFoSBFVTnY037iU1yv1URDv3E1f7JecsaHCPklr+4gLhMksH5adGyqIi3e8VwvJS 5qURfjPCnsbJy0H1QGKfTJWKDuI6AklYHtr6uGRc9Q2wBL29MWAeE4SA8kDENRwp7UMn ay+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=StSMF/qGv7lVdMedtJDttfLWvkJKTN5vaIxZiFPRr0U=; b=HKq2kmXF+9tL7zigkN9255e0oeeqfuQNFbZvPo1kqKKAJHIPBoN0u2nD3oxq5Cb7aO S6+ba1uDJWKTo+aZ9QsZURTdJ70++JT3vHnR2bRTvhFauiLmeo18PoovO8Dz+Lt3Csm1 +g/iJG2WL+UgC1jwm2F8/so2jdpXUcOKZEC7s0yvRirg1Gyk2XSLSb3GH8L4D3Neg2m3 JbSDlnS7VeJMcIkjO03XH0wZ1Juu/om8VsZq1/PrPSBLIoFcjiYQx2HqZARyMr3WFaDE j88IhQQ0yrTsECC7ddknOCw0/kAp08bF0iFqXzj3JVFCfq0BlACO2pRQP6n2qpBwYGIX +kbg== X-Gm-Message-State: AFeK/H0fCtpHRyyJcLTPDwFYBTr/C8jAb60EGXFJ4IStltJUR2XnyjOceyUGR6Xed0xwuw== X-Received: by 10.28.175.11 with SMTP id y11mr3320447wme.2.1490366893216; Fri, 24 Mar 2017 07:48:13 -0700 (PDT) Received: from stb-bld-02.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id k32sm3154947wre.18.2017.03.24.07.48.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 07:48:12 -0700 (PDT) From: Doug Berger To: catalin.marinas@arm.com Subject: [PATCH 7/9] bus: brcmstb_gisb: Add ARM64 support Date: Fri, 24 Mar 2017 07:46:30 -0700 Message-Id: <20170324144632.5896-8-opendmb@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324144632.5896-1-opendmb@gmail.com> References: <20170324144632.5896-1-opendmb@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170324_104836_222898_D1ABE757 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, wangkefeng.wang@huawei.com, linus.walleij@linaro.org, will.deacon@arm.com, mingo@kernel.org, panand@redhat.com, f.fainelli@gmail.com, jonathanh@nvidia.com, bgolaszewski@baylibre.com, bcm-kernel-feedback-list@broadcom.com, shijie.huang@arm.com, opendmb@gmail.com, treding@nvidia.com, devicetree@vger.kernel.org, vladimir.murzin@arm.com, cmetcalf@mellanox.com, suzuki.poulose@arm.com, andre.przywara@arm.com, robh+dt@kernel.org, gregory.0xf0@gmail.com, sandeepa.s.prabhu@gmail.com, horms+renesas@verge.net.au, linux-arm-kernel@lists.infradead.org, mirza.krak@gmail.com, linux-kernel@vger.kernel.org, james.morse@arm.com, olof@lixom.net, computersforpeace@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Florian Fainelli Hook to the ARM64 data abort exception #16: synchronous external abort, which is how the GISB errors will be funneled back to the ARM64 CPU in case of problems Signed-off-by: Florian Fainelli --- drivers/bus/Kconfig | 2 +- drivers/bus/brcmstb_gisb.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 0a52da439abf..d2a5f1184022 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -57,7 +57,7 @@ config ARM_CCN config BRCMSTB_GISB_ARB bool "Broadcom STB GISB bus arbiter" - depends on ARM || MIPS + depends on ARM || ARM64 || MIPS default ARCH_BRCMSTB || BMIPS_GENERIC help Driver for the Broadcom Set Top Box System-on-a-chip internal bus diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c index c8d2a61d21ed..bf26b4017a2c 100644 --- a/drivers/bus/brcmstb_gisb.c +++ b/drivers/bus/brcmstb_gisb.c @@ -30,6 +30,11 @@ #include #endif +#ifdef CONFIG_ARM64 +#include +#include +#endif + #ifdef CONFIG_MIPS #include #endif @@ -225,7 +230,7 @@ static int brcmstb_gisb_arb_decode_addr(struct brcmstb_gisb_arb_device *gdev, return 0; } -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { @@ -235,7 +240,7 @@ static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, list_for_each_entry(gdev, &brcmstb_gisb_arb_device_list, next) brcmstb_gisb_arb_decode_addr(gdev, "bus error"); -#if !defined(CONFIG_ARM_LPAE) +#if defined(CONFIG_ARM) && !defined(CONFIG_ARM_LPAE) /* * If it was an imprecise abort, then we need to correct the * return address to be _after_ the instruction. @@ -247,7 +252,7 @@ static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, /* Always report unhandled exception */ return 1; } -#endif +#endif /* CONFIG_ARM || CONFIG_ARM64 */ #ifdef CONFIG_MIPS static int brcmstb_bus_error_handler(struct pt_regs *regs, int is_fixup) @@ -395,6 +400,10 @@ static int __init brcmstb_gisb_arb_probe(struct platform_device *pdev) "imprecise external abort"); #endif #endif /* CONFIG_ARM */ +#ifdef CONFIG_ARM64 + hook_fault_code(16, brcmstb_bus_error_handler, SIGBUS, 0, + "synchronous external abort"); +#endif #ifdef CONFIG_MIPS board_be_handler = brcmstb_bus_error_handler; #endif