diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 19:50:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 19:50:49 -0400 |
commit | 33ae0cdd3eaba219e7c2f0647b6db4be540e2130 (patch) | |
tree | 1d0cb11644b40b500ad98e7af3bcac78012dec59 | |
parent | f5ba0cf3cb145f9a8cc125fb0cc013c5656d6259 (diff) | |
parent | fe086a7bea7ab714930bd48addba961ceeef7634 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Provide ACPI fixup for /proc/cpuinfo/physical_id
[IA64] Remove printk noise on unimplemented SAL_PHYSICAL_ID_INFO
[IA64] allocate multiple contiguous pages via uncached allocator
[IA64] bugfix: nptcg breaks cpu-hotadd
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 12 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 9 | ||||
-rw-r--r-- | arch/ia64/kernel/uncached.c | 23 | ||||
-rw-r--r-- | arch/ia64/mm/tlb.c | 5 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 9 | ||||
-rw-r--r-- | drivers/char/mspec.c | 12 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_partition.c | 4 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/uncached.h | 6 | ||||
-rw-r--r-- | include/asm-x86/topology.h | 4 |
10 files changed, 61 insertions, 25 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 16483be18c0b..d7ad42b77d41 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -873,7 +873,8 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
873 | u16 pltid; | 873 | u16 pltid; |
874 | pal_logical_to_physical_t info; | 874 | pal_logical_to_physical_t info; |
875 | 875 | ||
876 | if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) { | 876 | status = ia64_pal_logical_to_phys(-1, &info); |
877 | if (status != PAL_STATUS_SUCCESS) { | ||
877 | if (status != PAL_STATUS_UNIMPLEMENTED) { | 878 | if (status != PAL_STATUS_UNIMPLEMENTED) { |
878 | printk(KERN_ERR | 879 | printk(KERN_ERR |
879 | "ia64_pal_logical_to_phys failed with %ld\n", | 880 | "ia64_pal_logical_to_phys failed with %ld\n", |
@@ -885,8 +886,13 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
885 | info.overview_cpp = 1; | 886 | info.overview_cpp = 1; |
886 | info.overview_tpc = 1; | 887 | info.overview_tpc = 1; |
887 | } | 888 | } |
888 | if ((status = ia64_sal_physical_id_info(&pltid)) != PAL_STATUS_SUCCESS) { | 889 | |
889 | printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status); | 890 | status = ia64_sal_physical_id_info(&pltid); |
891 | if (status != PAL_STATUS_SUCCESS) { | ||
892 | if (status != PAL_STATUS_UNIMPLEMENTED) | ||
893 | printk(KERN_ERR | ||
894 | "ia64_sal_pltid failed with %ld\n", | ||
895 | status); | ||
890 | return; | 896 | return; |
891 | } | 897 | } |
892 | 898 | ||
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index a2484fc1a06c..abb17a613b17 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -27,6 +27,15 @@ | |||
27 | 27 | ||
28 | static struct ia64_cpu *sysfs_cpus; | 28 | static struct ia64_cpu *sysfs_cpus; |
29 | 29 | ||
30 | void arch_fix_phys_package_id(int num, u32 slot) | ||
31 | { | ||
32 | #ifdef CONFIG_SMP | ||
33 | if (cpu_data(num)->socket_id == -1) | ||
34 | cpu_data(num)->socket_id = slot; | ||
35 | #endif | ||
36 | } | ||
37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); | ||
38 | |||
30 | int arch_register_cpu(int num) | 39 | int arch_register_cpu(int num) |
31 | { | 40 | { |
32 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) | 41 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index 2a90c32024f4..e77995a6e3ed 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001-2006 Silicon Graphics, Inc. All rights reserved. | 2 | * Copyright (C) 2001-2008 Silicon Graphics, Inc. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -177,12 +177,13 @@ failed: | |||
177 | * uncached_alloc_page | 177 | * uncached_alloc_page |
178 | * | 178 | * |
179 | * @starting_nid: node id of node to start with, or -1 | 179 | * @starting_nid: node id of node to start with, or -1 |
180 | * @n_pages: number of contiguous pages to allocate | ||
180 | * | 181 | * |
181 | * Allocate 1 uncached page. Allocates on the requested node. If no | 182 | * Allocate the specified number of contiguous uncached pages on the |
182 | * uncached pages are available on the requested node, roundrobin starting | 183 | * the requested node. If not enough contiguous uncached pages are available |
183 | * with the next higher node. | 184 | * on the requested node, roundrobin starting with the next higher node. |
184 | */ | 185 | */ |
185 | unsigned long uncached_alloc_page(int starting_nid) | 186 | unsigned long uncached_alloc_page(int starting_nid, int n_pages) |
186 | { | 187 | { |
187 | unsigned long uc_addr; | 188 | unsigned long uc_addr; |
188 | struct uncached_pool *uc_pool; | 189 | struct uncached_pool *uc_pool; |
@@ -202,7 +203,8 @@ unsigned long uncached_alloc_page(int starting_nid) | |||
202 | if (uc_pool->pool == NULL) | 203 | if (uc_pool->pool == NULL) |
203 | continue; | 204 | continue; |
204 | do { | 205 | do { |
205 | uc_addr = gen_pool_alloc(uc_pool->pool, PAGE_SIZE); | 206 | uc_addr = gen_pool_alloc(uc_pool->pool, |
207 | n_pages * PAGE_SIZE); | ||
206 | if (uc_addr != 0) | 208 | if (uc_addr != 0) |
207 | return uc_addr; | 209 | return uc_addr; |
208 | } while (uncached_add_chunk(uc_pool, nid) == 0); | 210 | } while (uncached_add_chunk(uc_pool, nid) == 0); |
@@ -217,11 +219,12 @@ EXPORT_SYMBOL(uncached_alloc_page); | |||
217 | /* | 219 | /* |
218 | * uncached_free_page | 220 | * uncached_free_page |
219 | * | 221 | * |
220 | * @uc_addr: uncached address of page to free | 222 | * @uc_addr: uncached address of first page to free |
223 | * @n_pages: number of contiguous pages to free | ||
221 | * | 224 | * |
222 | * Free a single uncached page. | 225 | * Free the specified number of uncached pages. |
223 | */ | 226 | */ |
224 | void uncached_free_page(unsigned long uc_addr) | 227 | void uncached_free_page(unsigned long uc_addr, int n_pages) |
225 | { | 228 | { |
226 | int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); | 229 | int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); |
227 | struct gen_pool *pool = uncached_pools[nid].pool; | 230 | struct gen_pool *pool = uncached_pools[nid].pool; |
@@ -232,7 +235,7 @@ void uncached_free_page(unsigned long uc_addr) | |||
232 | if ((uc_addr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) | 235 | if ((uc_addr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) |
233 | panic("uncached_free_page invalid address %lx\n", uc_addr); | 236 | panic("uncached_free_page invalid address %lx\n", uc_addr); |
234 | 237 | ||
235 | gen_pool_free(pool, uc_addr, PAGE_SIZE); | 238 | gen_pool_free(pool, uc_addr, n_pages * PAGE_SIZE); |
236 | } | 239 | } |
237 | EXPORT_SYMBOL(uncached_free_page); | 240 | EXPORT_SYMBOL(uncached_free_page); |
238 | 241 | ||
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index d52ec4e83409..8caf42471f0d 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -168,7 +168,10 @@ setup_ptcg_sem(int max_purges, int nptcg_from) | |||
168 | static int firstcpu = 1; | 168 | static int firstcpu = 1; |
169 | 169 | ||
170 | if (toolatetochangeptcgsem) { | 170 | if (toolatetochangeptcgsem) { |
171 | BUG_ON(max_purges < nptcg); | 171 | if (nptcg_from == NPTCG_FROM_PAL && max_purges == 0) |
172 | BUG_ON(1 < nptcg); | ||
173 | else | ||
174 | BUG_ON(max_purges < nptcg); | ||
172 | return; | 175 | return; |
173 | } | 176 | } |
174 | 177 | ||
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index dd28c912e84f..5241e3ff5080 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -603,6 +603,15 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid) | |||
603 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); | 603 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); |
604 | } | 604 | } |
605 | 605 | ||
606 | /* | ||
607 | * If ACPI describes a slot number for this CPU, we can use it | ||
608 | * ensure we get the right value in the "physical id" field | ||
609 | * of /proc/cpuinfo | ||
610 | */ | ||
611 | status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer); | ||
612 | if (ACPI_SUCCESS(status)) | ||
613 | arch_fix_phys_package_id(pr->id, object.integer.value); | ||
614 | |||
606 | return 0; | 615 | return 0; |
607 | } | 616 | } |
608 | 617 | ||
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index ff146c2b08fd..fe2a95b5d3c0 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -180,7 +180,7 @@ mspec_close(struct vm_area_struct *vma) | |||
180 | my_page = vdata->maddr[index]; | 180 | my_page = vdata->maddr[index]; |
181 | vdata->maddr[index] = 0; | 181 | vdata->maddr[index] = 0; |
182 | if (!mspec_zero_block(my_page, PAGE_SIZE)) | 182 | if (!mspec_zero_block(my_page, PAGE_SIZE)) |
183 | uncached_free_page(my_page); | 183 | uncached_free_page(my_page, 1); |
184 | else | 184 | else |
185 | printk(KERN_WARNING "mspec_close(): " | 185 | printk(KERN_WARNING "mspec_close(): " |
186 | "failed to zero page %ld\n", my_page); | 186 | "failed to zero page %ld\n", my_page); |
@@ -209,7 +209,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address) | |||
209 | index = (address - vdata->vm_start) >> PAGE_SHIFT; | 209 | index = (address - vdata->vm_start) >> PAGE_SHIFT; |
210 | maddr = (volatile unsigned long) vdata->maddr[index]; | 210 | maddr = (volatile unsigned long) vdata->maddr[index]; |
211 | if (maddr == 0) { | 211 | if (maddr == 0) { |
212 | maddr = uncached_alloc_page(numa_node_id()); | 212 | maddr = uncached_alloc_page(numa_node_id(), 1); |
213 | if (maddr == 0) | 213 | if (maddr == 0) |
214 | return NOPFN_OOM; | 214 | return NOPFN_OOM; |
215 | 215 | ||
@@ -218,7 +218,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address) | |||
218 | vdata->count++; | 218 | vdata->count++; |
219 | vdata->maddr[index] = maddr; | 219 | vdata->maddr[index] = maddr; |
220 | } else { | 220 | } else { |
221 | uncached_free_page(maddr); | 221 | uncached_free_page(maddr, 1); |
222 | maddr = vdata->maddr[index]; | 222 | maddr = vdata->maddr[index]; |
223 | } | 223 | } |
224 | spin_unlock(&vdata->lock); | 224 | spin_unlock(&vdata->lock); |
@@ -367,7 +367,7 @@ mspec_init(void) | |||
367 | int nasid; | 367 | int nasid; |
368 | unsigned long phys; | 368 | unsigned long phys; |
369 | 369 | ||
370 | scratch_page[nid] = uncached_alloc_page(nid); | 370 | scratch_page[nid] = uncached_alloc_page(nid, 1); |
371 | if (scratch_page[nid] == 0) | 371 | if (scratch_page[nid] == 0) |
372 | goto free_scratch_pages; | 372 | goto free_scratch_pages; |
373 | phys = __pa(scratch_page[nid]); | 373 | phys = __pa(scratch_page[nid]); |
@@ -414,7 +414,7 @@ mspec_init(void) | |||
414 | free_scratch_pages: | 414 | free_scratch_pages: |
415 | for_each_node(nid) { | 415 | for_each_node(nid) { |
416 | if (scratch_page[nid] != 0) | 416 | if (scratch_page[nid] != 0) |
417 | uncached_free_page(scratch_page[nid]); | 417 | uncached_free_page(scratch_page[nid], 1); |
418 | } | 418 | } |
419 | return ret; | 419 | return ret; |
420 | } | 420 | } |
@@ -431,7 +431,7 @@ mspec_exit(void) | |||
431 | 431 | ||
432 | for_each_node(nid) { | 432 | for_each_node(nid) { |
433 | if (scratch_page[nid] != 0) | 433 | if (scratch_page[nid] != 0) |
434 | uncached_free_page(scratch_page[nid]); | 434 | uncached_free_page(scratch_page[nid], 1); |
435 | } | 435 | } |
436 | } | 436 | } |
437 | } | 437 | } |
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c index 27e200ec5826..acd3fd4285d7 100644 --- a/drivers/misc/sgi-xp/xpc_partition.c +++ b/drivers/misc/sgi-xp/xpc_partition.c | |||
@@ -211,7 +211,7 @@ xpc_rsvd_page_init(void) | |||
211 | */ | 211 | */ |
212 | amos_page = xpc_vars->amos_page; | 212 | amos_page = xpc_vars->amos_page; |
213 | if (amos_page == NULL) { | 213 | if (amos_page == NULL) { |
214 | amos_page = (AMO_t *)TO_AMO(uncached_alloc_page(0)); | 214 | amos_page = (AMO_t *)TO_AMO(uncached_alloc_page(0, 1)); |
215 | if (amos_page == NULL) { | 215 | if (amos_page == NULL) { |
216 | dev_err(xpc_part, "can't allocate page of AMOs\n"); | 216 | dev_err(xpc_part, "can't allocate page of AMOs\n"); |
217 | return NULL; | 217 | return NULL; |
@@ -230,7 +230,7 @@ xpc_rsvd_page_init(void) | |||
230 | dev_err(xpc_part, "can't change memory " | 230 | dev_err(xpc_part, "can't change memory " |
231 | "protections\n"); | 231 | "protections\n"); |
232 | uncached_free_page(__IA64_UNCACHED_OFFSET | | 232 | uncached_free_page(__IA64_UNCACHED_OFFSET | |
233 | TO_PHYS((u64)amos_page)); | 233 | TO_PHYS((u64)amos_page), 1); |
234 | return NULL; | 234 | return NULL; |
235 | } | 235 | } |
236 | } | 236 | } |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index f2f72ef2a897..32863b3bb1d3 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -116,6 +116,8 @@ void build_cpu_to_node_map(void); | |||
116 | #define smt_capable() (smp_num_siblings > 1) | 116 | #define smt_capable() (smp_num_siblings > 1) |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | extern void arch_fix_phys_package_id(int num, u32 slot); | ||
120 | |||
119 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | 121 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ |
120 | CPU_MASK_ALL : \ | 122 | CPU_MASK_ALL : \ |
121 | node_to_cpumask(pcibus_to_node(bus)) \ | 123 | node_to_cpumask(pcibus_to_node(bus)) \ |
diff --git a/include/asm-ia64/uncached.h b/include/asm-ia64/uncached.h index b82d923b73c1..13d7e65ca3cc 100644 --- a/include/asm-ia64/uncached.h +++ b/include/asm-ia64/uncached.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001-2005 Silicon Graphics, Inc. All rights reserved. | 2 | * Copyright (C) 2001-2008 Silicon Graphics, Inc. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -8,5 +8,5 @@ | |||
8 | * Prototypes for the uncached page allocator | 8 | * Prototypes for the uncached page allocator |
9 | */ | 9 | */ |
10 | 10 | ||
11 | extern unsigned long uncached_alloc_page(int nid); | 11 | extern unsigned long uncached_alloc_page(int starting_nid, int n_pages); |
12 | extern void uncached_free_page(unsigned long); | 12 | extern void uncached_free_page(unsigned long uc_addr, int n_pages); |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 0e6d6b03affe..4f35a0fb4f22 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -193,6 +193,10 @@ extern cpumask_t cpu_coregroup_map(int cpu); | |||
193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | static inline void arch_fix_phys_package_id(int num, u32 slot) | ||
197 | { | ||
198 | } | ||
199 | |||
196 | struct pci_bus; | 200 | struct pci_bus; |
197 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | 201 | void set_pci_bus_resources_arch_default(struct pci_bus *b); |
198 | 202 | ||