Commit 93394a76 authored by Ingo Molnar's avatar Ingo Molnar

Merge branches 'x86/apic', 'x86/cleanups' and 'x86/mm' into x86/core

...@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type); ...@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type);
extern void e820_add_region(u64 start, u64 size, int type); extern void e820_add_region(u64 start, u64 size, int type);
extern void e820_print_map(char *who); extern void e820_print_map(char *who);
extern int extern int
sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
unsigned new_type); unsigned new_type);
extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
......
...@@ -1430,7 +1430,6 @@ void __setup_vector_irq(int cpu) ...@@ -1430,7 +1430,6 @@ void __setup_vector_irq(int cpu)
static struct irq_chip ioapic_chip; static struct irq_chip ioapic_chip;
static struct irq_chip ir_ioapic_chip; static struct irq_chip ir_ioapic_chip;
static struct irq_chip msi_ir_chip;
#define IOAPIC_AUTO -1 #define IOAPIC_AUTO -1
#define IOAPIC_EDGE 0 #define IOAPIC_EDGE 0
...@@ -2665,20 +2664,20 @@ static struct irq_chip ioapic_chip __read_mostly = { ...@@ -2665,20 +2664,20 @@ static struct irq_chip ioapic_chip __read_mostly = {
.retrigger = ioapic_retrigger_irq, .retrigger = ioapic_retrigger_irq,
}; };
#ifdef CONFIG_INTR_REMAP
static struct irq_chip ir_ioapic_chip __read_mostly = { static struct irq_chip ir_ioapic_chip __read_mostly = {
.name = "IR-IO-APIC", .name = "IR-IO-APIC",
.startup = startup_ioapic_irq, .startup = startup_ioapic_irq,
.mask = mask_IO_APIC_irq, .mask = mask_IO_APIC_irq,
.unmask = unmask_IO_APIC_irq, .unmask = unmask_IO_APIC_irq,
#ifdef CONFIG_INTR_REMAP
.ack = ack_x2apic_edge, .ack = ack_x2apic_edge,
.eoi = ack_x2apic_level, .eoi = ack_x2apic_level,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.set_affinity = set_ir_ioapic_affinity_irq, .set_affinity = set_ir_ioapic_affinity_irq,
#endif
#endif #endif
.retrigger = ioapic_retrigger_irq, .retrigger = ioapic_retrigger_irq,
}; };
#endif
static inline void init_IO_APIC_traps(void) static inline void init_IO_APIC_traps(void)
{ {
...@@ -3393,18 +3392,18 @@ static struct irq_chip msi_chip = { ...@@ -3393,18 +3392,18 @@ static struct irq_chip msi_chip = {
.retrigger = ioapic_retrigger_irq, .retrigger = ioapic_retrigger_irq,
}; };
#ifdef CONFIG_INTR_REMAP
static struct irq_chip msi_ir_chip = { static struct irq_chip msi_ir_chip = {
.name = "IR-PCI-MSI", .name = "IR-PCI-MSI",
.unmask = unmask_msi_irq, .unmask = unmask_msi_irq,
.mask = mask_msi_irq, .mask = mask_msi_irq,
#ifdef CONFIG_INTR_REMAP
.ack = ack_x2apic_edge, .ack = ack_x2apic_edge,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.set_affinity = ir_set_msi_irq_affinity, .set_affinity = ir_set_msi_irq_affinity,
#endif
#endif #endif
.retrigger = ioapic_retrigger_irq, .retrigger = ioapic_retrigger_irq,
}; };
#endif
/* /*
* Map the PCI dev to the corresponding remapping hardware unit * Map the PCI dev to the corresponding remapping hardware unit
......
...@@ -10,17 +10,17 @@ struct cpu_model_info { ...@@ -10,17 +10,17 @@ struct cpu_model_info {
/* attempt to consolidate cpu attributes */ /* attempt to consolidate cpu attributes */
struct cpu_dev { struct cpu_dev {
const char * c_vendor; const char *c_vendor;
/* some have two possibilities for cpuid string */ /* some have two possibilities for cpuid string */
const char * c_ident[2]; const char *c_ident[2];
struct cpu_model_info c_models[4]; struct cpu_model_info c_models[4];
void (*c_early_init)(struct cpuinfo_x86 *c); void (*c_early_init)(struct cpuinfo_x86 *);
void (*c_init)(struct cpuinfo_x86 * c); void (*c_init)(struct cpuinfo_x86 *);
void (*c_identify)(struct cpuinfo_x86 * c); void (*c_identify)(struct cpuinfo_x86 *);
unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size); unsigned int (*c_size_cache)(struct cpuinfo_x86 *, unsigned int);
int c_x86_vendor; int c_x86_vendor;
}; };
......
...@@ -233,7 +233,7 @@ void __init e820_print_map(char *who) ...@@ -233,7 +233,7 @@ void __init e820_print_map(char *who)
*/ */
int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
int *pnr_map) u32 *pnr_map)
{ {
struct change_member { struct change_member {
struct e820entry *pbios; /* pointer to original bios entry */ struct e820entry *pbios; /* pointer to original bios entry */
...@@ -552,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, ...@@ -552,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type,
void __init update_e820(void) void __init update_e820(void)
{ {
int nr_map; u32 nr_map;
nr_map = e820.nr_map; nr_map = e820.nr_map;
if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map)) if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map))
...@@ -563,7 +563,7 @@ void __init update_e820(void) ...@@ -563,7 +563,7 @@ void __init update_e820(void)
} }
static void __init update_e820_saved(void) static void __init update_e820_saved(void)
{ {
int nr_map; u32 nr_map;
nr_map = e820_saved.nr_map; nr_map = e820_saved.nr_map;
if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map)) if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map))
...@@ -1303,7 +1303,7 @@ early_param("memmap", parse_memmap_opt); ...@@ -1303,7 +1303,7 @@ early_param("memmap", parse_memmap_opt);
void __init finish_e820_parsing(void) void __init finish_e820_parsing(void)
{ {
if (userdef) { if (userdef) {
int nr = e820.nr_map; u32 nr = e820.nr_map;
if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0) if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0)
early_panic("Invalid user supplied memory map"); early_panic("Invalid user supplied memory map");
...@@ -1386,7 +1386,7 @@ void __init e820_reserve_resources_late(void) ...@@ -1386,7 +1386,7 @@ void __init e820_reserve_resources_late(void)
char *__init default_machine_specific_memory_setup(void) char *__init default_machine_specific_memory_setup(void)
{ {
char *who = "BIOS-e820"; char *who = "BIOS-e820";
int new_nr; u32 new_nr;
/* /*
* Try to copy the BIOS-supplied E820-map. * Try to copy the BIOS-supplied E820-map.
* *
......
...@@ -58,6 +58,11 @@ static int show_other_interrupts(struct seq_file *p, int prec) ...@@ -58,6 +58,11 @@ static int show_other_interrupts(struct seq_file *p, int prec)
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs);
seq_printf(p, " Local timer interrupts\n"); seq_printf(p, " Local timer interrupts\n");
seq_printf(p, "%*s: ", prec, "SPU");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
seq_printf(p, " Spurious interrupts\n");
#endif #endif
if (generic_interrupt_extension) { if (generic_interrupt_extension) {
seq_printf(p, "PLT: "); seq_printf(p, "PLT: ");
...@@ -90,12 +95,6 @@ static int show_other_interrupts(struct seq_file *p, int prec) ...@@ -90,12 +95,6 @@ static int show_other_interrupts(struct seq_file *p, int prec)
seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count); seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count);
seq_printf(p, " Threshold APIC interrupts\n"); seq_printf(p, " Threshold APIC interrupts\n");
# endif # endif
#endif
#ifdef CONFIG_X86_LOCAL_APIC
seq_printf(p, "%*s: ", prec, "SPU");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
seq_printf(p, " Spurious interrupts\n");
#endif #endif
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
#if defined(CONFIG_X86_IO_APIC) #if defined(CONFIG_X86_IO_APIC)
...@@ -133,23 +132,15 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -133,23 +132,15 @@ int show_interrupts(struct seq_file *p, void *v)
return 0; return 0;
spin_lock_irqsave(&desc->lock, flags); spin_lock_irqsave(&desc->lock, flags);
#ifndef CONFIG_SMP
any_count = kstat_irqs(i);
#else
for_each_online_cpu(j) for_each_online_cpu(j)
any_count |= kstat_irqs_cpu(i, j); any_count |= kstat_irqs_cpu(i, j);
#endif
action = desc->action; action = desc->action;
if (!action && !any_count) if (!action && !any_count)
goto out; goto out;
seq_printf(p, "%*d: ", prec, i); seq_printf(p, "%*d: ", prec, i);
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
#endif
seq_printf(p, " %8s", desc->chip->name); seq_printf(p, " %8s", desc->chip->name);
seq_printf(p, "-%-8s", desc->name); seq_printf(p, "-%-8s", desc->name);
...@@ -174,6 +165,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) ...@@ -174,6 +165,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
sum += irq_stats(cpu)->apic_timer_irqs; sum += irq_stats(cpu)->apic_timer_irqs;
sum += irq_stats(cpu)->irq_spurious_count;
#endif #endif
if (generic_interrupt_extension) if (generic_interrupt_extension)
sum += irq_stats(cpu)->generic_irqs; sum += irq_stats(cpu)->generic_irqs;
...@@ -187,9 +179,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu) ...@@ -187,9 +179,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
# ifdef CONFIG_X86_64 # ifdef CONFIG_X86_64
sum += irq_stats(cpu)->irq_threshold_count; sum += irq_stats(cpu)->irq_threshold_count;
#endif #endif
#endif
#ifdef CONFIG_X86_LOCAL_APIC
sum += irq_stats(cpu)->irq_spurious_count;
#endif #endif
return sum; return sum;
} }
......
...@@ -516,7 +516,7 @@ void __init early_ioremap_init(void) ...@@ -516,7 +516,7 @@ void __init early_ioremap_init(void)
printk(KERN_INFO "early_ioremap_init()\n"); printk(KERN_INFO "early_ioremap_init()\n");
for (i = 0; i < FIX_BTMAPS_SLOTS; i++) for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
memset(bm_pte, 0, sizeof(bm_pte)); memset(bm_pte, 0, sizeof(bm_pte));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment