From patchwork Fri Jan 16 01:17:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5643751 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C77219F2ED for ; Fri, 16 Jan 2015 01:11:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBDA72012E for ; Fri, 16 Jan 2015 01:11:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 80E84200F4 for ; Fri, 16 Jan 2015 01:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbbAPBLO (ORCPT ); Thu, 15 Jan 2015 20:11:14 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:34239 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbbAPBLN (ORCPT ); Thu, 15 Jan 2015 20:11:13 -0500 Received: by mail-pd0-f177.google.com with SMTP id ft15so19457856pdb.8 for ; Thu, 15 Jan 2015 17:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=lcpNrO0mYvVGd61O3BvkaZ+FgNIYHecSYjNs4OUshEc=; b=MbimotIHUA74HzCZrKkAxjFLRXMFB0Yk0mYyA90a9Gf7MUZzUHfb3fVdvpQQ3za9uK VvZIHVetQcq5iLpVOSC4aVhVosifn86qRycUhCbltdmZ0bEcev37sjRwuww0gLqqYqe3 2xratVWxS2Z+jYEV6fUt9+9AvojuQos1IsnYQglpPE3YjjGqhf/JkPGcUADZsT6/wI1Q 8GE9clXMpTiLYeKgOTMCKxXNR98TcS+M7oBbRSv8LW/T9Jesi9FCqQNCLFO5pE41ht8G uuY+xo52GQCVekvvF6/3flUrz8cOJ+iH+S/J3JabONQ3hMiPN7cAzGrSHPk9I256KW+l ASFw== X-Received: by 10.70.49.99 with SMTP id t3mr18244566pdn.105.1421370673316; Thu, 15 Jan 2015 17:11:13 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id o3sm2499217pdn.29.2015.01.15.17.11.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 17:11:12 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: marc.zyngier@arm.com, Magnus Damm , horms@verge.net.au, geert+renesas@glider.be Date: Fri, 16 Jan 2015 10:17:10 +0900 Message-Id: <20150116011710.12605.71607.sendpatchset@little-apple> Subject: ARM: shmobile: r8a7778: Instantiate GIC from C board code in legacy builds Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm As of commit 9a1091ef0017c40a ("irqchip: gic: Support hierarchy irq domain."), Bock-W legacy hangs during boot with: Unable to handle kernel paging request at virtual address cf86a128 pgd = c0004000 [cf86a128] *pgd=6f80041e(bad) Internal error: Oops: 8000000d [#1] SMP ARM CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-rc4 #1 Hardware name: bockw task: cf823b40 ti: cf824000 task.ti: cf824000 PC is at 0xcf86a128 LR is at request_threaded_irq+0xbc/0x124 This happens because the IRQ numbers of the GIC are now virtual, and no longer match the hardcoded hardware IRQ numbers in the platform board code. To fix this, instantiate the GIC from platform board code when compiling a legacy kernel, like is done for the sh73a0 and r8a7740 legacy code. Follows same style as the r8a7740 legacy GIC fix by Geert Uytterhoeven, thanks to him for the initial work. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven --- Written against renesas-devel-20150114v2-v3.19-rc4 arch/arm/mach-shmobile/setup-r8a7778.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/setup-r8a7778.c +++ work/arch/arm/mach-shmobile/setup-r8a7778.c 2015-01-15 19:03:50.269336083 +0900 @@ -576,11 +576,18 @@ void __init r8a7778_init_irq_extpin(int void __init r8a7778_init_irq_dt(void) { void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); +#ifdef CONFIG_ARCH_SHMOBILE_LEGACY + void __iomem *gic_dist_base = ioremap_nocache(0xfe438000, 0x1000); + void __iomem *gic_cpu_base = ioremap_nocache(0xfe430000, 0x1000); +#endif BUG_ON(!base); +#ifdef CONFIG_ARCH_SHMOBILE_LEGACY + gic_init(0, 29, gic_dist_base, gic_cpu_base); +#else irqchip_init(); - +#endif /* route all interrupts to ARM */ __raw_writel(0x73ffffff, base + INT2NTSR0); __raw_writel(0xffffffff, base + INT2NTSR1);