aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/boot/video-vga.c3
-rw-r--r--arch/x86/include/asm/io_apic.h4
-rw-r--r--arch/x86/include/asm/percpu.h2
-rw-r--r--arch/x86/include/asm/pgtable_32_types.h2
-rw-r--r--arch/x86/include/asm/system.h2
-rw-r--r--arch/x86/kernel/acpi/boot.c8
-rw-r--r--arch/x86/kernel/apic/io_apic.c12
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c1
-rw-r--r--arch/x86/kernel/e820.c2
-rw-r--r--arch/x86/kernel/mpparse.c2
-rw-r--r--arch/x86/kernel/pci-calgary_64.c15
-rw-r--r--arch/x86/kernel/reboot.c8
-rw-r--r--arch/x86/kernel/sfi.c2
-rw-r--r--arch/x86/mm/pat.c2
-rw-r--r--arch/x86/mm/pat_rbtree.c1
15 files changed, 41 insertions, 25 deletions
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index ed7aeff786b2..45bc9402aa49 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -41,13 +41,12 @@ static __videocard video_vga;
41static u8 vga_set_basic_mode(void) 41static u8 vga_set_basic_mode(void)
42{ 42{
43 struct biosregs ireg, oreg; 43 struct biosregs ireg, oreg;
44 u16 ax;
45 u8 mode; 44 u8 mode;
46 45
47 initregs(&ireg); 46 initregs(&ireg);
48 47
49 /* Query current mode */ 48 /* Query current mode */
50 ax = 0x0f00; 49 ireg.ax = 0x0f00;
51 intcall(0x10, &ireg, &oreg); 50 intcall(0x10, &ireg, &oreg);
52 mode = oreg.al; 51 mode = oreg.al;
53 52
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 63cb4096c3dc..9cb2edb87c2f 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -183,7 +183,7 @@ struct mp_ioapic_gsi{
183 u32 gsi_end; 183 u32 gsi_end;
184}; 184};
185extern struct mp_ioapic_gsi mp_gsi_routing[]; 185extern struct mp_ioapic_gsi mp_gsi_routing[];
186extern u32 gsi_end; 186extern u32 gsi_top;
187int mp_find_ioapic(u32 gsi); 187int mp_find_ioapic(u32 gsi);
188int mp_find_ioapic_pin(int ioapic, u32 gsi); 188int mp_find_ioapic_pin(int ioapic, u32 gsi);
189void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); 189void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
@@ -197,7 +197,7 @@ static const int timer_through_8259 = 0;
197static inline void ioapic_init_mappings(void) { } 197static inline void ioapic_init_mappings(void) { }
198static inline void ioapic_insert_resources(void) { } 198static inline void ioapic_insert_resources(void) { }
199static inline void probe_nr_irqs_gsi(void) { } 199static inline void probe_nr_irqs_gsi(void) { }
200#define gsi_end (NR_IRQS_LEGACY - 1) 200#define gsi_top (NR_IRQS_LEGACY)
201static inline int mp_find_ioapic(u32 gsi) { return 0; } 201static inline int mp_find_ioapic(u32 gsi) { return 0; }
202 202
203struct io_apic_irq_attr; 203struct io_apic_irq_attr;
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index 0797e748d280..cd28f9ad910d 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -77,6 +77,7 @@ do { \
77 if (0) { \ 77 if (0) { \
78 pto_T__ pto_tmp__; \ 78 pto_T__ pto_tmp__; \
79 pto_tmp__ = (val); \ 79 pto_tmp__ = (val); \
80 (void)pto_tmp__; \
80 } \ 81 } \
81 switch (sizeof(var)) { \ 82 switch (sizeof(var)) { \
82 case 1: \ 83 case 1: \
@@ -115,6 +116,7 @@ do { \
115 if (0) { \ 116 if (0) { \
116 pao_T__ pao_tmp__; \ 117 pao_T__ pao_tmp__; \
117 pao_tmp__ = (val); \ 118 pao_tmp__ = (val); \
119 (void)pao_tmp__; \
118 } \ 120 } \
119 switch (sizeof(var)) { \ 121 switch (sizeof(var)) { \
120 case 1: \ 122 case 1: \
diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
index 5e67c1532314..ed5903be26fe 100644
--- a/arch/x86/include/asm/pgtable_32_types.h
+++ b/arch/x86/include/asm/pgtable_32_types.h
@@ -26,7 +26,7 @@
26 */ 26 */
27#define VMALLOC_OFFSET (8 * 1024 * 1024) 27#define VMALLOC_OFFSET (8 * 1024 * 1024)
28 28
29#ifndef __ASSEMBLER__ 29#ifndef __ASSEMBLY__
30extern bool __vmalloc_start_set; /* set once high_memory is set */ 30extern bool __vmalloc_start_set; /* set once high_memory is set */
31#endif 31#endif
32 32
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b8fe48ee2ed9..e7f4d33c55ed 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -451,7 +451,7 @@ void stop_this_cpu(void *dummy);
451 * 451 *
452 * (Could use an alternative three way for this if there was one.) 452 * (Could use an alternative three way for this if there was one.)
453 */ 453 */
454static inline void rdtsc_barrier(void) 454static __always_inline void rdtsc_barrier(void)
455{ 455{
456 alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC); 456 alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
457 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); 457 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
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 */
90struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS]; 90struct 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 */
93u32 gsi_end; 93u32 gsi_top;
94 94
95/* MP IRQ source entries */ 95/* MP IRQ source entries */
96struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; 96struct 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_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
129static void print_MP_intsrc_info(struct mpc_intsrc *m) 129static 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 */
113static const unsigned long tar_offsets[] = { 118static 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/mm/pat.c b/arch/x86/mm/pat.c
index acc15b23b743..64121a18b8cb 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -302,7 +302,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
302 return -EINVAL; 302 return -EINVAL;
303 } 303 }
304 304
305 new = kmalloc(sizeof(struct memtype), GFP_KERNEL); 305 new = kzalloc(sizeof(struct memtype), GFP_KERNEL);
306 if (!new) 306 if (!new)
307 return -ENOMEM; 307 return -ENOMEM;
308 308
diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
index f537087bb740..f20eeec85a86 100644
--- a/arch/x86/mm/pat_rbtree.c
+++ b/arch/x86/mm/pat_rbtree.c
@@ -226,6 +226,7 @@ int rbt_memtype_check_insert(struct memtype *new, unsigned long *ret_type)
226 if (ret_type) 226 if (ret_type)
227 new->type = *ret_type; 227 new->type = *ret_type;
228 228
229 new->subtree_max_end = new->end;
229 memtype_rb_insert(&memtype_rbroot, new); 230 memtype_rb_insert(&memtype_rbroot, new);
230 } 231 }
231 return err; 232 return err;