diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 12:22:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 12:22:32 -0500 |
commit | 34f10fc9886450c2e8a336f7022805c4a73e10f1 (patch) | |
tree | 199a5a2b728dab33e48f5d680ad3486024ce324d /arch | |
parent | 67171a3f0335f2ecd1723851e75a0af7e2115f25 (diff) | |
parent | 87d034f3139b5f0d93df2ba58f37d6f2c2c7eeb6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86/xen: fix DomU boot problem
x86: not set node to cpu_to_node if the node is not online
x86, i387: fix ptrace leakage using init_fpu()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/i387.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/numa_64.c | 8 | ||||
-rw-r--r-- | arch/x86/xen/setup.c | 3 |
3 files changed, 12 insertions, 7 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 763dfc407232..60fe80157569 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -132,7 +132,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset, | |||
132 | if (!cpu_has_fxsr) | 132 | if (!cpu_has_fxsr) |
133 | return -ENODEV; | 133 | return -ENODEV; |
134 | 134 | ||
135 | unlazy_fpu(target); | 135 | init_fpu(target); |
136 | 136 | ||
137 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 137 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
138 | &target->thread.i387.fxsave, 0, -1); | 138 | &target->thread.i387.fxsave, 0, -1); |
@@ -147,7 +147,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset, | |||
147 | if (!cpu_has_fxsr) | 147 | if (!cpu_has_fxsr) |
148 | return -ENODEV; | 148 | return -ENODEV; |
149 | 149 | ||
150 | unlazy_fpu(target); | 150 | init_fpu(target); |
151 | set_stopped_child_used_math(target); | 151 | set_stopped_child_used_math(target); |
152 | 152 | ||
153 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 153 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
@@ -307,7 +307,7 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset, | |||
307 | if (!HAVE_HWFP) | 307 | if (!HAVE_HWFP) |
308 | return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); | 308 | return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); |
309 | 309 | ||
310 | unlazy_fpu(target); | 310 | init_fpu(target); |
311 | 311 | ||
312 | if (!cpu_has_fxsr) | 312 | if (!cpu_has_fxsr) |
313 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 313 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
@@ -332,7 +332,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset, | |||
332 | if (!HAVE_HWFP) | 332 | if (!HAVE_HWFP) |
333 | return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); | 333 | return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); |
334 | 334 | ||
335 | unlazy_fpu(target); | 335 | init_fpu(target); |
336 | set_stopped_child_used_math(target); | 336 | set_stopped_child_used_math(target); |
337 | 337 | ||
338 | if (!cpu_has_fxsr) | 338 | if (!cpu_has_fxsr) |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 59898fb0a4aa..8ccfee10f5b5 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -622,13 +622,17 @@ void __init init_cpu_to_node(void) | |||
622 | int i; | 622 | int i; |
623 | 623 | ||
624 | for (i = 0; i < NR_CPUS; i++) { | 624 | for (i = 0; i < NR_CPUS; i++) { |
625 | int node; | ||
625 | u16 apicid = x86_cpu_to_apicid_init[i]; | 626 | u16 apicid = x86_cpu_to_apicid_init[i]; |
626 | 627 | ||
627 | if (apicid == BAD_APICID) | 628 | if (apicid == BAD_APICID) |
628 | continue; | 629 | continue; |
629 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 630 | node = apicid_to_node[apicid]; |
631 | if (node == NUMA_NO_NODE) | ||
630 | continue; | 632 | continue; |
631 | numa_set_node(i, apicid_to_node[apicid]); | 633 | if (!node_online(node)) |
634 | continue; | ||
635 | numa_set_node(i, node); | ||
632 | } | 636 | } |
633 | } | 637 | } |
634 | 638 | ||
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 3bad4773a2f3..2341492bf7a0 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -38,7 +38,8 @@ char * __init xen_memory_setup(void) | |||
38 | unsigned long max_pfn = xen_start_info->nr_pages; | 38 | unsigned long max_pfn = xen_start_info->nr_pages; |
39 | 39 | ||
40 | e820.nr_map = 0; | 40 | e820.nr_map = 0; |
41 | add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM); | 41 | add_memory_region(0, LOWMEMSIZE(), E820_RAM); |
42 | add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM); | ||
42 | 43 | ||
43 | return "Xen"; | 44 | return "Xen"; |
44 | } | 45 | } |