From patchwork Fri Jun 22 17:01:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10482729 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 10057602CB for ; Fri, 22 Jun 2018 17:03:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F342528A7E for ; Fri, 22 Jun 2018 17:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E760228C95; Fri, 22 Jun 2018 17:03:31 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 5765F28A7E for ; Fri, 22 Jun 2018 17:03:31 +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:To:From:References: In-Reply-To:Message-Id:Date:Subject:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g11fH+H2GcXMYeim9l/xdcLl9Yh238eZ+V/H9JjXUcU=; b=Fv3t6blQU3wfRw bRgxBdgUD7+E+XLGh3P2OWSefFZOLKWpO0GUT/u3y+RTss+WFUc+fIPbGjmZW7mdT/Vggdn8qaCWG 0ImU5xiY4NEMye5i9IE/es99/G13sLUl750Q6sHcHr3VJXz6DHxH6+h6BbCcOrePM8wJDFpQMciKp 3RvH74A+/XDKD0JCWbjo+oL+6tKAcHD7AHuoFjRbbGkyAiKiUEv/a1/CfLgQc/xYNx/DTC1OWYg7h lXRKncjKgqjXbXTnaAER9HdEoF6JDT+qq8KqdLWZZ4/WTvS3PEcjR80PbahzlFFv0AOEoJ1Qq6aTa JtOSs0Yg88x/tjCdDAAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWPSv-0004Bg-1x; Fri, 22 Jun 2018 17:03:17 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWPRp-0003bP-Lo for linux-arm-kernel@lists.infradead.org; Fri, 22 Jun 2018 17:02:11 +0000 Received: by mail-pf0-x243.google.com with SMTP id z24-v6so3493542pfe.7 for ; Fri, 22 Jun 2018 10:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=ry/LfwLi/tYV4OOfEp0qv4lu5uRtthBo0ccjreY/0zs=; b=Mk28X74QdQzUf+QCR/5QizeytRH/g6oZ1sUJ9gGFnI+dUxuZXz2RUYL8B6NXcjdZJo EZExZZi47h8Z2KlouCS1AY6O1Wp9Nkr+owB4THW2DUBiBgPbFRG5uc1ZPNyO/JTStQZZ LL/zpLdqveKytGO4hoJEvdpBZBVG2lktKiqO7Z403S/8Kk+uPFhgnNLXgiM6VuiKJ81Z qbPujp1+srpGGRMh0hV1wl4QnTNoGrTCd9vUjs4MXZ6i2OTDIZv6LwuXf9kCKbTcytm9 wf4/ipBMKut8LSDgsBU7qaYQn160IrzD9zJZctO8Oo4jX3OeBkXtIna6QSbX0uoMvxYQ 41TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=ry/LfwLi/tYV4OOfEp0qv4lu5uRtthBo0ccjreY/0zs=; b=Fc3+BnF3ceOUEyNFf/hM/UhLF15b9roiNULtML3ZX7Z/IaFIX02ohkqJIDRTv+0Yg+ X2ZSPBvQw+RUv6yS8koIC1Gm1sQ983hvYTWMl6AhQNmJiYcOzjQ7VTYS33BuJB1YA18f bFVFWYsUpIoQJ+9wRLXv4oXuFW/EWhjrotS3ezYSx3gH5V8y5cLI5JCBelG48KlcmKNR OklMw/vEWXzIkDjdHZvSs5iILOR5fiFiDLpzRhtPgSyYA3mTdqDQIzFMXKjcr3osHnrZ 6gZmZmz1glWbKw8D7jomG1eGw9Hrgfk6WVqG85a5xYLP3QaXTAPEp5+9js7zVTE0MK0m 1LDg== X-Gm-Message-State: APt69E35omyPL2oY4Mm5UNlzDYAuvq+g7r9s3il+PtYnINlRDUwTS1c+ 2ZC7zkmUnhbfsRoKLxwfmj0bLQ== X-Google-Smtp-Source: ADUXVKLkYRjtSH1KWICvH/V2Hl+5Kb1bIfrX01UObi+PJHcdFtf7X+aP+AFkbONN/L7N1SKpf9jfvg== X-Received: by 2002:a63:b407:: with SMTP id s7-v6mr2198856pgf.334.1529686918909; Fri, 22 Jun 2018 10:01:58 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id 10-v6sm19144223pfs.111.2018.06.22.10.01.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 10:01:58 -0700 (PDT) Subject: [PATCH 2/5] arm: Convert to GENERIC_IRQ_MULTI_HANDLER Date: Fri, 22 Jun 2018 10:01:23 -0700 Message-Id: <20180622170126.6308-3-palmer@sifive.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180622170126.6308-1-palmer@sifive.com> References: <20180621181756.12493-1-palmer@sifive.com> <20180622170126.6308-1-palmer@sifive.com> From: Palmer Dabbelt To: tglx@linutronix.de X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180622_100209_731097_4C49C964 X-CRM114-Status: GOOD ( 15.00 ) 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: nicolas.pitre@linaro.org, mark.rutland@arm.com, alexandre.belloni@bootlin.com, catalin.marinas@arm.com, Palmer Dabbelt , Will Deacon , yamada.masahiro@socionext.com, keescook@chromium.org, jonas@southpole.se, linux@armlinux.org.uk, jhogan@kernel.org, vladimir.murzin@arm.com, jason@lakedaemon.net, Arnd Bergmann , marc.zyngier@arm.com, stefan.kristiansson@saunalahti.fi, jinb.park7@gmail.com, openrisc@lists.librecores.org, shorne@gmail.com, linux-arm-kernel@lists.infradead.org, ard.biesheuvel@linaro.org, Greg KH , linux-kernel@vger.kernel.org, james.morse@arm.com, pombredanne@nexb.com, kstewart@linuxfoundation.org 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 This converts the ARM port to use the recently added GENERIC_IRQ_MULTI_HANDLER, which is essentially just a copy of ARM's existhing MULTI_IRQ_HANDLER. The only changes are: * handle_arch_irq is now defined in a generic C file instead of an arm-specific assembly file. * handle_arch_irq is now marked as __ro_after_init. Signed-off-by: Palmer Dabbelt --- arch/arm/Kconfig | 19 +++++++------------ arch/arm/include/asm/irq.h | 5 ----- arch/arm/include/asm/mach/arch.h | 2 +- arch/arm/kernel/entry-armv.S | 10 ++-------- arch/arm/kernel/irq.c | 10 ---------- arch/arm/kernel/setup.c | 2 +- 6 files changed, 11 insertions(+), 37 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 54eeb8d00bc6..b6be2b1be75d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -337,8 +337,8 @@ config ARCH_MULTIPLATFORM select TIMER_OF select COMMON_CLK select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_MULTI_HANDLER select MIGHT_HAVE_PCI - select MULTI_IRQ_HANDLER select PCI_DOMAINS if PCI select SPARSE_IRQ select USE_OF @@ -465,9 +465,9 @@ config ARCH_DOVE bool "Marvell Dove" select CPU_PJ4 select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_MULTI_HANDLER select GPIOLIB select MIGHT_HAVE_PCI - select MULTI_IRQ_HANDLER select MVEBU_MBUS select PINCTRL select PINCTRL_DOVE @@ -512,8 +512,8 @@ config ARCH_LPC32XX select COMMON_CLK select CPU_ARM926T select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_MULTI_HANDLER select GPIOLIB - select MULTI_IRQ_HANDLER select SPARSE_IRQ select USE_OF help @@ -532,11 +532,11 @@ config ARCH_PXA select TIMER_OF select CPU_XSCALE if !CPU_XSC3 select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_MULTI_HANDLER select GPIO_PXA select GPIOLIB select HAVE_IDE select IRQ_DOMAIN - select MULTI_IRQ_HANDLER select PLAT_PXA select SPARSE_IRQ help @@ -572,11 +572,11 @@ config ARCH_SA1100 select CPU_FREQ select CPU_SA1100 select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_MULTI_HANDLER select GPIOLIB select HAVE_IDE select IRQ_DOMAIN select ISA - select MULTI_IRQ_HANDLER select NEED_MACH_MEMORY_H select SPARSE_IRQ help @@ -590,10 +590,10 @@ config ARCH_S3C24XX select GENERIC_CLOCKEVENTS select GPIO_SAMSUNG select GPIOLIB + select GENERIC_IRQ_MULTI_HANDLER select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS - select MULTI_IRQ_HANDLER select NEED_MACH_IO_H select SAMSUNG_ATAGS select USE_OF @@ -627,10 +627,10 @@ config ARCH_OMAP1 select CLKSRC_MMIO select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP + select GENERIC_IRQ_MULTI_HANDLER select GPIOLIB select HAVE_IDE select IRQ_DOMAIN - select MULTI_IRQ_HANDLER select NEED_MACH_IO_H if PCCARD select NEED_MACH_MEMORY_H select SPARSE_IRQ @@ -921,11 +921,6 @@ config IWMMXT Enable support for iWMMXt context switching at run time if running on a CPU that supports it. -config MULTI_IRQ_HANDLER - bool - help - Allow each machine to specify it's own IRQ handler at run time. - if !MMU source "arch/arm/Kconfig-nommu" endif diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index b6f319606e30..c883fcbe93b6 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h @@ -31,11 +31,6 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *); void handle_IRQ(unsigned int, struct pt_regs *); void init_IRQ(void); -#ifdef CONFIG_MULTI_IRQ_HANDLER -extern void (*handle_arch_irq)(struct pt_regs *); -extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); -#endif - #ifdef CONFIG_SMP extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self); diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 5c1ad11aa392..bb8851208e17 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h @@ -59,7 +59,7 @@ struct machine_desc { void (*init_time)(void); void (*init_machine)(void); void (*init_late)(void); -#ifdef CONFIG_MULTI_IRQ_HANDLER +#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER void (*handle_irq)(struct pt_regs *); #endif void (*restart)(enum reboot_mode, const char *); diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 179a9f6bd1e3..e85a3af9ddeb 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -22,7 +22,7 @@ #include #include #include -#ifndef CONFIG_MULTI_IRQ_HANDLER +#ifndef CONFIG_GENERIC_IRQ_MULTI_HANDLER #include #endif #include @@ -39,7 +39,7 @@ * Interrupt handling. */ .macro irq_handler -#ifdef CONFIG_MULTI_IRQ_HANDLER +#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER ldr r1, =handle_arch_irq mov r0, sp badr lr, 9997f @@ -1226,9 +1226,3 @@ vector_addrexcptn: .globl cr_alignment cr_alignment: .space 4 - -#ifdef CONFIG_MULTI_IRQ_HANDLER - .globl handle_arch_irq -handle_arch_irq: - .space 4 -#endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index ece04a457486..9908dacf9229 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -102,16 +102,6 @@ void __init init_IRQ(void) uniphier_cache_init(); } -#ifdef CONFIG_MULTI_IRQ_HANDLER -void __init set_handle_irq(void (*handle_irq)(struct pt_regs *)) -{ - if (handle_arch_irq) - return; - - handle_arch_irq = handle_irq; -} -#endif - #ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs(void) { diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 35ca494c028c..4c249cb261f3 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1145,7 +1145,7 @@ void __init setup_arch(char **cmdline_p) reserve_crashkernel(); -#ifdef CONFIG_MULTI_IRQ_HANDLER +#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER handle_arch_irq = mdesc->handle_irq; #endif