diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_amd.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/sfi.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/traps.c | 11 |
10 files changed, 44 insertions, 21 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 60cc4058ed5f..c05872aa3ce0 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -118,7 +118,7 @@ static unsigned int gsi_to_irq(unsigned int gsi) | |||
118 | if (gsi >= NR_IRQS_LEGACY) | 118 | if (gsi >= NR_IRQS_LEGACY) |
119 | irq = gsi; | 119 | irq = gsi; |
120 | else | 120 | else |
121 | irq = gsi_end + 1 + gsi; | 121 | irq = gsi_top + gsi; |
122 | 122 | ||
123 | return irq; | 123 | return irq; |
124 | } | 124 | } |
@@ -129,10 +129,10 @@ static u32 irq_to_gsi(int irq) | |||
129 | 129 | ||
130 | if (irq < NR_IRQS_LEGACY) | 130 | if (irq < NR_IRQS_LEGACY) |
131 | gsi = isa_irq_to_gsi[irq]; | 131 | gsi = isa_irq_to_gsi[irq]; |
132 | else if (irq <= gsi_end) | 132 | else if (irq < gsi_top) |
133 | gsi = irq; | 133 | gsi = irq; |
134 | else if (irq <= (gsi_end + NR_IRQS_LEGACY)) | 134 | else if (irq < (gsi_top + NR_IRQS_LEGACY)) |
135 | gsi = irq - gsi_end; | 135 | gsi = irq - gsi_top; |
136 | else | 136 | else |
137 | gsi = 0xffffffff; | 137 | gsi = 0xffffffff; |
138 | 138 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 33f3563a2a52..e41ed24ab26d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -89,8 +89,8 @@ int nr_ioapics; | |||
89 | /* IO APIC gsi routing info */ | 89 | /* IO APIC gsi routing info */ |
90 | struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS]; | 90 | struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS]; |
91 | 91 | ||
92 | /* The last gsi number used */ | 92 | /* The one past the highest gsi number used */ |
93 | u32 gsi_end; | 93 | u32 gsi_top; |
94 | 94 | ||
95 | /* MP IRQ source entries */ | 95 | /* MP IRQ source entries */ |
96 | struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 96 | struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
@@ -1035,7 +1035,7 @@ static int pin_2_irq(int idx, int apic, int pin) | |||
1035 | if (gsi >= NR_IRQS_LEGACY) | 1035 | if (gsi >= NR_IRQS_LEGACY) |
1036 | irq = gsi; | 1036 | irq = gsi; |
1037 | else | 1037 | else |
1038 | irq = gsi_end + 1 + gsi; | 1038 | irq = gsi_top + gsi; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | #ifdef CONFIG_X86_32 | 1041 | #ifdef CONFIG_X86_32 |
@@ -3853,7 +3853,7 @@ void __init probe_nr_irqs_gsi(void) | |||
3853 | { | 3853 | { |
3854 | int nr; | 3854 | int nr; |
3855 | 3855 | ||
3856 | nr = gsi_end + 1 + NR_IRQS_LEGACY; | 3856 | nr = gsi_top + NR_IRQS_LEGACY; |
3857 | if (nr > nr_irqs_gsi) | 3857 | if (nr > nr_irqs_gsi) |
3858 | nr_irqs_gsi = nr; | 3858 | nr_irqs_gsi = nr; |
3859 | 3859 | ||
@@ -4294,8 +4294,8 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
4294 | */ | 4294 | */ |
4295 | nr_ioapic_registers[idx] = entries; | 4295 | nr_ioapic_registers[idx] = entries; |
4296 | 4296 | ||
4297 | if (mp_gsi_routing[idx].gsi_end > gsi_end) | 4297 | if (mp_gsi_routing[idx].gsi_end >= gsi_top) |
4298 | gsi_end = mp_gsi_routing[idx].gsi_end; | 4298 | gsi_top = mp_gsi_routing[idx].gsi_end + 1; |
4299 | 4299 | ||
4300 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " | 4300 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " |
4301 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, | 4301 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, |
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index 611df11ba15e..c2897b7b4a3b 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -102,8 +102,8 @@ static const u64 amd_perfmon_event_map[] = | |||
102 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, | 102 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, |
103 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, | 103 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, |
104 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, | 104 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, |
105 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, | 105 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2, |
106 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, | 106 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static u64 amd_pmu_event_map(int hw_event) | 109 | static u64 amd_pmu_event_map(int hw_event) |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index fdbc652d3feb..214ac860ebe0 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -72,6 +72,7 @@ static struct event_constraint intel_westmere_event_constraints[] = | |||
72 | INTEL_EVENT_CONSTRAINT(0x51, 0x3), /* L1D */ | 72 | INTEL_EVENT_CONSTRAINT(0x51, 0x3), /* L1D */ |
73 | INTEL_EVENT_CONSTRAINT(0x60, 0x1), /* OFFCORE_REQUESTS_OUTSTANDING */ | 73 | INTEL_EVENT_CONSTRAINT(0x60, 0x1), /* OFFCORE_REQUESTS_OUTSTANDING */ |
74 | INTEL_EVENT_CONSTRAINT(0x63, 0x3), /* CACHE_LOCK_CYCLES */ | 74 | INTEL_EVENT_CONSTRAINT(0x63, 0x3), /* CACHE_LOCK_CYCLES */ |
75 | INTEL_EVENT_CONSTRAINT(0xb3, 0x1), /* SNOOPQ_REQUEST_OUTSTANDING */ | ||
75 | EVENT_CONSTRAINT_END | 76 | EVENT_CONSTRAINT_END |
76 | }; | 77 | }; |
77 | 78 | ||
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 7bca3c6a02fb..0d6fc71bedb1 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -729,7 +729,7 @@ static int __init e820_mark_nvs_memory(void) | |||
729 | struct e820entry *ei = &e820.map[i]; | 729 | struct e820entry *ei = &e820.map[i]; |
730 | 730 | ||
731 | if (ei->type == E820_NVS) | 731 | if (ei->type == E820_NVS) |
732 | hibernate_nvs_register(ei->addr, ei->size); | 732 | suspend_nvs_register(ei->addr, ei->size); |
733 | } | 733 | } |
734 | 734 | ||
735 | return 0; | 735 | return 0; |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 5ae5d2426edf..d86dbf7e54be 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -123,7 +123,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m) | |||
123 | printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n", | 123 | printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n", |
124 | m->apicid, m->apicver, m->apicaddr); | 124 | m->apicid, m->apicver, m->apicaddr); |
125 | 125 | ||
126 | mp_register_ioapic(m->apicid, m->apicaddr, gsi_end + 1); | 126 | mp_register_ioapic(m->apicid, m->apicaddr, gsi_top); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void print_MP_intsrc_info(struct mpc_intsrc *m) | 129 | static void print_MP_intsrc_info(struct mpc_intsrc *m) |
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index fb99f7edb341..0b96b5589f08 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -103,11 +103,16 @@ int use_calgary __read_mostly = 0; | |||
103 | #define PMR_SOFTSTOPFAULT 0x40000000 | 103 | #define PMR_SOFTSTOPFAULT 0x40000000 |
104 | #define PMR_HARDSTOP 0x20000000 | 104 | #define PMR_HARDSTOP 0x20000000 |
105 | 105 | ||
106 | #define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */ | 106 | /* |
107 | #define MAX_NUM_CHASSIS 8 /* max number of chassis */ | 107 | * The maximum PHB bus number. |
108 | /* MAX_PHB_BUS_NUM is the maximal possible dev->bus->number */ | 108 | * x3950M2 (rare): 8 chassis, 48 PHBs per chassis = 384 |
109 | #define MAX_PHB_BUS_NUM (MAX_NUM_OF_PHBS * MAX_NUM_CHASSIS * 2) | 109 | * x3950M2: 4 chassis, 48 PHBs per chassis = 192 |
110 | #define PHBS_PER_CALGARY 4 | 110 | * x3950 (PCIE): 8 chassis, 32 PHBs per chassis = 256 |
111 | * x3950 (PCIX): 8 chassis, 16 PHBs per chassis = 128 | ||
112 | */ | ||
113 | #define MAX_PHB_BUS_NUM 384 | ||
114 | |||
115 | #define PHBS_PER_CALGARY 4 | ||
111 | 116 | ||
112 | /* register offsets in Calgary's internal register space */ | 117 | /* register offsets in Calgary's internal register space */ |
113 | static const unsigned long tar_offsets[] = { | 118 | static const unsigned long tar_offsets[] = { |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 8e1aac86b50c..e3af342fe83a 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -228,6 +228,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
228 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400"), | 228 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400"), |
229 | }, | 229 | }, |
230 | }, | 230 | }, |
231 | { /* Handle problems with rebooting on Dell T7400's */ | ||
232 | .callback = set_bios_reboot, | ||
233 | .ident = "Dell Precision T7400", | ||
234 | .matches = { | ||
235 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
236 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T7400"), | ||
237 | }, | ||
238 | }, | ||
231 | { /* Handle problems with rebooting on HP laptops */ | 239 | { /* Handle problems with rebooting on HP laptops */ |
232 | .callback = set_bios_reboot, | 240 | .callback = set_bios_reboot, |
233 | .ident = "HP Compaq Laptop", | 241 | .ident = "HP Compaq Laptop", |
diff --git a/arch/x86/kernel/sfi.c b/arch/x86/kernel/sfi.c index 7ded57896c0a..cb22acf3ed09 100644 --- a/arch/x86/kernel/sfi.c +++ b/arch/x86/kernel/sfi.c | |||
@@ -93,7 +93,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table) | |||
93 | pentry = (struct sfi_apic_table_entry *)sb->pentry; | 93 | pentry = (struct sfi_apic_table_entry *)sb->pentry; |
94 | 94 | ||
95 | for (i = 0; i < num; i++) { | 95 | for (i = 0; i < num; i++) { |
96 | mp_register_ioapic(i, pentry->phys_addr, gsi_end + 1); | 96 | mp_register_ioapic(i, pentry->phys_addr, gsi_top); |
97 | pentry++; | 97 | pentry++; |
98 | } | 98 | } |
99 | 99 | ||
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 142d70c74b02..725ef4d17cd5 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -526,6 +526,7 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs) | |||
526 | dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | 526 | dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) |
527 | { | 527 | { |
528 | struct task_struct *tsk = current; | 528 | struct task_struct *tsk = current; |
529 | int user_icebp = 0; | ||
529 | unsigned long dr6; | 530 | unsigned long dr6; |
530 | int si_code; | 531 | int si_code; |
531 | 532 | ||
@@ -534,6 +535,14 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
534 | /* Filter out all the reserved bits which are preset to 1 */ | 535 | /* Filter out all the reserved bits which are preset to 1 */ |
535 | dr6 &= ~DR6_RESERVED; | 536 | dr6 &= ~DR6_RESERVED; |
536 | 537 | ||
538 | /* | ||
539 | * If dr6 has no reason to give us about the origin of this trap, | ||
540 | * then it's very likely the result of an icebp/int01 trap. | ||
541 | * User wants a sigtrap for that. | ||
542 | */ | ||
543 | if (!dr6 && user_mode(regs)) | ||
544 | user_icebp = 1; | ||
545 | |||
537 | /* Catch kmemcheck conditions first of all! */ | 546 | /* Catch kmemcheck conditions first of all! */ |
538 | if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) | 547 | if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) |
539 | return; | 548 | return; |
@@ -575,7 +584,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
575 | regs->flags &= ~X86_EFLAGS_TF; | 584 | regs->flags &= ~X86_EFLAGS_TF; |
576 | } | 585 | } |
577 | si_code = get_si_code(tsk->thread.debugreg6); | 586 | si_code = get_si_code(tsk->thread.debugreg6); |
578 | if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS)) | 587 | if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp) |
579 | send_sigtrap(tsk, regs, error_code, si_code); | 588 | send_sigtrap(tsk, regs, error_code, si_code); |
580 | preempt_conditional_cli(regs); | 589 | preempt_conditional_cli(regs); |
581 | 590 | ||