Re: [PATCH v3 3/5] arm: Convert to GENERIC_IRQ_MULTI_HANDLER

2018-03-14 Thread Thomas Gleixner
On Wed, 14 Mar 2018, Palmer Dabbelt wrote:
> On Wed, 14 Mar 2018 10:07:35 PDT (-0700), t...@linutronix.de wrote:
> > On Wed, 7 Mar 2018, Palmer Dabbelt wrote:
> > 
> > > 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 not marked as __ro_after_init.
> > 
> > Why? What prevents the generic implementation from doing so?
> 
> Sorry, I guess that should have said "handle_arch_irq was not marked as
> __ro_after_init".  The patch set has __ro_after_init for the generic
> implementation, which was not the case for the arm version.

That makes sense I'll fix that up.

Thanks,

tglx


Re: [PATCH v3 3/5] arm: Convert to GENERIC_IRQ_MULTI_HANDLER

2018-03-14 Thread Palmer Dabbelt

On Wed, 14 Mar 2018 10:07:35 PDT (-0700), t...@linutronix.de wrote:

On Wed, 7 Mar 2018, Palmer Dabbelt wrote:


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 not marked as __ro_after_init.


Why? What prevents the generic implementation from doing so?


Sorry, I guess that should have said "handle_arch_irq was not marked as
__ro_after_init".  The patch set has __ro_after_init for the generic
implementation, which was not the case for the arm version.


Re: [PATCH v3 3/5] arm: Convert to GENERIC_IRQ_MULTI_HANDLER

2018-03-14 Thread Thomas Gleixner
On Wed, 7 Mar 2018, Palmer Dabbelt wrote:

> 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 not marked as __ro_after_init.

Why? What prevents the generic implementation from doing so?

Thanks,

tglx



[PATCH v3 3/5] arm: Convert to GENERIC_IRQ_MULTI_HANDLER

2018-03-07 Thread Palmer Dabbelt
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 not 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 7e3d53575486..3f972e83909b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -339,8 +339,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
@@ -467,9 +467,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
@@ -514,8 +514,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
@@ -534,11 +534,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
@@ -574,11 +574,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
@@ -592,10 +592,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
@@ -629,10 +629,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 1752033b0070..7eeb1f57fa20 100644
--- a/arc