Skip to contentSkip to conversation

Remove ineffective CONFIG_IRQ_ALL_CPUS option

PATCH In review Livio Soares 2 participants 5 messages Jan 17, 2007 – Jan 19, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove ineffective CONFIG_IRQ_ALL_CPUS option

Hi all,

Anton Blanchard a couple of years ago made a patch to enable IRQ distribution
as a boot option, as opposed to static kernel compile option on
PPC64. [http://ozlabs.org/pipermail/linuxppc64-dev/2005-January/003045.html].

Apparently, when 'ppc64' was renamed to 'powerpc', the Kconfig option came
back (just the option, not the code). Well, the option confused me, as it currently has no effect (grep shows no users on PowerPC code, except for mpic.c, but that one is guarded with #ifdef CONFIG_PPC32).

So, I think it would be best to remove it, no?

Patch below.

PS: I am not a member of this list.

regards,

Livio

arch/powerpc/configs/cell_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/cell_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/cell_defconfig
@@ -204,7 +204,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_NUMA=y
 CONFIG_NODES_SHIFT=4
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
arch/powerpc/configs/chrp32_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/chrp32_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/chrp32_defconfig
@@ -159,7 +159,6 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
arch/powerpc/configs/g5_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/g5_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/g5_defconfig
@@ -166,7 +166,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/iseries_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/iseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/iseries_defconfig
@@ -159,7 +159,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_LPARCFG=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
arch/powerpc/configs/maple_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/maple_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/maple_defconfig
@@ -157,7 +157,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/mpc8641_hpcn_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/mpc8641_hpcn_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/mpc8641_hpcn_defconfig
@@ -138,7 +138,6 @@ CONFIG_PREEMPT_BKL=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_IRQ_ALL_CPUS is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
arch/powerpc/configs/ppc64_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ppc64_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ppc64_defconfig
@@ -182,7 +182,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m
arch/powerpc/configs/ps3_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ps3_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ps3_defconfig
@@ -177,7 +177,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_IRQ_ALL_CPUS is not set
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/pseries_defconfig +0 -1
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/pseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/pseries_defconfig
@@ -160,7 +160,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m
arch/powerpc/Kconfig +0 -9
diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/Kconfig linux-2.6.20-rc4.pmu/arch/powerpc/Kconfig
@@ -793,15 +793,6 @@ config PPCBUG_NVRAM
 	bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
 	default y if PPC_PREP
 
-config IRQ_ALL_CPUS
-	bool "Distribute interrupts on all CPUs by default"
-	depends on SMP && !MV64360
-	help
-	  This option gives the kernel permission to distribute IRQs across
-	  multiple CPUs.  Saying N here will route all IRQs to the first
-	  CPU.  Generally saying Y is safe, although some problems have been
-	  reported with SMP Power Macintoshes with this option enabled.
-
 source "arch/powerpc/platforms/pseries/Kconfig"
 
 config NUMA
#1 lore raw
Quoted 11 lines · Livio Soares

Hi all,

Anton Blanchard a couple of years ago made a patch to enable IRQ distribution
as a boot option, as opposed to static kernel compile option on
PPC64. [http://ozlabs.org/pipermail/linuxppc64-dev/2005-January/003045.html].

Apparently, when 'ppc64' was renamed to 'powerpc', the Kconfig option came
back (just the option, not the code). Well, the option confused me, as it currently has no effect (grep shows no users on PowerPC code, except for mpic.c, but that one is guarded with #ifdef CONFIG_PPC32).

Quoted 7 lines

So, I think it would be best to remove it, no?

Patch below.

PS: I am not a member of this list.

regards,

Please, provide as Signed-off-by: line. Note that the patch is incorrect too, CONFIG_IRQ_ALL_CPUS -is- used in arch/powerpc/sysdev/mpic.c though I agree it should probably be removed as a config option and made runtime instead (if at all, I think we can pretty much safely always enable it nowadays).

Ben.

Quoted 125 lines

Livio

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/cell_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/cell_defconfig

arch/powerpc/configs/cell_defconfig +0 -1
@@ -204,7 +204,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_NUMA=y
 CONFIG_NODES_SHIFT=4
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/chrp32_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/chrp32_defconfig

arch/powerpc/configs/chrp32_defconfig +0 -1
@@ -159,7 +159,6 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/g5_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/g5_defconfig

arch/powerpc/configs/g5_defconfig +0 -1
@@ -166,7 +166,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/iseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/iseries_defconfig

arch/powerpc/configs/iseries_defconfig +0 -1
@@ -159,7 +159,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_LPARCFG=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/maple_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/maple_defconfig

arch/powerpc/configs/maple_defconfig +0 -1
@@ -157,7 +157,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/mpc8641_hpcn_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/mpc8641_hpcn_defconfig

arch/powerpc/configs/mpc8641_hpcn_defconfig +0 -1
@@ -138,7 +138,6 @@ CONFIG_PREEMPT_BKL=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_IRQ_ALL_CPUS is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ppc64_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ppc64_defconfig

arch/powerpc/configs/ppc64_defconfig +0 -1
@@ -182,7 +182,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ps3_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ps3_defconfig

arch/powerpc/configs/ps3_defconfig +0 -1
@@ -177,7 +177,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_IRQ_ALL_CPUS is not set
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/configs/pseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/pseries_defconfig

arch/powerpc/configs/pseries_defconfig +0 -1
@@ -160,7 +160,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m

diff -pru linux-2.6.20-rc4.vanilla/arch/powerpc/Kconfig linux-2.6.20-rc4.pmu/arch/powerpc/Kconfig

arch/powerpc/Kconfig +0 -9
@@ -793,15 +793,6 @@ config PPCBUG_NVRAM
 	bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
 	default y if PPC_PREP
 
-config IRQ_ALL_CPUS
-	bool "Distribute interrupts on all CPUs by default"
-	depends on SMP && !MV64360
-	help
-	  This option gives the kernel permission to distribute IRQs across
-	  multiple CPUs.  Saying N here will route all IRQs to the first
-	  CPU.  Generally saying Y is safe, although some problems have been
-	  reported with SMP Power Macintoshes with this option enabled.
-
 source "arch/powerpc/platforms/pseries/Kconfig"
 
 config NUMA

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#2 lore raw

Hello Ben,

Quoted 1 line · Benjamin Herrenschmidt

On Wed, 2007-01-17 at 18:02 -0500, Livio Soares wrote:

[...]

Quoted 2 lines

Please, provide as Signed-off-by: line.

I apologize; I was not very familiar with the procedures involved with sending
patches to Linux kernel. I will provide one in the future; thanks.

Quoted 5 lines

Note that the patch is incorrect
too, CONFIG_IRQ_ALL_CPUS -is- used in arch/powerpc/sysdev/mpic.c though I agree it should probably be removed as a config option and made runtime instead (if at all, I think we can pretty much safely always enable it nowadays).

Ok. For some reason I understood that mpic.c was being used in 'ppc'
architecture as well, therefore I should not remove it. However, that assumption was incorrect. This new patch completely removes the IRQ_ALL_CPUS option from

powerpc  altogether.  To   do  so,  I  have  enabled   the  kernel  boot  option
"noirqdistrib"  for  both  PPC64 and  PPC32.  Both  mpic.c  and xics.c  use  the
"distribute_irqs"  variable, which is  1 (on)  by default,  and turned  off with

"noirqdistrib" bootup option. Currently, there is no way to dynamically change the behaviour.

  On  a side  note, I  probably need  to make  IRQ distribution  configurable at
run-time (for  my personal work).  I  was thinking of exporting  a bit-mask type
structure  through sysfs,  to enable  run-time configuration  of CPUs  which can

receive interrupts (and possibly priorities). Would people be interested in such a patch?

Below is the patch to remove CONFIG_IRQ_ALL_CPUS from powerpc.

Thanks,

Livio

arch/powerpc/configs/cell_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/cell_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/cell_defconfig
@@ -204,7 +204,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_NUMA=y
 CONFIG_NODES_SHIFT=4
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
arch/powerpc/configs/chrp32_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/chrp32_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/chrp32_defconfig
@@ -159,7 +159,6 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
arch/powerpc/configs/g5_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/g5_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/g5_defconfig
@@ -166,7 +166,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/iseries_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/iseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/iseries_defconfig
@@ -159,7 +159,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_LPARCFG=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
arch/powerpc/configs/maple_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/maple_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/maple_defconfig
@@ -157,7 +157,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/mpc8641_hpcn_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/mpc8641_hpcn_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/mpc8641_hpcn_defconfig
@@ -138,7 +138,6 @@ CONFIG_PREEMPT_BKL=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_IRQ_ALL_CPUS is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
arch/powerpc/configs/ppc64_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ppc64_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ppc64_defconfig
@@ -182,7 +182,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m
arch/powerpc/configs/ps3_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ps3_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ps3_defconfig
@@ -177,7 +177,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_IRQ_ALL_CPUS is not set
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
arch/powerpc/configs/pseries_defconfig +0 -1
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/pseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/pseries_defconfig
@@ -160,7 +160,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m
arch/powerpc/Kconfig +0 -9
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/Kconfig linux-2.6.20-rc4.pmu/arch/powerpc/Kconfig
@@ -793,15 +793,6 @@ config PPCBUG_NVRAM
 	bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
 	default y if PPC_PREP
 
-config IRQ_ALL_CPUS
-	bool "Distribute interrupts on all CPUs by default"
-	depends on SMP && !MV64360
-	help
-	  This option gives the kernel permission to distribute IRQs across
-	  multiple CPUs.  Saying N here will route all IRQs to the first
-	  CPU.  Generally saying Y is safe, although some problems have been
-	  reported with SMP Power Macintoshes with this option enabled.
-
 source "arch/powerpc/platforms/pseries/Kconfig"
 
 config NUMA
arch/powerpc/kernel/irq.c +2 -4
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/kernel/irq.c linux-2.6.20-rc4.pmu/arch/powerpc/kernel/irq.c
@@ -92,11 +92,11 @@ extern atomic_t ipi_recv;
 extern atomic_t ipi_sent;
 #endif
 
+int distribute_irqs = 1;
+
 #ifdef CONFIG_PPC64
 EXPORT_SYMBOL(irq_desc);
 
-int distribute_irqs = 1;
-
 static inline unsigned long get_hard_enabled(void)
 {
 	unsigned long enabled;
@@ -973,7 +973,6 @@ EXPORT_SYMBOL(pci_disable_msix);
 
 #endif
 
-#ifdef CONFIG_PPC64
 static int __init setup_noirqdistrib(char *str)
 {
 	distribute_irqs = 0;
@@ -981,4 +980,3 @@ static int __init setup_noirqdistrib(cha
 }
 
 __setup("noirqdistrib", setup_noirqdistrib);
-#endif /* CONFIG_PPC64 */
arch/powerpc/sysdev/mpic.c +0 -8
diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/sysdev/mpic.c linux-2.6.20-rc4.pmu/arch/powerpc/sysdev/mpic.c
@@ -46,14 +46,6 @@ static struct mpic *mpics;
 static struct mpic *mpic_primary;
 static DEFINE_SPINLOCK(mpic_lock);
 
-#ifdef CONFIG_PPC32	/* XXX for now */
-#ifdef CONFIG_IRQ_ALL_CPUS
-#define distribute_irqs	(1)
-#else
-#define distribute_irqs	(0)
-#endif
-#endif
-
 #ifdef CONFIG_MPIC_WEIRD
 static u32 mpic_infos[][MPIC_IDX_END] = {
 	[0] = {	/* Original OpenPIC compatible MPIC */
#3 lore raw

Sorry to reply to myself, but...

Quoted 5 lines · Livio Soares

Hello Ben,

Quoted 1 line · Benjamin Herrenschmidt

On Wed, 2007-01-17 at 18:02 -0500, Livio Soares wrote:

Quoted 7 lines

[...]

  On  a side  note, I  probably need  to make  IRQ distribution  configurable at
run-time (for  my personal work).  I  was thinking of exporting  a bit-mask type
structure  through sysfs,  to enable  run-time configuration  of CPUs  which can

receive interrupts (and possibly priorities). Would people be interested in such a patch?

Looking at the code, I found out that this is _already_ being done; through
setting affinities of interrupts. If you can get the bitmask right in /proc/irq/[IRQ#]/smp_affinity, you can change the distribution of interrupts (furthermore, potentially disable a particular IRQ altogether a particular CPU).

Sorry for the noise,

Livio

#4 lore raw
In reply to Livio Soares
Quoted 9 lines

Ok. For some reason I understood that mpic.c was being used in 'ppc'
architecture as well, therefore I should not remove it. However, that assumption was incorrect. This new patch completely removes the IRQ_ALL_CPUS option from

powerpc  altogether.  To   do  so,  I  have  enabled   the  kernel  boot  option
"noirqdistrib"  for  both  PPC64 and  PPC32.  Both  mpic.c  and xics.c  use  the
"distribute_irqs"  variable, which is  1 (on)  by default,  and turned  off with

"noirqdistrib" bootup option. Currently, there is no way to dynamically change the behaviour.

And there is no need to anyway as you cna just use the irq affinity APIs to do that.

Quoted 5 lines
  On  a side  note, I  probably need  to make  IRQ distribution  configurable at
run-time (for  my personal work).  I  was thinking of exporting  a bit-mask type
structure  through sysfs,  to enable  run-time configuration  of CPUs  which can

receive interrupts (and possibly priorities). Would people be interested in such a patch?

As I said above. There is already support for controlling irq affinity

Quoted 174 lines

Below is the patch to remove CONFIG_IRQ_ALL_CPUS from powerpc.

Thanks,

Livio

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/cell_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/cell_defconfig

arch/powerpc/configs/cell_defconfig +0 -1
@@ -204,7 +204,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_NUMA=y
 CONFIG_NODES_SHIFT=4
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/chrp32_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/chrp32_defconfig

arch/powerpc/configs/chrp32_defconfig +0 -1
@@ -159,7 +159,6 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/g5_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/g5_defconfig

arch/powerpc/configs/g5_defconfig +0 -1
@@ -166,7 +166,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/iseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/iseries_defconfig

arch/powerpc/configs/iseries_defconfig +0 -1
@@ -159,7 +159,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_LPARCFG=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/maple_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/maple_defconfig

arch/powerpc/configs/maple_defconfig +0 -1
@@ -157,7 +157,6 @@ CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/mpc8641_hpcn_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/mpc8641_hpcn_defconfig

arch/powerpc/configs/mpc8641_hpcn_defconfig +0 -1
@@ -138,7 +138,6 @@ CONFIG_PREEMPT_BKL=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_IRQ_ALL_CPUS is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ppc64_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ppc64_defconfig

arch/powerpc/configs/ppc64_defconfig +0 -1
@@ -182,7 +182,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/ps3_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/ps3_defconfig

arch/powerpc/configs/ps3_defconfig +0 -1
@@ -177,7 +177,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_IRQ_ALL_CPUS is not set
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/configs/pseries_defconfig linux-2.6.20-rc4.pmu/arch/powerpc/configs/pseries_defconfig

arch/powerpc/configs/pseries_defconfig +0 -1
@@ -160,7 +160,6 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-CONFIG_IRQ_ALL_CPUS=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_EEH=y
 CONFIG_SCANLOG=m

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/Kconfig linux-2.6.20-rc4.pmu/arch/powerpc/Kconfig

arch/powerpc/Kconfig +0 -9
@@ -793,15 +793,6 @@ config PPCBUG_NVRAM
 	bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
 	default y if PPC_PREP
 
-config IRQ_ALL_CPUS
-	bool "Distribute interrupts on all CPUs by default"
-	depends on SMP && !MV64360
-	help
-	  This option gives the kernel permission to distribute IRQs across
-	  multiple CPUs.  Saying N here will route all IRQs to the first
-	  CPU.  Generally saying Y is safe, although some problems have been
-	  reported with SMP Power Macintoshes with this option enabled.
-
 source "arch/powerpc/platforms/pseries/Kconfig"
 
 config NUMA

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/kernel/irq.c linux-2.6.20-rc4.pmu/arch/powerpc/kernel/irq.c

arch/powerpc/kernel/irq.c +2 -4
@@ -92,11 +92,11 @@ extern atomic_t ipi_recv;
 extern atomic_t ipi_sent;
 #endif
 
+int distribute_irqs = 1;
+
 #ifdef CONFIG_PPC64
 EXPORT_SYMBOL(irq_desc);
 
-int distribute_irqs = 1;
-
 static inline unsigned long get_hard_enabled(void)
 {
 	unsigned long enabled;
@@ -973,7 +973,6 @@ EXPORT_SYMBOL(pci_disable_msix);
 
 #endif
 
-#ifdef CONFIG_PPC64
 static int __init setup_noirqdistrib(char *str)
 {
 	distribute_irqs = 0;
@@ -981,4 +980,3 @@ static int __init setup_noirqdistrib(cha
 }
 
 __setup("noirqdistrib", setup_noirqdistrib);
-#endif /* CONFIG_PPC64 */

diff -pru -X linux-2.6.20-rc4/Documentation/dontdiff linux-2.6.20-rc4.vanilla/arch/powerpc/sysdev/mpic.c linux-2.6.20-rc4.pmu/arch/powerpc/sysdev/mpic.c

arch/powerpc/sysdev/mpic.c +0 -8
@@ -46,14 +46,6 @@ static struct mpic *mpics;
 static struct mpic *mpic_primary;
 static DEFINE_SPINLOCK(mpic_lock);
 
-#ifdef CONFIG_PPC32	/* XXX for now */
-#ifdef CONFIG_IRQ_ALL_CPUS
-#define distribute_irqs	(1)
-#else
-#define distribute_irqs	(0)
-#endif
-#endif
-
 #ifdef CONFIG_MPIC_WEIRD
 static u32 mpic_infos[][MPIC_IDX_END] = {
 	[0] = {	/* Original OpenPIC compatible MPIC */