diff options
author | <jgarzik@pretzel.yyz.us> | 2005-05-27 22:07:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-27 22:07:02 -0400 |
commit | 1f15d694522af9cd7492695f11dd2dc77b6cf098 (patch) | |
tree | 7f67a4c38456ec73359d576a5c602d18c3c3ef72 /arch/i386 | |
parent | fff9cfd99c0f88645c3f50d7476d6c8cef99f140 (diff) | |
parent | 254feb882a7c6e4e51416dff6a97d847fbbba551 (diff) |
Automatic merge of /spare/repo/netdev-2.6 branch master
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/Kconfig | 2 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/amd.c | 12 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 1 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 17 | ||||
-rw-r--r-- | arch/i386/mm/ioremap.c | 10 | ||||
-rw-r--r-- | arch/i386/pci/fixup.c | 2 | ||||
-rw-r--r-- | arch/i386/pci/irq.c | 5 |
8 files changed, 28 insertions, 25 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index e382f32d435e..dfd904f6883b 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -1163,7 +1163,7 @@ config PCI_DIRECT | |||
1163 | 1163 | ||
1164 | config PCI_MMCONFIG | 1164 | config PCI_MMCONFIG |
1165 | bool | 1165 | bool |
1166 | depends on PCI && (PCI_GOMMCONFIG || (PCI_GOANY && ACPI)) | 1166 | depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) |
1167 | select ACPI_BOOT | 1167 | select ACPI_BOOT |
1168 | default y | 1168 | default y |
1169 | 1169 | ||
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 16dbc4151be4..73aeaf5a9d4e 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -24,9 +24,6 @@ __asm__(".align 4\nvide: ret"); | |||
24 | 24 | ||
25 | static void __init init_amd(struct cpuinfo_x86 *c) | 25 | static void __init init_amd(struct cpuinfo_x86 *c) |
26 | { | 26 | { |
27 | #ifdef CONFIG_X86_SMP | ||
28 | int cpu = c == &boot_cpu_data ? 0 : c - cpu_data; | ||
29 | #endif | ||
30 | u32 l, h; | 27 | u32 l, h; |
31 | int mbytes = num_physpages >> (20-PAGE_SHIFT); | 28 | int mbytes = num_physpages >> (20-PAGE_SHIFT); |
32 | int r; | 29 | int r; |
@@ -198,14 +195,19 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
198 | c->x86_num_cores = 1; | 195 | c->x86_num_cores = 1; |
199 | } | 196 | } |
200 | 197 | ||
201 | #ifdef CONFIG_X86_SMP | 198 | #ifdef CONFIG_X86_HT |
202 | /* | 199 | /* |
203 | * On a AMD dual core setup the lower bits of the APIC id | 200 | * On a AMD dual core setup the lower bits of the APIC id |
204 | * distingush the cores. Assumes number of cores is a power | 201 | * distingush the cores. Assumes number of cores is a power |
205 | * of two. | 202 | * of two. |
206 | */ | 203 | */ |
207 | if (c->x86_num_cores > 1) { | 204 | if (c->x86_num_cores > 1) { |
208 | cpu_core_id[cpu] = cpu >> hweight32(c->x86_num_cores - 1); | 205 | int cpu = smp_processor_id(); |
206 | unsigned bits = 0; | ||
207 | while ((1 << bits) < c->x86_num_cores) | ||
208 | bits++; | ||
209 | cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<<bits)-1); | ||
210 | phys_proc_id[cpu] >>= bits; | ||
209 | printk(KERN_INFO "CPU %d(%d) -> Core %d\n", | 211 | printk(KERN_INFO "CPU %d(%d) -> Core %d\n", |
210 | cpu, c->x86_num_cores, cpu_core_id[cpu]); | 212 | cpu, c->x86_num_cores, cpu_core_id[cpu]); |
211 | } | 213 | } |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 6be0310e3cd3..d199e525680a 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -243,6 +243,10 @@ static void __init early_cpu_detect(void) | |||
243 | } | 243 | } |
244 | 244 | ||
245 | early_intel_workaround(c); | 245 | early_intel_workaround(c); |
246 | |||
247 | #ifdef CONFIG_X86_HT | ||
248 | phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; | ||
249 | #endif | ||
246 | } | 250 | } |
247 | 251 | ||
248 | void __init generic_identify(struct cpuinfo_x86 * c) | 252 | void __init generic_identify(struct cpuinfo_x86 * c) |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index cbea7ac582e5..35bfe138cb1a 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -888,6 +888,7 @@ void *xquad_portio; | |||
888 | 888 | ||
889 | cpumask_t cpu_sibling_map[NR_CPUS] __cacheline_aligned; | 889 | cpumask_t cpu_sibling_map[NR_CPUS] __cacheline_aligned; |
890 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; | 890 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; |
891 | EXPORT_SYMBOL(cpu_core_map); | ||
891 | 892 | ||
892 | static void __init smp_boot_cpus(unsigned int max_cpus) | 893 | static void __init smp_boot_cpus(unsigned int max_cpus) |
893 | { | 894 | { |
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 903d739ca74a..a6e0ddd65bd0 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -97,7 +97,6 @@ static void ack_vic_irq(unsigned int irq); | |||
97 | static void vic_enable_cpi(void); | 97 | static void vic_enable_cpi(void); |
98 | static void do_boot_cpu(__u8 cpuid); | 98 | static void do_boot_cpu(__u8 cpuid); |
99 | static void do_quad_bootstrap(void); | 99 | static void do_quad_bootstrap(void); |
100 | static inline void wrapper_smp_local_timer_interrupt(struct pt_regs *); | ||
101 | 100 | ||
102 | int hard_smp_processor_id(void); | 101 | int hard_smp_processor_id(void); |
103 | 102 | ||
@@ -126,6 +125,14 @@ send_QIC_CPI(__u32 cpuset, __u8 cpi) | |||
126 | } | 125 | } |
127 | 126 | ||
128 | static inline void | 127 | static inline void |
128 | wrapper_smp_local_timer_interrupt(struct pt_regs *regs) | ||
129 | { | ||
130 | irq_enter(); | ||
131 | smp_local_timer_interrupt(regs); | ||
132 | irq_exit(); | ||
133 | } | ||
134 | |||
135 | static inline void | ||
129 | send_one_CPI(__u8 cpu, __u8 cpi) | 136 | send_one_CPI(__u8 cpu, __u8 cpi) |
130 | { | 137 | { |
131 | if(voyager_quad_processors & (1<<cpu)) | 138 | if(voyager_quad_processors & (1<<cpu)) |
@@ -1249,14 +1256,6 @@ smp_vic_timer_interrupt(struct pt_regs *regs) | |||
1249 | smp_local_timer_interrupt(regs); | 1256 | smp_local_timer_interrupt(regs); |
1250 | } | 1257 | } |
1251 | 1258 | ||
1252 | static inline void | ||
1253 | wrapper_smp_local_timer_interrupt(struct pt_regs *regs) | ||
1254 | { | ||
1255 | irq_enter(); | ||
1256 | smp_local_timer_interrupt(regs); | ||
1257 | irq_exit(); | ||
1258 | } | ||
1259 | |||
1260 | /* local (per CPU) timer interrupt. It does both profiling and | 1259 | /* local (per CPU) timer interrupt. It does both profiling and |
1261 | * process statistics/rescheduling. | 1260 | * process statistics/rescheduling. |
1262 | * | 1261 | * |
diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c index db06f7399913..ab542792b27b 100644 --- a/arch/i386/mm/ioremap.c +++ b/arch/i386/mm/ioremap.c | |||
@@ -238,19 +238,21 @@ void iounmap(volatile void __iomem *addr) | |||
238 | addr < phys_to_virt(ISA_END_ADDRESS)) | 238 | addr < phys_to_virt(ISA_END_ADDRESS)) |
239 | return; | 239 | return; |
240 | 240 | ||
241 | p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); | 241 | write_lock(&vmlist_lock); |
242 | p = __remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); | ||
242 | if (!p) { | 243 | if (!p) { |
243 | printk("__iounmap: bad address %p\n", addr); | 244 | printk("iounmap: bad address %p\n", addr); |
244 | return; | 245 | goto out_unlock; |
245 | } | 246 | } |
246 | 247 | ||
247 | if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) { | 248 | if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) { |
248 | /* p->size includes the guard page, but cpa doesn't like that */ | ||
249 | change_page_attr(virt_to_page(__va(p->phys_addr)), | 249 | change_page_attr(virt_to_page(__va(p->phys_addr)), |
250 | p->size >> PAGE_SHIFT, | 250 | p->size >> PAGE_SHIFT, |
251 | PAGE_KERNEL); | 251 | PAGE_KERNEL); |
252 | global_flush_tlb(); | 252 | global_flush_tlb(); |
253 | } | 253 | } |
254 | out_unlock: | ||
255 | write_unlock(&vmlist_lock); | ||
254 | kfree(p); | 256 | kfree(p); |
255 | } | 257 | } |
256 | 258 | ||
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index be52c5ac4e05..8e8e895e1b5a 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c | |||
@@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci | |||
253 | #define MAX_PCIEROOT 6 | 253 | #define MAX_PCIEROOT 6 |
254 | static int quirk_aspm_offset[MAX_PCIEROOT << 3]; | 254 | static int quirk_aspm_offset[MAX_PCIEROOT << 3]; |
255 | 255 | ||
256 | #define GET_INDEX(a, b) (((a - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) + b) | 256 | #define GET_INDEX(a, b) ((((a) - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) + ((b) & 7)) |
257 | 257 | ||
258 | static int quirk_pcie_aspm_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) | 258 | static int quirk_pcie_aspm_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) |
259 | { | 259 | { |
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index d6598da4b67b..da21b1d07c15 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -1029,7 +1029,6 @@ void pcibios_penalize_isa_irq(int irq) | |||
1029 | static int pirq_enable_irq(struct pci_dev *dev) | 1029 | static int pirq_enable_irq(struct pci_dev *dev) |
1030 | { | 1030 | { |
1031 | u8 pin; | 1031 | u8 pin; |
1032 | extern int via_interrupt_line_quirk; | ||
1033 | struct pci_dev *temp_dev; | 1032 | struct pci_dev *temp_dev; |
1034 | 1033 | ||
1035 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 1034 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
@@ -1084,10 +1083,6 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1084 | printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n", | 1083 | printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n", |
1085 | 'A' + pin, pci_name(dev), msg); | 1084 | 'A' + pin, pci_name(dev), msg); |
1086 | } | 1085 | } |
1087 | /* VIA bridges use interrupt line for apic/pci steering across | ||
1088 | the V-Link */ | ||
1089 | else if (via_interrupt_line_quirk) | ||
1090 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15); | ||
1091 | return 0; | 1086 | return 0; |
1092 | } | 1087 | } |
1093 | 1088 | ||