* [PATCH 1/5] x86: move pic_mode to apic_32.c
@ 2008-05-19 15:46 Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 2/5] x86: move smp_found_config Alexey Starikovskiy
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 15:46 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 6b2c2cf..c0dd696 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -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,
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 59f051d..b72c046 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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;
diff --git a/arch/x86/mach-visws/mpparse.c b/arch/x86/mach-visws/mpparse.c
index 57484e9..b7d063e 100644
--- a/arch/x86/mach-visws/mpparse.c
+++ b/arch/x86/mach-visws/mpparse.c
@@ -11,8 +11,6 @@
/* Have we found an MP table */
int smp_found_config;
-int pic_mode;
-
extern unsigned int __cpuinitdata maxcpus;
/*
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] x86: move smp_found_config
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
@ 2008-05-19 15:47 ` Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed Alexey Starikovskiy
` (3 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 15:47 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index c0dd696..4ed4a2b 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -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,
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 30f3f6a..10fde03 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -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,
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index b72c046..d67cd76 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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",
diff --git a/arch/x86/mach-visws/mpparse.c b/arch/x86/mach-visws/mpparse.c
index b7d063e..a2fb78c 100644
--- a/arch/x86/mach-visws/mpparse.c
+++ b/arch/x86/mach-visws/mpparse.c
@@ -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++);
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index 8acbf0c..6d33541 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -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;
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 2/5] x86: move smp_found_config Alexey Starikovskiy
@ 2008-05-19 15:47 ` Alexey Starikovskiy
2008-05-22 21:50 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed, Thomas Gleixner
2008-05-19 15:47 ` [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c Alexey Starikovskiy
` (2 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 15:47 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 3037aa4..01dfe7c 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -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;
}
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 416154d..e7f7ea7 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -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;
}
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index d67cd76..83dfd66 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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) {
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
index 57a991b..b785ddd 100644
--- a/include/asm-x86/mpspec.h
+++ b/include/asm-x86/mpspec.h
@@ -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;
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 2/5] x86: move smp_found_config Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed Alexey Starikovskiy
@ 2008-05-19 15:47 ` Alexey Starikovskiy
2008-05-22 22:00 ` Thomas Gleixner
2008-05-19 15:47 ` [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs Alexey Starikovskiy
2008-05-22 21:45 ` [PATCH 1/5] x86: move pic_mode to apic_32.c Thomas Gleixner
4 siblings, 1 reply; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 15:47 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 01dfe7c..f848ec0 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -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;
/*
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index e7f7ea7..27842b0 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -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.
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 83dfd66..e8e041e 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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.
*/
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
` (2 preceding siblings ...)
2008-05-19 15:47 ` [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c Alexey Starikovskiy
@ 2008-05-19 15:47 ` Alexey Starikovskiy
2008-05-19 20:08 ` Yinghai Lu
2008-05-22 21:45 ` [PATCH 1/5] x86: move pic_mode to apic_32.c Thomas Gleixner
4 siblings, 1 reply; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 15:47 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 5eb480e..f27de28 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -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
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 089ddfa..c86bda7 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -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;
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 12a31de..9af0d5f 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -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
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 9234675..8047db9 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -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();
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs
2008-05-19 15:47 ` [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs Alexey Starikovskiy
@ 2008-05-19 20:08 ` Yinghai Lu
2008-05-19 20:29 ` [PATCH] " Alexey Starikovskiy
0 siblings, 1 reply; 16+ messages in thread
From: Yinghai Lu @ 2008-05-19 20:08 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: mingo, linux-kernel
On Mon, May 19, 2008 at 8:47 AM, Alexey Starikovskiy
<astarikovskiy@suse.de> wrote:
> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> ---
>
> 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(-)
>
>
> diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
> index 5eb480e..f27de28 100644
> --- a/arch/x86/Kconfig.debug
> +++ b/arch/x86/Kconfig.debug
> @@ -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
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 089ddfa..c86bda7 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -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;
>
> diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
> index 12a31de..9af0d5f 100644
> --- a/arch/x86/kernel/setup_32.c
> +++ b/arch/x86/kernel/setup_32.c
> @@ -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
> diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
> index 9234675..8047db9 100644
> --- a/arch/x86/kernel/setup_64.c
> +++ b/arch/x86/kernel/setup_64.c
> @@ -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.
> #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.
> init_apic_mappings();
> ioapic_init_mappings();
YH
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] x86: allow MPPARSE to be deselected in SMP configs
2008-05-19 20:08 ` Yinghai Lu
@ 2008-05-19 20:29 ` Alexey Starikovskiy
0 siblings, 0 replies; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-19 20:29 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 5eb480e..f27de28 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -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
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 089ddfa..c86bda7 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -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;
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 12a31de..9af0d5f 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -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
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 9234675..88f0ac2 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -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();
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/5] x86: move pic_mode to apic_32.c
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
` (3 preceding siblings ...)
2008-05-19 15:47 ` [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs Alexey Starikovskiy
@ 2008-05-22 21:45 ` Thomas Gleixner
2008-05-22 21:54 ` [PATCH 1/2] x86: Set pic_mode only if local apic code is present Alexey Starikovskiy
2008-05-22 21:54 ` [PATCH 2/2] x86: move pic_mode to apic_32.c Alexey Starikovskiy
4 siblings, 2 replies; 16+ messages in thread
From: Thomas Gleixner @ 2008-05-22 21:45 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: mingo, linux-kernel
On Mon, 19 May 2008, Alexey Starikovskiy wrote:
>
> 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,
2008-05-19 15:47 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed Alexey Starikovskiy
@ 2008-05-22 21:50 ` Thomas Gleixner
2008-05-22 21:59 ` Randy.Dunlap
0 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2008-05-22 21:50 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: mingo, linux-kernel
On Mon, 19 May 2008, Alexey Starikovskiy wrote:
> @@ -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
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] x86: Set pic_mode only if local apic code is present
2008-05-22 21:45 ` [PATCH 1/5] x86: move pic_mode to apic_32.c Thomas Gleixner
@ 2008-05-22 21:54 ` Alexey Starikovskiy
2008-05-22 21:54 ` [PATCH 2/2] x86: move pic_mode to apic_32.c Alexey Starikovskiy
1 sibling, 0 replies; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-22 21:54 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
arch/x86/kernel/mpparse.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 59f051d..e61523a 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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;
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] x86: move pic_mode to apic_32.c
2008-05-22 21:45 ` [PATCH 1/5] x86: move pic_mode to apic_32.c Thomas Gleixner
2008-05-22 21:54 ` [PATCH 1/2] x86: Set pic_mode only if local apic code is present Alexey Starikovskiy
@ 2008-05-22 21:54 ` Alexey Starikovskiy
1 sibling, 0 replies; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-22 21:54 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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(-)
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 6b2c2cf..c0dd696 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -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,
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index e61523a..b72c046 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -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:
*/
diff --git a/arch/x86/mach-visws/mpparse.c b/arch/x86/mach-visws/mpparse.c
index 57484e9..b7d063e 100644
--- a/arch/x86/mach-visws/mpparse.c
+++ b/arch/x86/mach-visws/mpparse.c
@@ -11,8 +11,6 @@
/* Have we found an MP table */
int smp_found_config;
-int pic_mode;
-
extern unsigned int __cpuinitdata maxcpus;
/*
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,
2008-05-22 21:50 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed, Thomas Gleixner
@ 2008-05-22 21:59 ` Randy.Dunlap
2008-05-22 22:02 ` Maciej W. Rozycki
0 siblings, 1 reply; 16+ messages in thread
From: Randy.Dunlap @ 2008-05-22 21:59 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Alexey Starikovskiy, mingo, linux-kernel
On Thu, 22 May 2008, Thomas Gleixner wrote:
> On Mon, 19 May 2008, Alexey Starikovskiy wrote:
> > @@ -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.
--
~Randy
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c
2008-05-19 15:47 ` [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c Alexey Starikovskiy
@ 2008-05-22 22:00 ` Thomas Gleixner
2008-05-22 22:11 ` Alexey Starikovskiy
0 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2008-05-22 22:00 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: mingo, linux-kernel
On Mon, 19 May 2008, Alexey Starikovskiy wrote:
> +++ b/arch/x86/kernel/io_apic_32.c
> @@ -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
> @@ -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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed,
2008-05-22 21:59 ` Randy.Dunlap
@ 2008-05-22 22:02 ` Maciej W. Rozycki
0 siblings, 0 replies; 16+ messages in thread
From: Maciej W. Rozycki @ 2008-05-22 22:02 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Thomas Gleixner, Alexey Starikovskiy, mingo, linux-kernel
On Thu, 22 May 2008, Randy.Dunlap wrote:
> 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c
2008-05-22 22:00 ` Thomas Gleixner
@ 2008-05-22 22:11 ` Alexey Starikovskiy
2008-05-23 7:09 ` Thomas Gleixner
0 siblings, 1 reply; 16+ messages in thread
From: Alexey Starikovskiy @ 2008-05-22 22:11 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: mingo, linux-kernel
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.
Thomas Gleixner wrote:
> On Mon, 19 May 2008, Alexey Starikovskiy wrote:
>
>> +++ b/arch/x86/kernel/io_apic_32.c
>> @@ -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
>> @@ -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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c
2008-05-22 22:11 ` Alexey Starikovskiy
@ 2008-05-23 7:09 ` Thomas Gleixner
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2008-05-23 7:09 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: mingo, linux-kernel
On Fri, 23 May 2008, Alexey Starikovskiy wrote:
>
> 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
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-05-23 7:09 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19 15:46 [PATCH 1/5] x86: move pic_mode to apic_32.c Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 2/5] x86: move smp_found_config Alexey Starikovskiy
2008-05-19 15:47 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed Alexey Starikovskiy
2008-05-22 21:50 ` [PATCH 3/5] x86: mp_bus_id_to_pci_bus is not needed, Thomas Gleixner
2008-05-22 21:59 ` Randy.Dunlap
2008-05-22 22:02 ` Maciej W. Rozycki
2008-05-19 15:47 ` [PATCH 4/5] x86: move mp_bus_not_pci from mpparse.c Alexey Starikovskiy
2008-05-22 22:00 ` Thomas Gleixner
2008-05-22 22:11 ` Alexey Starikovskiy
2008-05-23 7:09 ` Thomas Gleixner
2008-05-19 15:47 ` [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs Alexey Starikovskiy
2008-05-19 20:08 ` Yinghai Lu
2008-05-19 20:29 ` [PATCH] " Alexey Starikovskiy
2008-05-22 21:45 ` [PATCH 1/5] x86: move pic_mode to apic_32.c Thomas Gleixner
2008-05-22 21:54 ` [PATCH 1/2] x86: Set pic_mode only if local apic code is present Alexey Starikovskiy
2008-05-22 21:54 ` [PATCH 2/2] x86: move pic_mode to apic_32.c Alexey Starikovskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox