aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Makefile8
-rw-r--r--arch/i386/defconfig30
-rw-r--r--arch/i386/kernel/acpi/boot.c10
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c8
-rw-r--r--arch/i386/kernel/apm.c2
-rw-r--r--arch/i386/kernel/head.S2
-rw-r--r--arch/i386/kernel/io_apic.c96
-rw-r--r--arch/i386/kernel/kprobes.c22
-rw-r--r--arch/i386/kernel/microcode.c2
-rw-r--r--arch/i386/kernel/nmi.c10
-rw-r--r--arch/i386/kernel/process.c10
-rw-r--r--arch/i386/kernel/setup.c2
-rw-r--r--arch/i386/kernel/traps.c10
-rw-r--r--arch/i386/kernel/vmlinux.lds.S9
-rw-r--r--arch/i386/mach-visws/visws_apic.c7
-rw-r--r--arch/i386/pci/common.c1
-rw-r--r--arch/i386/pci/fixup.c55
-rw-r--r--arch/i386/pci/i386.c9
-rw-r--r--arch/i386/pci/irq.c4
-rw-r--r--arch/i386/pci/mmconfig.c35
-rw-r--r--arch/i386/pci/pci.h1
21 files changed, 212 insertions, 121 deletions
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 7cc0b189b82b..0677908dfa06 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -42,6 +42,10 @@ cflags-$(CONFIG_REGPARM) += -mregparm=3
42# temporary until string.h is fixed 42# temporary until string.h is fixed
43cflags-y += -ffreestanding 43cflags-y += -ffreestanding
44 44
45# this works around some issues with generating unwind tables in older gccs
46# newer gccs do it by default
47cflags-y += -maccumulate-outgoing-args
48
45# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use 49# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
46# a lot more stack due to the lack of sharing of stacklots: 50# a lot more stack due to the lack of sharing of stacklots:
47CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) 51CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
@@ -51,8 +55,8 @@ cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
51AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 55AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
52 56
53# is .cfi_signal_frame supported too? 57# is .cfi_signal_frame supported too?
54cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
55AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 59AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
56 60
57CFLAGS += $(cflags-y) 61CFLAGS += $(cflags-y)
58 62
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 60c0c02574f0..97aacd6bd7d8 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc1 3# Linux kernel version: 2.6.19-rc2-git4
4# Thu Oct 5 13:04:53 2006 4# Sat Oct 21 03:38:56 2006
5# 5#
6CONFIG_X86_32=y 6CONFIG_X86_32=y
7CONFIG_GENERIC_TIME=y 7CONFIG_GENERIC_TIME=y
@@ -380,8 +380,8 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=y
380CONFIG_INET6_XFRM_MODE_TUNNEL=y 380CONFIG_INET6_XFRM_MODE_TUNNEL=y
381# CONFIG_INET6_XFRM_MODE_BEET is not set 381# CONFIG_INET6_XFRM_MODE_BEET is not set
382# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 382# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
383CONFIG_IPV6_SIT=y
383# CONFIG_IPV6_TUNNEL is not set 384# CONFIG_IPV6_TUNNEL is not set
384# CONFIG_IPV6_SUBTREES is not set
385# CONFIG_IPV6_MULTIPLE_TABLES is not set 385# CONFIG_IPV6_MULTIPLE_TABLES is not set
386# CONFIG_NETWORK_SECMARK is not set 386# CONFIG_NETWORK_SECMARK is not set
387# CONFIG_NETFILTER is not set 387# CONFIG_NETFILTER is not set
@@ -483,6 +483,13 @@ CONFIG_BLK_DEV_INITRD=y
483# CONFIG_ATA_OVER_ETH is not set 483# CONFIG_ATA_OVER_ETH is not set
484 484
485# 485#
486# Misc devices
487#
488# CONFIG_IBM_ASM is not set
489# CONFIG_SGI_IOC4 is not set
490# CONFIG_TIFM_CORE is not set
491
492#
486# ATA/ATAPI/MFM/RLL support 493# ATA/ATAPI/MFM/RLL support
487# 494#
488CONFIG_IDE=y 495CONFIG_IDE=y
@@ -1024,6 +1031,7 @@ CONFIG_HANGCHECK_TIMER=y
1024# 1031#
1025# Dallas's 1-wire bus 1032# Dallas's 1-wire bus
1026# 1033#
1034# CONFIG_W1 is not set
1027 1035
1028# 1036#
1029# Hardware Monitoring support 1037# Hardware Monitoring support
@@ -1032,12 +1040,6 @@ CONFIG_HANGCHECK_TIMER=y
1032# CONFIG_HWMON_VID is not set 1040# CONFIG_HWMON_VID is not set
1033 1041
1034# 1042#
1035# Misc devices
1036#
1037# CONFIG_IBM_ASM is not set
1038# CONFIG_TIFM_CORE is not set
1039
1040#
1041# Multimedia devices 1043# Multimedia devices
1042# 1044#
1043# CONFIG_VIDEO_DEV is not set 1045# CONFIG_VIDEO_DEV is not set
@@ -1169,7 +1171,6 @@ CONFIG_USB_HIDINPUT=y
1169# CONFIG_USB_ATI_REMOTE2 is not set 1171# CONFIG_USB_ATI_REMOTE2 is not set
1170# CONFIG_USB_KEYSPAN_REMOTE is not set 1172# CONFIG_USB_KEYSPAN_REMOTE is not set
1171# CONFIG_USB_APPLETOUCH is not set 1173# CONFIG_USB_APPLETOUCH is not set
1172# CONFIG_USB_TRANCEVIBRATOR is not set
1173 1174
1174# 1175#
1175# USB Imaging devices 1176# USB Imaging devices
@@ -1215,6 +1216,7 @@ CONFIG_USB_MON=y
1215# CONFIG_USB_APPLEDISPLAY is not set 1216# CONFIG_USB_APPLEDISPLAY is not set
1216# CONFIG_USB_SISUSBVGA is not set 1217# CONFIG_USB_SISUSBVGA is not set
1217# CONFIG_USB_LD is not set 1218# CONFIG_USB_LD is not set
1219# CONFIG_USB_TRANCEVIBRATOR is not set
1218# CONFIG_USB_TEST is not set 1220# CONFIG_USB_TEST is not set
1219 1221
1220# 1222#
@@ -1284,6 +1286,7 @@ CONFIG_EXT3_FS=y
1284CONFIG_EXT3_FS_XATTR=y 1286CONFIG_EXT3_FS_XATTR=y
1285CONFIG_EXT3_FS_POSIX_ACL=y 1287CONFIG_EXT3_FS_POSIX_ACL=y
1286# CONFIG_EXT3_FS_SECURITY is not set 1288# CONFIG_EXT3_FS_SECURITY is not set
1289# CONFIG_EXT4DEV_FS is not set
1287CONFIG_JBD=y 1290CONFIG_JBD=y
1288# CONFIG_JBD_DEBUG is not set 1291# CONFIG_JBD_DEBUG is not set
1289CONFIG_FS_MBCACHE=y 1292CONFIG_FS_MBCACHE=y
@@ -1307,6 +1310,7 @@ CONFIG_DNOTIFY=y
1307# CONFIG_AUTOFS_FS is not set 1310# CONFIG_AUTOFS_FS is not set
1308CONFIG_AUTOFS4_FS=y 1311CONFIG_AUTOFS4_FS=y
1309# CONFIG_FUSE_FS is not set 1312# CONFIG_FUSE_FS is not set
1313CONFIG_GENERIC_ACL=y
1310 1314
1311# 1315#
1312# CD-ROM/DVD Filesystems 1316# CD-ROM/DVD Filesystems
@@ -1384,7 +1388,6 @@ CONFIG_SUNRPC=y
1384# CONFIG_CODA_FS is not set 1388# CONFIG_CODA_FS is not set
1385# CONFIG_AFS_FS is not set 1389# CONFIG_AFS_FS is not set
1386# CONFIG_9P_FS is not set 1390# CONFIG_9P_FS is not set
1387CONFIG_GENERIC_ACL=y
1388 1391
1389# 1392#
1390# Partition Types 1393# Partition Types
@@ -1437,10 +1440,6 @@ CONFIG_NLS_ISO8859_15=y
1437CONFIG_NLS_UTF8=y 1440CONFIG_NLS_UTF8=y
1438 1441
1439# 1442#
1440# Distributed Lock Manager
1441#
1442
1443#
1444# Instrumentation Support 1443# Instrumentation Support
1445# 1444#
1446CONFIG_PROFILING=y 1445CONFIG_PROFILING=y
@@ -1480,6 +1479,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1480CONFIG_UNWIND_INFO=y 1479CONFIG_UNWIND_INFO=y
1481CONFIG_STACK_UNWIND=y 1480CONFIG_STACK_UNWIND=y
1482# CONFIG_FORCED_INLINING is not set 1481# CONFIG_FORCED_INLINING is not set
1482# CONFIG_HEADERS_CHECK is not set
1483# CONFIG_RCU_TORTURE_TEST is not set 1483# CONFIG_RCU_TORTURE_TEST is not set
1484# CONFIG_LKDTM is not set 1484# CONFIG_LKDTM is not set
1485CONFIG_EARLY_PRINTK=y 1485CONFIG_EARLY_PRINTK=y
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index ab974ff97073..d12fb97a5337 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -70,7 +70,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
70 70
71#define PREFIX "ACPI: " 71#define PREFIX "ACPI: "
72 72
73int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ 73int acpi_noirq; /* skip ACPI IRQ initialization */
74int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ 74int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */
75int acpi_ht __initdata = 1; /* enable HT */ 75int acpi_ht __initdata = 1; /* enable HT */
76 76
@@ -82,6 +82,7 @@ EXPORT_SYMBOL(acpi_strict);
82acpi_interrupt_flags acpi_sci_flags __initdata; 82acpi_interrupt_flags acpi_sci_flags __initdata;
83int acpi_sci_override_gsi __initdata; 83int acpi_sci_override_gsi __initdata;
84int acpi_skip_timer_override __initdata; 84int acpi_skip_timer_override __initdata;
85int acpi_use_timer_override __initdata;
85 86
86#ifdef CONFIG_X86_LOCAL_APIC 87#ifdef CONFIG_X86_LOCAL_APIC
87static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; 88static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
@@ -1300,6 +1301,13 @@ static int __init parse_acpi_skip_timer_override(char *arg)
1300 return 0; 1301 return 0;
1301} 1302}
1302early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); 1303early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override);
1304
1305static int __init parse_acpi_use_timer_override(char *arg)
1306{
1307 acpi_use_timer_override = 1;
1308 return 0;
1309}
1310early_param("acpi_use_timer_override", parse_acpi_use_timer_override);
1303#endif /* CONFIG_X86_IO_APIC */ 1311#endif /* CONFIG_X86_IO_APIC */
1304 1312
1305static int __init setup_acpi_sci(char *s) 1313static int __init setup_acpi_sci(char *s)
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index fe799b11ac0a..c9841692bb7c 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -27,11 +27,17 @@ static int __init check_bridge(int vendor, int device)
27#ifdef CONFIG_ACPI 27#ifdef CONFIG_ACPI
28 /* According to Nvidia all timer overrides are bogus unless HPET 28 /* According to Nvidia all timer overrides are bogus unless HPET
29 is enabled. */ 29 is enabled. */
30 if (vendor == PCI_VENDOR_ID_NVIDIA) { 30 if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
31 nvidia_hpet_detected = 0; 31 nvidia_hpet_detected = 0;
32 acpi_table_parse(ACPI_HPET, nvidia_hpet_check); 32 acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
33 if (nvidia_hpet_detected == 0) { 33 if (nvidia_hpet_detected == 0) {
34 acpi_skip_timer_override = 1; 34 acpi_skip_timer_override = 1;
35 printk(KERN_INFO "Nvidia board "
36 "detected. Ignoring ACPI "
37 "timer override.\n");
38 printk(KERN_INFO "If you got timer trouble "
39 "try acpi_use_timer_override\n");
40
35 } 41 }
36 } 42 }
37#endif 43#endif
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 2af65858d322..a60358fe9a49 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -198,7 +198,7 @@
198 * (APM) BIOS Interface Specification, Revision 1.2, February 1996. 198 * (APM) BIOS Interface Specification, Revision 1.2, February 1996.
199 * 199 *
200 * [This document is available from Microsoft at: 200 * [This document is available from Microsoft at:
201 * http://www.microsoft.com/hwdev/busbios/amp_12.htm] 201 * http://www.microsoft.com/whdc/archive/amp_12.mspx]
202 */ 202 */
203 203
204#include <linux/module.h> 204#include <linux/module.h>
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index be9d883c62ce..ca31f18d277c 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -317,7 +317,7 @@ is386: movl $2,%ecx # set MP
317 movl %eax,%gs 317 movl %eax,%gs
318 lldt %ax 318 lldt %ax
319 cld # gcc2 wants the direction flag cleared at all times 319 cld # gcc2 wants the direction flag cleared at all times
320 pushl %eax # fake return address 320 pushl $0 # fake return address for unwinder
321#ifdef CONFIG_SMP 321#ifdef CONFIG_SMP
322 movb ready, %cl 322 movb ready, %cl
323 movb $1, ready 323 movb $1, ready
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 350192d6ab98..3b7a63e0ed1a 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -91,6 +91,46 @@ static struct irq_pin_list {
91 int apic, pin, next; 91 int apic, pin, next;
92} irq_2_pin[PIN_MAP_SIZE]; 92} irq_2_pin[PIN_MAP_SIZE];
93 93
94struct io_apic {
95 unsigned int index;
96 unsigned int unused[3];
97 unsigned int data;
98};
99
100static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
101{
102 return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
103 + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK);
104}
105
106static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
107{
108 struct io_apic __iomem *io_apic = io_apic_base(apic);
109 writel(reg, &io_apic->index);
110 return readl(&io_apic->data);
111}
112
113static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
114{
115 struct io_apic __iomem *io_apic = io_apic_base(apic);
116 writel(reg, &io_apic->index);
117 writel(value, &io_apic->data);
118}
119
120/*
121 * Re-write a value: to be used for read-modify-write
122 * cycles where the read already set up the index register.
123 *
124 * Older SiS APIC requires we rewrite the index register
125 */
126static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
127{
128 volatile struct io_apic *io_apic = io_apic_base(apic);
129 if (sis_apic_bug)
130 writel(reg, &io_apic->index);
131 writel(value, &io_apic->data);
132}
133
94union entry_union { 134union entry_union {
95 struct { u32 w1, w2; }; 135 struct { u32 w1, w2; };
96 struct IO_APIC_route_entry entry; 136 struct IO_APIC_route_entry entry;
@@ -107,12 +147,34 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin)
107 return eu.entry; 147 return eu.entry;
108} 148}
109 149
150/*
151 * When we write a new IO APIC routing entry, we need to write the high
152 * word first! If the mask bit in the low word is clear, we will enable
153 * the interrupt, and we need to make sure the entry is fully populated
154 * before that happens.
155 */
110static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) 156static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e)
111{ 157{
112 unsigned long flags; 158 unsigned long flags;
113 union entry_union eu; 159 union entry_union eu;
114 eu.entry = e; 160 eu.entry = e;
115 spin_lock_irqsave(&ioapic_lock, flags); 161 spin_lock_irqsave(&ioapic_lock, flags);
162 io_apic_write(apic, 0x11 + 2*pin, eu.w2);
163 io_apic_write(apic, 0x10 + 2*pin, eu.w1);
164 spin_unlock_irqrestore(&ioapic_lock, flags);
165}
166
167/*
168 * When we mask an IO APIC routing entry, we need to write the low
169 * word first, in order to set the mask bit before we change the
170 * high bits!
171 */
172static void ioapic_mask_entry(int apic, int pin)
173{
174 unsigned long flags;
175 union entry_union eu = { .entry.mask = 1 };
176
177 spin_lock_irqsave(&ioapic_lock, flags);
116 io_apic_write(apic, 0x10 + 2*pin, eu.w1); 178 io_apic_write(apic, 0x10 + 2*pin, eu.w1);
117 io_apic_write(apic, 0x11 + 2*pin, eu.w2); 179 io_apic_write(apic, 0x11 + 2*pin, eu.w2);
118 spin_unlock_irqrestore(&ioapic_lock, flags); 180 spin_unlock_irqrestore(&ioapic_lock, flags);
@@ -234,9 +296,7 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
234 /* 296 /*
235 * Disable it in the IO-APIC irq-routing table: 297 * Disable it in the IO-APIC irq-routing table:
236 */ 298 */
237 memset(&entry, 0, sizeof(entry)); 299 ioapic_mask_entry(apic, pin);
238 entry.mask = 1;
239 ioapic_write_entry(apic, pin, entry);
240} 300}
241 301
242static void clear_IO_APIC (void) 302static void clear_IO_APIC (void)
@@ -1227,9 +1287,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
1227 trigger == IOAPIC_LEVEL) 1287 trigger == IOAPIC_LEVEL)
1228 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1288 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1229 handle_fasteoi_irq, "fasteoi"); 1289 handle_fasteoi_irq, "fasteoi");
1230 else 1290 else {
1291 irq_desc[irq].status |= IRQ_DELAYED_DISABLE;
1231 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1292 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1232 handle_edge_irq, "edge"); 1293 handle_edge_irq, "edge");
1294 }
1233 set_intr_gate(vector, interrupt[irq]); 1295 set_intr_gate(vector, interrupt[irq]);
1234} 1296}
1235 1297
@@ -2564,18 +2626,16 @@ void arch_teardown_msi_irq(unsigned int irq)
2564 2626
2565static void target_ht_irq(unsigned int irq, unsigned int dest) 2627static void target_ht_irq(unsigned int irq, unsigned int dest)
2566{ 2628{
2567 u32 low, high; 2629 struct ht_irq_msg msg;
2568 low = read_ht_irq_low(irq); 2630 fetch_ht_irq_msg(irq, &msg);
2569 high = read_ht_irq_high(irq);
2570 2631
2571 low &= ~(HT_IRQ_LOW_DEST_ID_MASK); 2632 msg.address_lo &= ~(HT_IRQ_LOW_DEST_ID_MASK);
2572 high &= ~(HT_IRQ_HIGH_DEST_ID_MASK); 2633 msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK);
2573 2634
2574 low |= HT_IRQ_LOW_DEST_ID(dest); 2635 msg.address_lo |= HT_IRQ_LOW_DEST_ID(dest);
2575 high |= HT_IRQ_HIGH_DEST_ID(dest); 2636 msg.address_hi |= HT_IRQ_HIGH_DEST_ID(dest);
2576 2637
2577 write_ht_irq_low(irq, low); 2638 write_ht_irq_msg(irq, &msg);
2578 write_ht_irq_high(irq, high);
2579} 2639}
2580 2640
2581static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) 2641static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
@@ -2613,7 +2673,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2613 2673
2614 vector = assign_irq_vector(irq); 2674 vector = assign_irq_vector(irq);
2615 if (vector >= 0) { 2675 if (vector >= 0) {
2616 u32 low, high; 2676 struct ht_irq_msg msg;
2617 unsigned dest; 2677 unsigned dest;
2618 cpumask_t tmp; 2678 cpumask_t tmp;
2619 2679
@@ -2621,9 +2681,10 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2621 cpu_set(vector >> 8, tmp); 2681 cpu_set(vector >> 8, tmp);
2622 dest = cpu_mask_to_apicid(tmp); 2682 dest = cpu_mask_to_apicid(tmp);
2623 2683
2624 high = HT_IRQ_HIGH_DEST_ID(dest); 2684 msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
2625 2685
2626 low = HT_IRQ_LOW_BASE | 2686 msg.address_lo =
2687 HT_IRQ_LOW_BASE |
2627 HT_IRQ_LOW_DEST_ID(dest) | 2688 HT_IRQ_LOW_DEST_ID(dest) |
2628 HT_IRQ_LOW_VECTOR(vector) | 2689 HT_IRQ_LOW_VECTOR(vector) |
2629 ((INT_DEST_MODE == 0) ? 2690 ((INT_DEST_MODE == 0) ?
@@ -2635,8 +2696,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2635 HT_IRQ_LOW_MT_ARBITRATED) | 2696 HT_IRQ_LOW_MT_ARBITRATED) |
2636 HT_IRQ_LOW_IRQ_MASKED; 2697 HT_IRQ_LOW_IRQ_MASKED;
2637 2698
2638 write_ht_irq_low(irq, low); 2699 write_ht_irq_msg(irq, &msg);
2639 write_ht_irq_high(irq, high);
2640 2700
2641 set_irq_chip_and_handler_name(irq, &ht_irq_chip, 2701 set_irq_chip_and_handler_name(irq, &ht_irq_chip,
2642 handle_edge_irq, "edge"); 2702 handle_edge_irq, "edge");
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c
index d98e44b16fe2..fc79e1e859c4 100644
--- a/arch/i386/kernel/kprobes.c
+++ b/arch/i386/kernel/kprobes.c
@@ -361,8 +361,11 @@ no_kprobe:
361 asm volatile ( ".global kretprobe_trampoline\n" 361 asm volatile ( ".global kretprobe_trampoline\n"
362 "kretprobe_trampoline: \n" 362 "kretprobe_trampoline: \n"
363 " pushf\n" 363 " pushf\n"
364 /* skip cs, eip, orig_eax, es, ds */ 364 /* skip cs, eip, orig_eax */
365 " subl $20, %esp\n" 365 " subl $12, %esp\n"
366 " pushl %gs\n"
367 " pushl %ds\n"
368 " pushl %es\n"
366 " pushl %eax\n" 369 " pushl %eax\n"
367 " pushl %ebp\n" 370 " pushl %ebp\n"
368 " pushl %edi\n" 371 " pushl %edi\n"
@@ -373,10 +376,10 @@ no_kprobe:
373 " movl %esp, %eax\n" 376 " movl %esp, %eax\n"
374 " call trampoline_handler\n" 377 " call trampoline_handler\n"
375 /* move eflags to cs */ 378 /* move eflags to cs */
376 " movl 48(%esp), %edx\n" 379 " movl 52(%esp), %edx\n"
377 " movl %edx, 44(%esp)\n" 380 " movl %edx, 48(%esp)\n"
378 /* save true return address on eflags */ 381 /* save true return address on eflags */
379 " movl %eax, 48(%esp)\n" 382 " movl %eax, 52(%esp)\n"
380 " popl %ebx\n" 383 " popl %ebx\n"
381 " popl %ecx\n" 384 " popl %ecx\n"
382 " popl %edx\n" 385 " popl %edx\n"
@@ -384,8 +387,8 @@ no_kprobe:
384 " popl %edi\n" 387 " popl %edi\n"
385 " popl %ebp\n" 388 " popl %ebp\n"
386 " popl %eax\n" 389 " popl %eax\n"
387 /* skip eip, orig_eax, es, ds */ 390 /* skip eip, orig_eax, es, ds, gs */
388 " addl $16, %esp\n" 391 " addl $20, %esp\n"
389 " popf\n" 392 " popf\n"
390 " ret\n"); 393 " ret\n");
391} 394}
@@ -404,6 +407,10 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
404 INIT_HLIST_HEAD(&empty_rp); 407 INIT_HLIST_HEAD(&empty_rp);
405 spin_lock_irqsave(&kretprobe_lock, flags); 408 spin_lock_irqsave(&kretprobe_lock, flags);
406 head = kretprobe_inst_table_head(current); 409 head = kretprobe_inst_table_head(current);
410 /* fixup registers */
411 regs->xcs = __KERNEL_CS;
412 regs->eip = trampoline_address;
413 regs->orig_eax = 0xffffffff;
407 414
408 /* 415 /*
409 * It is possible to have multiple instances associated with a given 416 * It is possible to have multiple instances associated with a given
@@ -425,6 +432,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
425 432
426 if (ri->rp && ri->rp->handler){ 433 if (ri->rp && ri->rp->handler){
427 __get_cpu_var(current_kprobe) = &ri->rp->kp; 434 __get_cpu_var(current_kprobe) = &ri->rp->kp;
435 get_kprobe_ctlblk()->kprobe_status = KPROBE_HIT_ACTIVE;
428 ri->rp->handler(ri, regs); 436 ri->rp->handler(ri, regs);
429 __get_cpu_var(current_kprobe) = NULL; 437 __get_cpu_var(current_kprobe) = NULL;
430 } 438 }
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index c4d0291b519f..23f5984d0654 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -577,7 +577,7 @@ static void microcode_init_cpu(int cpu)
577 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 577 set_cpus_allowed(current, cpumask_of_cpu(cpu));
578 mutex_lock(&microcode_mutex); 578 mutex_lock(&microcode_mutex);
579 collect_cpu_info(cpu); 579 collect_cpu_info(cpu);
580 if (uci->valid) 580 if (uci->valid && system_state == SYSTEM_RUNNING)
581 cpu_request_microcode(cpu); 581 cpu_request_microcode(cpu);
582 mutex_unlock(&microcode_mutex); 582 mutex_unlock(&microcode_mutex);
583 set_cpus_allowed(current, old); 583 set_cpus_allowed(current, old);
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 3e8e3adb0489..eaafe233a5da 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -219,11 +219,11 @@ static int __init check_nmi_watchdog(void)
219 int cpu; 219 int cpu;
220 220
221 /* Enable NMI watchdog for newer systems. 221 /* Enable NMI watchdog for newer systems.
222 Actually it should be safe for most systems before 2004 too except 222 Probably safe on most older systems too, but let's be careful.
223 for some IBM systems that corrupt registers when NMI happens 223 IBM ThinkPads use INT10 inside SMM and that allows early NMI inside SMM
224 during SMM. Unfortunately we don't have more exact information 224 which hangs the system. Disable watchdog for all thinkpads */
225 on these and use this coarse check. */ 225 if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004 &&
226 if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004) 226 !dmi_name_in_vendors("ThinkPad"))
227 nmi_watchdog = NMI_LOCAL_APIC; 227 nmi_watchdog = NMI_LOCAL_APIC;
228 228
229 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) 229 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 57d375900afb..dd53c58f64f1 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -205,7 +205,7 @@ void cpu_idle(void)
205void cpu_idle_wait(void) 205void cpu_idle_wait(void)
206{ 206{
207 unsigned int cpu, this_cpu = get_cpu(); 207 unsigned int cpu, this_cpu = get_cpu();
208 cpumask_t map; 208 cpumask_t map, tmp = current->cpus_allowed;
209 209
210 set_cpus_allowed(current, cpumask_of_cpu(this_cpu)); 210 set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
211 put_cpu(); 211 put_cpu();
@@ -227,6 +227,8 @@ void cpu_idle_wait(void)
227 } 227 }
228 cpus_and(map, map, cpu_online_map); 228 cpus_and(map, map, cpu_online_map);
229 } while (!cpus_empty(map)); 229 } while (!cpus_empty(map));
230
231 set_cpus_allowed(current, tmp);
230} 232}
231EXPORT_SYMBOL_GPL(cpu_idle_wait); 233EXPORT_SYMBOL_GPL(cpu_idle_wait);
232 234
@@ -336,7 +338,6 @@ extern void kernel_thread_helper(void);
336int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 338int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
337{ 339{
338 struct pt_regs regs; 340 struct pt_regs regs;
339 int err;
340 341
341 memset(&regs, 0, sizeof(regs)); 342 memset(&regs, 0, sizeof(regs));
342 343
@@ -351,10 +352,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
351 regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; 352 regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
352 353
353 /* Ok, create the new process.. */ 354 /* Ok, create the new process.. */
354 err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); 355 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
355 if (err == 0) /* terminate kernel stack */
356 task_pt_regs(current)->eip = 0;
357 return err;
358} 356}
359EXPORT_SYMBOL(kernel_thread); 357EXPORT_SYMBOL(kernel_thread);
360 358
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 519e63c3c130..141041dde74d 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -846,7 +846,7 @@ efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
846static int __init 846static int __init
847efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg) 847efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
848{ 848{
849 memory_present(0, start, end); 849 memory_present(0, PFN_UP(start), PFN_DOWN(end));
850 return 0; 850 return 0;
851} 851}
852 852
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 00489b706d27..fe9c5e8e7e6f 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -129,15 +129,19 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
129 129
130#ifdef CONFIG_FRAME_POINTER 130#ifdef CONFIG_FRAME_POINTER
131 while (valid_stack_ptr(tinfo, (void *)ebp)) { 131 while (valid_stack_ptr(tinfo, (void *)ebp)) {
132 unsigned long new_ebp;
132 addr = *(unsigned long *)(ebp + 4); 133 addr = *(unsigned long *)(ebp + 4);
133 ops->address(data, addr); 134 ops->address(data, addr);
134 /* 135 /*
135 * break out of recursive entries (such as 136 * break out of recursive entries (such as
136 * end_of_stack_stop_unwind_function): 137 * end_of_stack_stop_unwind_function). Also,
138 * we can never allow a frame pointer to
139 * move downwards!
137 */ 140 */
138 if (ebp == *(unsigned long *)ebp) 141 new_ebp = *(unsigned long *)ebp;
142 if (new_ebp <= ebp)
139 break; 143 break;
140 ebp = *(unsigned long *)ebp; 144 ebp = new_ebp;
141 } 145 }
142#else 146#else
143 while (valid_stack_ptr(tinfo, stack)) { 147 while (valid_stack_ptr(tinfo, stack)) {
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index 1e7ac1c44ddc..c6f84a0322ba 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -51,6 +51,7 @@ SECTIONS
51 __tracedata_end = .; 51 __tracedata_end = .;
52 52
53 /* writeable */ 53 /* writeable */
54 . = ALIGN(4096);
54 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ 55 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
55 *(.data) 56 *(.data)
56 CONSTRUCTORS 57 CONSTRUCTORS
@@ -126,13 +127,7 @@ SECTIONS
126 __setup_end = .; 127 __setup_end = .;
127 __initcall_start = .; 128 __initcall_start = .;
128 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 129 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
129 *(.initcall1.init) 130 INITCALLS
130 *(.initcall2.init)
131 *(.initcall3.init)
132 *(.initcall4.init)
133 *(.initcall5.init)
134 *(.initcall6.init)
135 *(.initcall7.init)
136 } 131 }
137 __initcall_end = .; 132 __initcall_end = .;
138 __con_initcall_start = .; 133 __con_initcall_start = .;
diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c
index 07097ed48890..38c2b13124d9 100644
--- a/arch/i386/mach-visws/visws_apic.c
+++ b/arch/i386/mach-visws/visws_apic.c
@@ -122,7 +122,7 @@ static void end_cobalt_irq(unsigned int irq)
122 spin_unlock_irqrestore(&cobalt_lock, flags); 122 spin_unlock_irqrestore(&cobalt_lock, flags);
123} 123}
124 124
125static struct hw_interrupt_type cobalt_irq_type = { 125static struct irq_chip cobalt_irq_type = {
126 .typename = "Cobalt-APIC", 126 .typename = "Cobalt-APIC",
127 .startup = startup_cobalt_irq, 127 .startup = startup_cobalt_irq,
128 .shutdown = disable_cobalt_irq, 128 .shutdown = disable_cobalt_irq,
@@ -159,7 +159,7 @@ static void end_piix4_master_irq(unsigned int irq)
159 spin_unlock_irqrestore(&cobalt_lock, flags); 159 spin_unlock_irqrestore(&cobalt_lock, flags);
160} 160}
161 161
162static struct hw_interrupt_type piix4_master_irq_type = { 162static struct irq_chip piix4_master_irq_type = {
163 .typename = "PIIX4-master", 163 .typename = "PIIX4-master",
164 .startup = startup_piix4_master_irq, 164 .startup = startup_piix4_master_irq,
165 .ack = ack_cobalt_irq, 165 .ack = ack_cobalt_irq,
@@ -167,9 +167,8 @@ static struct hw_interrupt_type piix4_master_irq_type = {
167}; 167};
168 168
169 169
170static struct hw_interrupt_type piix4_virtual_irq_type = { 170static struct irq_chip piix4_virtual_irq_type = {
171 .typename = "PIIX4-virtual", 171 .typename = "PIIX4-virtual",
172 .startup = startup_8259A_irq,
173 .shutdown = disable_8259A_irq, 172 .shutdown = disable_8259A_irq,
174 .enable = enable_8259A_irq, 173 .enable = enable_8259A_irq,
175 .disable = disable_8259A_irq, 174 .disable = disable_8259A_irq,
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 6d5ace845e44..cdfcf971098b 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -343,7 +343,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
343 343
344void pcibios_disable_device (struct pci_dev *dev) 344void pcibios_disable_device (struct pci_dev *dev)
345{ 345{
346 pcibios_disable_resources(dev);
347 if (pcibios_disable_irq) 346 if (pcibios_disable_irq)
348 pcibios_disable_irq(dev); 347 pcibios_disable_irq(dev);
349} 348}
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
index 908b410f4c93..c1949ff38d61 100644
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -343,6 +343,61 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC, pcie_ro
343DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_rootport_aspm_quirk ); 343DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_rootport_aspm_quirk );
344 344
345/* 345/*
346 * Fixup to mark boot BIOS video selected by BIOS before it changes
347 *
348 * From information provided by "Jon Smirl" <jonsmirl@gmail.com>
349 *
350 * The standard boot ROM sequence for an x86 machine uses the BIOS
351 * to select an initial video card for boot display. This boot video
352 * card will have it's BIOS copied to C0000 in system RAM.
353 * IORESOURCE_ROM_SHADOW is used to associate the boot video
354 * card with this copy. On laptops this copy has to be used since
355 * the main ROM may be compressed or combined with another image.
356 * See pci_map_rom() for use of this flag. IORESOURCE_ROM_SHADOW
357 * is marked here since the boot video device will be the only enabled
358 * video device at this point.
359 */
360
361static void __devinit pci_fixup_video(struct pci_dev *pdev)
362{
363 struct pci_dev *bridge;
364 struct pci_bus *bus;
365 u16 config;
366
367 if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
368 return;
369
370 /* Is VGA routed to us? */
371 bus = pdev->bus;
372 while (bus) {
373 bridge = bus->self;
374
375 /*
376 * From information provided by
377 * "David Miller" <davem@davemloft.net>
378 * The bridge control register is valid for PCI header
379 * type BRIDGE, or CARDBUS. Host to PCI controllers use
380 * PCI header type NORMAL.
381 */
382 if (bridge
383 &&((bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE)
384 ||(bridge->hdr_type == PCI_HEADER_TYPE_CARDBUS))) {
385 pci_read_config_word(bridge, PCI_BRIDGE_CONTROL,
386 &config);
387 if (!(config & PCI_BRIDGE_CTL_VGA))
388 return;
389 }
390 bus = bus->parent;
391 }
392 pci_read_config_word(pdev, PCI_COMMAND, &config);
393 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
394 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
395 printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev));
396 }
397}
398DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video);
399
400/*
346 * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. 401 * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A.
347 * 402 *
348 * We pretend to bring them out of full D3 state, and restore the proper 403 * We pretend to bring them out of full D3 state, and restore the proper
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c
index 10154a2cac68..98580292f0d4 100644
--- a/arch/i386/pci/i386.c
+++ b/arch/i386/pci/i386.c
@@ -242,15 +242,6 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask)
242 return 0; 242 return 0;
243} 243}
244 244
245void pcibios_disable_resources(struct pci_dev *dev)
246{
247 u16 cmd;
248
249 pci_read_config_word(dev, PCI_COMMAND, &cmd);
250 cmd &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
251 pci_write_config_word(dev, PCI_COMMAND, cmd);
252}
253
254/* 245/*
255 * If we set up a device for bus mastering, we need to check the latency 246 * If we set up a device for bus mastering, we need to check the latency
256 * timer as certain crappy BIOSes forget to set it properly. 247 * timer as certain crappy BIOSes forget to set it properly.
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index dbc4aae91959..69163998adeb 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -255,13 +255,13 @@ static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i
255 */ 255 */
256static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) 256static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
257{ 257{
258 static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; 258 static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 };
259 return read_config_nybble(router, 0x55, pirqmap[pirq-1]); 259 return read_config_nybble(router, 0x55, pirqmap[pirq-1]);
260} 260}
261 261
262static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) 262static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
263{ 263{
264 static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; 264 static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 };
265 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); 265 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq);
266 return 1; 266 return 1;
267} 267}
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index d0c3da3aa2aa..c6b6d9bbc453 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -154,38 +154,6 @@ static struct pci_raw_ops pci_mmcfg = {
154 .write = pci_mmcfg_write, 154 .write = pci_mmcfg_write,
155}; 155};
156 156
157
158static __init void pci_mmcfg_insert_resources(void)
159{
160#define PCI_MMCFG_RESOURCE_NAME_LEN 19
161 int i;
162 struct resource *res;
163 char *names;
164 unsigned num_buses;
165
166 res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res),
167 pci_mmcfg_config_num, GFP_KERNEL);
168
169 if (!res) {
170 printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n");
171 return;
172 }
173
174 names = (void *)&res[pci_mmcfg_config_num];
175 for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
176 num_buses = pci_mmcfg_config[i].end_bus_number -
177 pci_mmcfg_config[i].start_bus_number + 1;
178 res->name = names;
179 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u",
180 pci_mmcfg_config[i].pci_segment_group_number);
181 res->start = pci_mmcfg_config[i].base_address;
182 res->end = res->start + (num_buses << 20) - 1;
183 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
184 insert_resource(&iomem_resource, res);
185 names += PCI_MMCFG_RESOURCE_NAME_LEN;
186 }
187}
188
189/* K8 systems have some devices (typically in the builtin northbridge) 157/* K8 systems have some devices (typically in the builtin northbridge)
190 that are only accessible using type1 158 that are only accessible using type1
191 Normally this can be expressed in the MCFG by not listing them 159 Normally this can be expressed in the MCFG by not listing them
@@ -222,8 +190,6 @@ static __init void unreachable_devices(void)
222 } 190 }
223} 191}
224 192
225
226
227void __init pci_mmcfg_init(int type) 193void __init pci_mmcfg_init(int type)
228{ 194{
229 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 195 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
@@ -251,5 +217,4 @@ void __init pci_mmcfg_init(int type)
251 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 217 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
252 218
253 unreachable_devices(); 219 unreachable_devices();
254 pci_mmcfg_insert_resources();
255} 220}
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
index ad065cebd7b9..a0a25180b61a 100644
--- a/arch/i386/pci/pci.h
+++ b/arch/i386/pci/pci.h
@@ -43,7 +43,6 @@ extern unsigned int pcibios_max_latency;
43 43
44void pcibios_resource_survey(void); 44void pcibios_resource_survey(void);
45int pcibios_enable_resources(struct pci_dev *, int); 45int pcibios_enable_resources(struct pci_dev *, int);
46void pcibios_disable_resources(struct pci_dev *);
47 46
48/* pci-pc.c */ 47/* pci-pc.c */
49 48