提交 fef86db8 编写于 作者: L Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, dmi, debug: Log board name (when present) in dmesg/oops output
  x86, ioapic: Don't warn about non-existing IOAPICs if we have none
  x86: Fix mwait_usable section mismatch
  x86: Readd missing irq_to_desc() in fixup_irq()
  x86: Fix section mismatch in LAPIC initialization
...@@ -233,6 +233,7 @@ extern void sync_Arb_IDs(void); ...@@ -233,6 +233,7 @@ extern void sync_Arb_IDs(void);
extern void init_bsp_APIC(void); extern void init_bsp_APIC(void);
extern void setup_local_APIC(void); extern void setup_local_APIC(void);
extern void end_local_APIC_setup(void); extern void end_local_APIC_setup(void);
extern void bsp_end_local_APIC_setup(void);
extern void init_apic_mappings(void); extern void init_apic_mappings(void);
void register_lapic_address(unsigned long address); void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void); extern void setup_boot_APIC_clock(void);
......
...@@ -32,6 +32,6 @@ extern void arch_unregister_cpu(int); ...@@ -32,6 +32,6 @@ extern void arch_unregister_cpu(int);
DECLARE_PER_CPU(int, cpu_state); DECLARE_PER_CPU(int, cpu_state);
int __cpuinit mwait_usable(const struct cpuinfo_x86 *); int mwait_usable(const struct cpuinfo_x86 *);
#endif /* _ASM_X86_CPU_H */ #endif /* _ASM_X86_CPU_H */
...@@ -1381,12 +1381,17 @@ void __cpuinit end_local_APIC_setup(void) ...@@ -1381,12 +1381,17 @@ void __cpuinit end_local_APIC_setup(void)
#endif #endif
apic_pm_activate(); apic_pm_activate();
}
void __init bsp_end_local_APIC_setup(void)
{
end_local_APIC_setup();
/* /*
* Now that local APIC setup is completed for BP, configure the fault * Now that local APIC setup is completed for BP, configure the fault
* handling for interrupt remapping. * handling for interrupt remapping.
*/ */
if (!smp_processor_id() && intr_remapping_enabled) if (intr_remapping_enabled)
enable_drhd_fault_handling(); enable_drhd_fault_handling();
} }
...@@ -1756,7 +1761,7 @@ int __init APIC_init_uniprocessor(void) ...@@ -1756,7 +1761,7 @@ int __init APIC_init_uniprocessor(void)
enable_IO_APIC(); enable_IO_APIC();
#endif #endif
end_local_APIC_setup(); bsp_end_local_APIC_setup();
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
if (smp_found_config && !skip_ioapic_setup && nr_ioapics) if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
......
...@@ -4002,6 +4002,9 @@ int mp_find_ioapic(u32 gsi) ...@@ -4002,6 +4002,9 @@ int mp_find_ioapic(u32 gsi)
{ {
int i = 0; int i = 0;
if (nr_ioapics == 0)
return -1;
/* Find the IOAPIC that manages this GSI. */ /* Find the IOAPIC that manages this GSI. */
for (i = 0; i < nr_ioapics; i++) { for (i = 0; i < nr_ioapics; i++) {
if ((gsi >= mp_gsi_routing[i].gsi_base) if ((gsi >= mp_gsi_routing[i].gsi_base)
......
...@@ -367,7 +367,8 @@ void fixup_irqs(void) ...@@ -367,7 +367,8 @@ void fixup_irqs(void)
if (irr & (1 << (vector % 32))) { if (irr & (1 << (vector % 32))) {
irq = __this_cpu_read(vector_irq[vector]); irq = __this_cpu_read(vector_irq[vector]);
data = irq_get_irq_data(irq); desc = irq_to_desc(irq);
data = &desc->irq_data;
raw_spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (data->chip->irq_retrigger) if (data->chip->irq_retrigger)
data->chip->irq_retrigger(data); data->chip->irq_retrigger(data);
......
...@@ -92,21 +92,31 @@ void show_regs(struct pt_regs *regs) ...@@ -92,21 +92,31 @@ void show_regs(struct pt_regs *regs)
void show_regs_common(void) void show_regs_common(void)
{ {
const char *board, *product; const char *vendor, *product, *board;
board = dmi_get_system_info(DMI_BOARD_NAME); vendor = dmi_get_system_info(DMI_SYS_VENDOR);
if (!board) if (!vendor)
board = ""; vendor = "";
product = dmi_get_system_info(DMI_PRODUCT_NAME); product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (!product) if (!product)
product = ""; product = "";
/* Board Name is optional */
board = dmi_get_system_info(DMI_BOARD_NAME);
printk(KERN_CONT "\n"); printk(KERN_CONT "\n");
printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s %s/%s\n", printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s",
current->pid, current->comm, print_tainted(), current->pid, current->comm, print_tainted(),
init_utsname()->release, init_utsname()->release,
(int)strcspn(init_utsname()->version, " "), (int)strcspn(init_utsname()->version, " "),
init_utsname()->version, board, product); init_utsname()->version);
printk(KERN_CONT " ");
printk(KERN_CONT "%s %s", vendor, product);
if (board) {
printk(KERN_CONT "/");
printk(KERN_CONT "%s", board);
}
printk(KERN_CONT "\n");
} }
void flush_thread(void) void flush_thread(void)
...@@ -506,7 +516,7 @@ static void poll_idle(void) ...@@ -506,7 +516,7 @@ static void poll_idle(void)
#define MWAIT_ECX_EXTENDED_INFO 0x01 #define MWAIT_ECX_EXTENDED_INFO 0x01
#define MWAIT_EDX_C1 0xf0 #define MWAIT_EDX_C1 0xf0
int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) int mwait_usable(const struct cpuinfo_x86 *c)
{ {
u32 eax, ebx, ecx, edx; u32 eax, ebx, ecx, edx;
......
...@@ -1060,7 +1060,7 @@ static int __init smp_sanity_check(unsigned max_cpus) ...@@ -1060,7 +1060,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
connect_bsp_APIC(); connect_bsp_APIC();
setup_local_APIC(); setup_local_APIC();
end_local_APIC_setup(); bsp_end_local_APIC_setup();
return -1; return -1;
} }
...@@ -1137,7 +1137,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) ...@@ -1137,7 +1137,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
if (!skip_ioapic_setup && nr_ioapics) if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC(); enable_IO_APIC();
end_local_APIC_setup(); bsp_end_local_APIC_setup();
map_cpu_to_logical_apicid(); map_cpu_to_logical_apicid();
......
...@@ -378,10 +378,17 @@ static void __init print_filtered(const char *info) ...@@ -378,10 +378,17 @@ static void __init print_filtered(const char *info)
static void __init dmi_dump_ids(void) static void __init dmi_dump_ids(void)
{ {
const char *board; /* Board Name is optional */
printk(KERN_DEBUG "DMI: "); printk(KERN_DEBUG "DMI: ");
print_filtered(dmi_get_system_info(DMI_BOARD_NAME)); print_filtered(dmi_get_system_info(DMI_SYS_VENDOR));
printk(KERN_CONT "/"); printk(KERN_CONT " ");
print_filtered(dmi_get_system_info(DMI_PRODUCT_NAME)); print_filtered(dmi_get_system_info(DMI_PRODUCT_NAME));
board = dmi_get_system_info(DMI_BOARD_NAME);
if (board) {
printk(KERN_CONT "/");
print_filtered(board);
}
printk(KERN_CONT ", BIOS "); printk(KERN_CONT ", BIOS ");
print_filtered(dmi_get_system_info(DMI_BIOS_VERSION)); print_filtered(dmi_get_system_info(DMI_BIOS_VERSION));
printk(KERN_CONT " "); printk(KERN_CONT " ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册