Skip to contentSkip to conversation

x86: move pic_mode to apic_32.c

PATCH In review Alexey Starikovskiy 5 participants 16 messages May 19, 2008 – May 23, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 x86: move pic_mode to apic_32.c

---

 arch/x86/kernel/apic_32.c     |    2 ++
 arch/x86/kernel/mpparse.c     |    4 +---
 arch/x86/mach-visws/mpparse.c |    2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
arch/x86/kernel/apic_32.c +2 -0
index 6b2c2cf..c0dd696 100644
@@ -77,6 +77,8 @@ char system_vectors[NR_VECTORS] = { [0 ... NR_VECTORS-1] = SYS_VECTOR_FREE};
  */
 int apic_verbosity;
 
+int pic_mode;
+
 static unsigned int calibration_result;
 
 static int lapic_next_event(unsigned long delta,
arch/x86/kernel/mpparse.c +1 -3
index 59f051d..b72c046 100644
@@ -48,8 +48,6 @@ int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
 
 static int mp_current_pci_id;
 
-int pic_mode;
-
 /*
  * Intel MP BIOS table parsing routines:
  */
@@ -609,7 +607,7 @@ static void __init __get_smp_config(unsigned early)
 
 	printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
 	       mpf->mpf_specification);
-#ifdef CONFIG_X86_32
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
 	if (mpf->mpf_feature2 & (1 << 7)) {
 		printk(KERN_INFO "    IMCR and PIC compatibility mode.\n");
 		pic_mode = 1;
arch/x86/mach-visws/mpparse.c +0 -2
index 57484e9..b7d063e 100644
@@ -11,8 +11,6 @@
 /* Have we found an MP table */
 int smp_found_config;
 
-int pic_mode;
-
 extern unsigned int __cpuinitdata maxcpus;
 
 /*
#1 lore raw

PATCH 2/5 x86: move smp_found_config

---

 arch/x86/kernel/apic_32.c           |    3 +++
 arch/x86/kernel/apic_64.c           |    3 +++
 arch/x86/kernel/mpparse.c           |    8 ++++----
 arch/x86/mach-visws/mpparse.c       |    5 ++---
 arch/x86/mach-voyager/voyager_smp.c |    5 -----
 5 files changed, 12 insertions(+), 12 deletions(-)
arch/x86/kernel/apic_32.c +3 -0
index c0dd696..4ed4a2b 100644
@@ -79,6 +79,9 @@ int apic_verbosity;
 
 int pic_mode;
 
+/* Have we found an MP table */
+int smp_found_config;
+
 static unsigned int calibration_result;
 
 static int lapic_next_event(unsigned long delta,
arch/x86/kernel/apic_64.c +3 -0
index 30f3f6a..10fde03 100644
@@ -56,6 +56,9 @@ EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
  */
 int apic_verbosity;
 
+/* Have we found an MP table */
+int smp_found_config;
+
 static struct resource lapic_resource = {
 	.name = "Local APIC",
 	.flags = IORESOURCE_MEM | IORESOURCE_BUSY,
arch/x86/kernel/mpparse.c +4 -4
index b72c046..d67cd76 100644
@@ -32,9 +32,6 @@
 #include <mach_mpparse.h>
 #endif
 
-/* Have we found an MP table */
-int smp_found_config;
-
 /*
  * Various Linux-internal data structures created from the
  * MP-table.
@@ -639,7 +636,9 @@ static void __init __get_smp_config(unsigned early)
 		 * override the defaults.
 		 */
 		if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr), early)) {
+#ifdef CONFIG_X86_LOCAL_APIC
 			smp_found_config = 0;
+#endif
 			printk(KERN_ERR
 			       "BIOS bug, MP table errors detected!...\n");
 			printk(KERN_ERR "... disabling SMP support. "
@@ -706,8 +705,9 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
 		    !mpf_checksum((unsigned char *)bp, 16) &&
 		    ((mpf->mpf_specification == 1)
 		     || (mpf->mpf_specification == 4))) {
-
+#ifdef CONFIG_X86_LOCAL_APIC
 			smp_found_config = 1;
+#endif
 			mpf_found = mpf;
 #ifdef CONFIG_X86_32
 			printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n",
arch/x86/mach-visws/mpparse.c +2 -3
index b7d063e..a2fb78c 100644
@@ -8,9 +8,6 @@
 #include "cobalt.h"
 #include "mach_apic.h"
 
-/* Have we found an MP table */
-int smp_found_config;
-
 extern unsigned int __cpuinitdata maxcpus;
 
 /*
@@ -74,7 +71,9 @@ void __init find_smp_config(void)
 	if (ncpus > maxcpus)
 		ncpus = maxcpus;
 
+#ifdef CONFIG_X86_LOCAL_APIC
 	smp_found_config = 1;
+#endif
 	while (ncpus--)
 		MP_processor_info(mp++);
 
arch/x86/mach-voyager/voyager_smp.c +0 -5
index 8acbf0c..6d33541 100644
@@ -59,11 +59,6 @@ __u32 voyager_quad_processors = 0;
  * activity count.  Finally exported by i386_ksyms.c */
 static int voyager_extended_cpus = 1;
 
-/* Have we found an SMP box - used by time.c to do the profiling
-   interrupt for timeslicing; do not set to 1 until the per CPU timer
-   interrupt is active */
-int smp_found_config = 0;
-
 /* Used for the invalidate map that's also checked in the spinlock */
 static volatile unsigned long smp_invalidate_needed;
 
#2 lore raw

PATCH 3/5 x86: mp_bus_id_to_pci_bus is not needed

In reply to Alexey Starikovskiy

---

 arch/x86/kernel/io_apic_32.c |    2 +-
 arch/x86/kernel/io_apic_64.c |    2 +-
 arch/x86/kernel/mpparse.c    |   10 ----------
 include/asm-x86/mpspec.h     |    2 --
 4 files changed, 2 insertions(+), 14 deletions(-)
arch/x86/kernel/io_apic_32.c +1 -1
index 3037aa4..01dfe7c 100644
@@ -864,7 +864,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
 
 	apic_printk(APIC_DEBUG, "querying PCI -> IRQ mapping bus:%d, "
 		"slot:%d, pin:%d.\n", bus, slot, pin);
-	if (mp_bus_id_to_pci_bus[bus] == -1) {
+	if (test_bit(bus, mp_bus_not_pci)) {
 		printk(KERN_WARNING "PCI BIOS passed nonexistent PCI bus %d!\n", bus);
 		return -1;
 	}
arch/x86/kernel/io_apic_64.c +1 -1
index 416154d..e7f7ea7 100644
@@ -520,7 +520,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
 
 	apic_printk(APIC_DEBUG, "querying PCI -> IRQ mapping bus:%d, slot:%d, pin:%d.\n",
 		bus, slot, pin);
-	if (mp_bus_id_to_pci_bus[bus] == -1) {
+	if (test_bit(bus, mp_bus_not_pci)) {
 		apic_printk(APIC_VERBOSE, "PCI BIOS passed nonexistent PCI bus %d!\n", bus);
 		return -1;
 	}
arch/x86/kernel/mpparse.c +0 -10
index d67cd76..83dfd66 100644
@@ -41,13 +41,6 @@ int mp_bus_id_to_type[MAX_MP_BUSSES];
 #endif
 
 DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
-int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
-
-static int mp_current_pci_id;
-
-/*
- * Intel MP BIOS table parsing routines:
- */
 
 /*
  * Checksum an MP configuration block.
@@ -101,7 +94,6 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
 static void __init MP_bus_info(struct mpc_config_bus *m)
 {
 	char str[7];
-
 	memcpy(str, m->mpc_bustype, 6);
 	str[6] = 0;
 
@@ -130,8 +122,6 @@ static void __init MP_bus_info(struct mpc_config_bus *m)
 		mpc_oem_pci_bus(m, translation_table[mpc_record]);
 #endif
 		clear_bit(m->mpc_busid, mp_bus_not_pci);
-		mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id;
-		mp_current_pci_id++;
 #if defined(CONFIG_EISA) || defined (CONFIG_MCA)
 		mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
 	} else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) {
include/asm-x86/mpspec.h +0 -2
index 57a991b..b785ddd 100644
@@ -32,8 +32,6 @@ extern int mp_bus_id_to_type[MAX_MP_BUSSES];
 
 extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
 
-extern int mp_bus_id_to_pci_bus[MAX_MP_BUSSES];
-
 extern unsigned int boot_cpu_physical_apicid;
 extern int smp_found_config;
 extern int mpc_default_type;
#6 lore raw

PATCH 4/5 x86: move mp_bus_not_pci from mpparse.c

In reply to Alexey Starikovskiy

---

 arch/x86/kernel/io_apic_32.c |    6 ++++++
 arch/x86/kernel/io_apic_64.c |    2 ++
 arch/x86/kernel/mpparse.c    |   10 ----------
 3 files changed, 8 insertions(+), 10 deletions(-)
arch/x86/kernel/io_apic_32.c +6 -0
index 01dfe7c..f848ec0 100644
@@ -81,6 +81,12 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
+int mp_bus_id_to_type[MAX_MP_BUSSES];
+#endif
+
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+
 static int disable_timer_pin_1 __initdata;
 
 /*
arch/x86/kernel/io_apic_64.c +2 -0
index e7f7ea7..27842b0 100644
@@ -117,6 +117,8 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+
 /*
  * Rough estimation of how many shared IRQs there are, can
  * be changed anytime.
arch/x86/kernel/mpparse.c +0 -10
index 83dfd66..e8e041e 100644
@@ -33,16 +33,6 @@
 #endif
 
 /*
- * Various Linux-internal data structures created from the
- * MP-table.
- */
-#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
-int mp_bus_id_to_type[MAX_MP_BUSSES];
-#endif
-
-DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
-
-/*
  * Checksum an MP configuration block.
  */
 
#10 lore raw

PATCH 5/5 x86: allow MPPARSE to be deselected in SMP configs

In reply to Alexey Starikovskiy

---

 arch/x86/Kconfig.debug     |    2 +-
 arch/x86/kernel/setup.c    |    2 +-
 arch/x86/kernel/setup_32.c |    2 +-
 arch/x86/kernel/setup_64.c |    4 ++++
 4 files changed, 7 insertions(+), 3 deletions(-)
arch/x86/Kconfig.debug +1 -1
index 5eb480e..f27de28 100644
@@ -128,7 +128,7 @@ config 4KSTACKS
 
 config X86_FIND_SMP_CONFIG
 	def_bool y
-	depends on X86_LOCAL_APIC || X86_VOYAGER
+	depends on X86_MPPARSE || X86_VOYAGER || X86_VISWS
 	depends on X86_32
 
 config X86_MPPARSE
arch/x86/kernel/setup.c +1 -1
index 089ddfa..c86bda7 100644
@@ -12,7 +12,7 @@
 #include <asm/mpspec.h>
 #include <asm/apicdef.h>
 
-#ifdef CONFIG_X86_MPPARSE
+#ifdef CONFIG_X86_LOCAL_APIC
 unsigned int num_processors;
 unsigned disabled_cpus __cpuinitdata;
 
arch/x86/kernel/setup_32.c +1 -1
index 12a31de..9af0d5f 100644
@@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)
 			"CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
 #endif
 #endif
-#ifdef CONFIG_X86_LOCAL_APIC
+#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
 	if (smp_found_config)
 		get_smp_config();
 #endif
arch/x86/kernel/setup_64.c +4 -0
index 9234675..8047db9 100644
@@ -439,7 +439,9 @@ void __init setup_arch(char **cmdline_p)
        /*
 	* Find and reserve possible boot-time SMP configuration:
 	*/
+#ifdef CONFIG_X86_MPPARSE
 	find_smp_config();
+#endif
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
 		unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
@@ -485,8 +487,10 @@ void __init setup_arch(char **cmdline_p)
 	/*
 	 * get boot-time SMP configuration:
 	 */
+#ifdef CONFIG_X86_MPPARSE
 	if (smp_found_config)
 		get_smp_config();
+#endif
 	init_apic_mappings();
 	ioapic_init_mappings();
 
#11 lore raw

Re: [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs

Quoted 54 lines · Alexey Starikovskiy

---

 arch/x86/Kconfig.debug     |    2 +-
 arch/x86/kernel/setup.c    |    2 +-
 arch/x86/kernel/setup_32.c |    2 +-
 arch/x86/kernel/setup_64.c |    4 ++++
 4 files changed, 7 insertions(+), 3 deletions(-)
arch/x86/Kconfig.debug +1 -1
index 5eb480e..f27de28 100644
@@ -128,7 +128,7 @@ config 4KSTACKS
 
 config X86_FIND_SMP_CONFIG
       def_bool y
-       depends on X86_LOCAL_APIC || X86_VOYAGER
+       depends on X86_MPPARSE || X86_VOYAGER || X86_VISWS
       depends on X86_32
 
 config X86_MPPARSE
arch/x86/kernel/setup.c +1 -1
index 089ddfa..c86bda7 100644
@@ -12,7 +12,7 @@
 #include <asm/mpspec.h>
 #include <asm/apicdef.h>
 
-#ifdef CONFIG_X86_MPPARSE
+#ifdef CONFIG_X86_LOCAL_APIC
 unsigned int num_processors;
 unsigned disabled_cpus __cpuinitdata;
 
arch/x86/kernel/setup_32.c +1 -1
index 12a31de..9af0d5f 100644
@@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)
                       "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
 #endif
 #endif
-#ifdef CONFIG_X86_LOCAL_APIC
+#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
       if (smp_found_config)
               get_smp_config();
 #endif
arch/x86/kernel/setup_64.c +0 -0
index 9234675..8047db9 100644

arch/x86/kernel/setup_64.c void __init setup_arch(char **cmdline_p) · line 444

Quoted 6 lines
arch/x86/kernel/setup_64.c +2 -0
@@ -439,7 +439,9 @@ void __init setup_arch(char **cmdline_p)
       /*
       * Find and reserve possible boot-time SMP configuration:
       */
+#ifdef CONFIG_X86_MPPARSE
       find_smp_config();
+#endif

put the ifdef before the comments?

also if the mptable is not reserved in e820 table (buggy bios), we may still need to call find_smp_config to reserved the mptable. otherwise kexec to kernel without acpi support or acpi=off could fail, because mptable could be damaged already.

arch/x86/kernel/setup_64.c void __init setup_arch(char **cmdline_p) · line 493

Quoted 11 lines
arch/x86/kernel/setup_64.c +2 -0
 #ifdef CONFIG_BLK_DEV_INITRD
       if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
               unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
@@ -485,8 +487,10 @@ void __init setup_arch(char **cmdline_p)
       /*
        * get boot-time SMP configuration:
        */
+#ifdef CONFIG_X86_MPPARSE
       if (smp_found_config)
               get_smp_config();
+#endif

put the ifdef before coments please.

arch/x86/kernel/setup_64.c void __init setup_arch(char **cmdline_p) · line 495

Quoted 2 lines
arch/x86/kernel/setup_64.c +0 -0
       init_apic_mappings();
       ioapic_init_mappings();

YH

#12 lore raw

PATCH 1/1 x86: allow MPPARSE to be deselected in SMP configs

---

 arch/x86/Kconfig.debug     |    2 +-
 arch/x86/kernel/setup.c    |    2 +-
 arch/x86/kernel/setup_32.c |    2 +-
 arch/x86/kernel/setup_64.c |    4 ++++
 4 files changed, 7 insertions(+), 3 deletions(-)
arch/x86/Kconfig.debug +1 -1
index 5eb480e..f27de28 100644
@@ -128,7 +128,7 @@ config 4KSTACKS
 
 config X86_FIND_SMP_CONFIG
 	def_bool y
-	depends on X86_LOCAL_APIC || X86_VOYAGER
+	depends on X86_MPPARSE || X86_VOYAGER || X86_VISWS
 	depends on X86_32
 
 config X86_MPPARSE
arch/x86/kernel/setup.c +1 -1
index 089ddfa..c86bda7 100644
@@ -12,7 +12,7 @@
 #include <asm/mpspec.h>
 #include <asm/apicdef.h>
 
-#ifdef CONFIG_X86_MPPARSE
+#ifdef CONFIG_X86_LOCAL_APIC
 unsigned int num_processors;
 unsigned disabled_cpus __cpuinitdata;
 
arch/x86/kernel/setup_32.c +1 -1
index 12a31de..9af0d5f 100644
@@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)
 			"CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
 #endif
 #endif
-#ifdef CONFIG_X86_LOCAL_APIC
+#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
 	if (smp_found_config)
 		get_smp_config();
 #endif
arch/x86/kernel/setup_64.c +4 -0
index 9234675..88f0ac2 100644
@@ -436,10 +436,12 @@ void __init setup_arch(char **cmdline_p)
 	if (efi_enabled)
 		efi_reserve_bootmem();
 
+#ifdef CONFIG_X86_MPPARSE
        /*
 	* Find and reserve possible boot-time SMP configuration:
 	*/
 	find_smp_config();
+#endif
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
 		unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
@@ -482,11 +484,13 @@ void __init setup_arch(char **cmdline_p)
 
 	init_cpu_to_node();
 
+#ifdef CONFIG_X86_MPPARSE
 	/*
 	 * get boot-time SMP configuration:
 	 */
 	if (smp_found_config)
 		get_smp_config();
+#endif
 	init_apic_mappings();
 	ioapic_init_mappings();
 
#13 lore raw
In reply to Alexey Starikovskiy

arch/x86/kernel/mpparse.c static void __init __get_smp_config(unsigned early) · line 613

Quoted 8 lines · Alexey Starikovskiy
arch/x86/kernel/mpparse.c +1 -1
 	printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
 	       mpf->mpf_specification);
-#ifdef CONFIG_X86_32
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
 	if (mpf->mpf_feature2 & (1 << 7)) {
 		printk(KERN_INFO "    IMCR and PIC compatibility mode.\n");
 		pic_mode = 1;

This part is not about moving pic_mode. Please separate it out.

Thanks,
tglx

#3 lore raw

Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,

In reply to Alexey Starikovskiy

arch/x86/kernel/mpparse.c static void __cpuinit MP_processor_info(struct mpc_config_processor *m) · line 98

Quoted 7 lines · Alexey Starikovskiy
arch/x86/kernel/mpparse.c +0 -1
@@ -101,7 +94,6 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
 static void __init MP_bus_info(struct mpc_config_bus *m)
 {
 	char str[7];
-
 	memcpy(str, m->mpc_bustype, 6);
 	str[6] = 0;

Please avoid such unrelated whitespace noise.

Thanks,
tglx

#14 lore raw

PATCH 1/2 x86: Set pic_mode only if local apic code is present

In reply to Thomas Gleixner

---

 arch/x86/kernel/mpparse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/mpparse.c +1 -1
index 59f051d..e61523a 100644
@@ -609,7 +609,7 @@ static void __init __get_smp_config(unsigned early)
 
 	printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
 	       mpf->mpf_specification);
-#ifdef CONFIG_X86_32
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
 	if (mpf->mpf_feature2 & (1 << 7)) {
 		printk(KERN_INFO "    IMCR and PIC compatibility mode.\n");
 		pic_mode = 1;
#15 lore raw

PATCH 2/2 x86: move pic_mode to apic_32.c

In reply to Thomas Gleixner

---

 arch/x86/kernel/apic_32.c     |    2 ++
 arch/x86/kernel/mpparse.c     |    2 --
 arch/x86/mach-visws/mpparse.c |    2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
arch/x86/kernel/apic_32.c +2 -0
index 6b2c2cf..c0dd696 100644
@@ -77,6 +77,8 @@ char system_vectors[NR_VECTORS] = { [0 ... NR_VECTORS-1] = SYS_VECTOR_FREE};
  */
 int apic_verbosity;
 
+int pic_mode;
+
 static unsigned int calibration_result;
 
 static int lapic_next_event(unsigned long delta,
arch/x86/kernel/mpparse.c +0 -2
index e61523a..b72c046 100644
@@ -48,8 +48,6 @@ int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
 
 static int mp_current_pci_id;
 
-int pic_mode;
-
 /*
  * Intel MP BIOS table parsing routines:
  */
arch/x86/mach-visws/mpparse.c +0 -2
index 57484e9..b7d063e 100644
@@ -11,8 +11,6 @@
 /* Have we found an MP table */
 int smp_found_config;
 
-int pic_mode;
-
 extern unsigned int __cpuinitdata maxcpus;
 
 /*
#4 lore raw

Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,

In reply to Thomas Gleixner
Quoted 10 lines · Thomas Gleixner

arch/x86/kernel/mpparse.c static void __cpuinit MP_processor_info(struct mpc_config_processor *m) · line 98

Quoted 7 lines · Alexey Starikovskiy
arch/x86/kernel/mpparse.c +0 -1
@@ -101,7 +94,6 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
 static void __init MP_bus_info(struct mpc_config_bus *m)
 {
 	char str[7];
-
 	memcpy(str, m->mpc_bustype, 6);
 	str[6] = 0;

Please avoid such unrelated whitespace noise.

A few correct whitespace fixes shouldn't be a problem, but this one isn't even a good change.

Signature · 1 line
~Randy
#7 lore raw

Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c

In reply to Alexey Starikovskiy
Quoted 14 lines · Alexey Starikovskiy

+++ b/arch/x86/kernel/io_apic_32.c

arch/x86/kernel/io_apic_32.c +7 -0
@@ -81,6 +81,12 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
+int mp_bus_id_to_type[MAX_MP_BUSSES];
+#endif
+
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+
 
+++ b/arch/x86/kernel/io_apic_64.c

arch/x86/kernel/io_apic_32.c struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; · line 121

Quoted 5 lines
arch/x86/kernel/io_apic_32.c +2 -0
@@ -117,6 +117,8 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+

NAK for the whole series. If you want to move out stuff from mpparse, then please look for a useful place, which is

1) related to the code (mp_bus_not_pci has no obvious association to io_apic)

2) not duplicating code into 32/64 bit files again. We work hard on unifying and also distangling things and I refuse to accept a patch which moves code to a random place where it happens to compile.

Thanks,

tglx

#5 lore raw

Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,

In reply to Randy.Dunlap
Quoted 2 lines · Randy.Dunlap

A few correct whitespace fixes shouldn't be a problem, but this one isn't even a good change.

From my experience it varies wildly among maintainers. ;-)

I would not mind unless it hit clarity of the change itself.

Maciej

#8 lore raw

Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c

In reply to Thomas Gleixner

this is the output from cscope:
C symbol: mp_bus_not_pci

File Function Line
0 io_apic_32.c <global> 88 DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
1 io_apic_64.c <global> 120 DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
2 mpspec.h <global> 33 extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);

3 boot.c       mp_config_acpi_legacy_irqs  995 set_bit(MP_ISA_BUS, mp_bus_not_pci);
4 io_apic_32.c find_isa_irq_pin            829 if (test_bit(lbus, mp_bus_not_pci) &&
5 io_apic_32.c find_isa_irq_apic           845 if (test_bit(lbus, mp_bus_not_pci) &&
6 io_apic_32.c IO_APIC_get_PCI_irq_vector  873 if (test_bit(bus, mp_bus_not_pci)) {
7 io_apic_32.c IO_APIC_get_PCI_irq_vector  885 if (!test_bit(lbus, mp_bus_not_pci) &&
8 io_apic_32.c MPBIOS_polarity             988 polarity = test_bit(bus, mp_bus_not_pci)?
9 io_apic_32.c MPBIOS_trigger             1031 trigger = test_bit(bus, mp_bus_not_pci)?
a io_apic_32.c pin_2_irq                  1114 if (test_bit(bus, mp_bus_not_pci))
b io_apic_64.c find_isa_irq_pin            481 if (test_bit(lbus, mp_bus_not_pci) &&
c io_apic_64.c find_isa_irq_apic           497 if (test_bit(lbus, mp_bus_not_pci) &&
d io_apic_64.c IO_APIC_get_PCI_irq_vector  525 if (test_bit(bus, mp_bus_not_pci)) {
e io_apic_64.c IO_APIC_get_PCI_irq_vector  537 if (!test_bit(lbus, mp_bus_not_pci) &&
f io_apic_64.c MPBIOS_polarity             583 if (test_bit(bus, mp_bus_not_pci))
g io_apic_64.c MPBIOS_trigger              625 if (test_bit(bus, mp_bus_not_pci))
h io_apic_64.c pin_2_irq                   677 if (test_bit(bus, mp_bus_not_pci)) {
i mpparse.c    MP_bus_info                 106 set_bit(m->mpc_busid, mp_bus_not_pci);
j mpparse.c    MP_bus_info                 114 clear_bit(m->mpc_busid, mp_bus_not_pci);

Do you still claim io_apic has no association with mp_bus_not_pci?

Regards,
Alex.

Quoted 35 lines · Thomas Gleixner
Quoted 14 lines · Alexey Starikovskiy

+++ b/arch/x86/kernel/io_apic_32.c

arch/x86/kernel/io_apic_32.c +7 -0
@@ -81,6 +81,12 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
+int mp_bus_id_to_type[MAX_MP_BUSSES];
+#endif
+
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+
 
+++ b/arch/x86/kernel/io_apic_64.c

arch/x86/kernel/io_apic_32.c struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; · line 121

Quoted 5 lines
arch/x86/kernel/io_apic_32.c +2 -0
@@ -117,6 +117,8 @@ struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
 /* # of MP IRQ source entries */
 int mp_irq_entries;
 
+DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
+

NAK for the whole series. If you want to move out stuff from mpparse, then please look for a useful place, which is

1) related to the code (mp_bus_not_pci has no obvious association to io_apic)

2) not duplicating code into 32/64 bit files again. We work hard on unifying and also distangling things and I refuse to accept a patch which moves code to a random place where it happens to compile.

Thanks,

tglx

#9 lore raw

Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c

Quoted 2 lines · Alexey Starikovskiy

Do you still claim io_apic has no association with mp_bus_not_pci?

No, I was wrong as usual. :) I'd still prefer not to add stuff twice, but unifying io_apic is a tough one.

Thanks,
tglx