diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-20 12:01:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-20 12:01:33 -0400 |
commit | ef46222e7b56e728e423527d430cb2013c595491 (patch) | |
tree | e0e540f992aae6dfd3bfa1f8de42461ac1656c1a /arch | |
parent | c01ad4081939f91ebd7277e8e731fd90ceb3e632 (diff) | |
parent | acd049c6e99d2ad1195666195230f6881d1c1588 (diff) |
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/setup: Fix for incorrect xen_extra_mem_start.
xen: When calling power_off, don't call the halt function.
xen: Fix compile warning when CONFIG_SMP is not defined.
xen: support CONFIG_MAXSMP
xen: partially revert "xen: set max_pfn_mapped to the last pfn mapped"
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/enlighten.c | 9 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 12 | ||||
-rw-r--r-- | arch/x86/xen/setup.c | 10 | ||||
-rw-r--r-- | arch/x86/xen/smp.c | 7 |
4 files changed, 31 insertions, 7 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index dd7b88f2ec7a..5525163a0398 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1033,6 +1033,13 @@ static void xen_machine_halt(void) | |||
1033 | xen_reboot(SHUTDOWN_poweroff); | 1033 | xen_reboot(SHUTDOWN_poweroff); |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | static void xen_machine_power_off(void) | ||
1037 | { | ||
1038 | if (pm_power_off) | ||
1039 | pm_power_off(); | ||
1040 | xen_reboot(SHUTDOWN_poweroff); | ||
1041 | } | ||
1042 | |||
1036 | static void xen_crash_shutdown(struct pt_regs *regs) | 1043 | static void xen_crash_shutdown(struct pt_regs *regs) |
1037 | { | 1044 | { |
1038 | xen_reboot(SHUTDOWN_crash); | 1045 | xen_reboot(SHUTDOWN_crash); |
@@ -1058,7 +1065,7 @@ int xen_panic_handler_init(void) | |||
1058 | static const struct machine_ops xen_machine_ops __initconst = { | 1065 | static const struct machine_ops xen_machine_ops __initconst = { |
1059 | .restart = xen_restart, | 1066 | .restart = xen_restart, |
1060 | .halt = xen_machine_halt, | 1067 | .halt = xen_machine_halt, |
1061 | .power_off = xen_machine_halt, | 1068 | .power_off = xen_machine_power_off, |
1062 | .shutdown = xen_machine_halt, | 1069 | .shutdown = xen_machine_halt, |
1063 | .crash_shutdown = xen_crash_shutdown, | 1070 | .crash_shutdown = xen_crash_shutdown, |
1064 | .emergency_restart = xen_emergency_restart, | 1071 | .emergency_restart = xen_emergency_restart, |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index dc708dcc62f1..673e968df3cf 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/page.h> | 59 | #include <asm/page.h> |
60 | #include <asm/init.h> | 60 | #include <asm/init.h> |
61 | #include <asm/pat.h> | 61 | #include <asm/pat.h> |
62 | #include <asm/smp.h> | ||
62 | 63 | ||
63 | #include <asm/xen/hypercall.h> | 64 | #include <asm/xen/hypercall.h> |
64 | #include <asm/xen/hypervisor.h> | 65 | #include <asm/xen/hypervisor.h> |
@@ -1231,7 +1232,7 @@ static void xen_flush_tlb_others(const struct cpumask *cpus, | |||
1231 | { | 1232 | { |
1232 | struct { | 1233 | struct { |
1233 | struct mmuext_op op; | 1234 | struct mmuext_op op; |
1234 | DECLARE_BITMAP(mask, NR_CPUS); | 1235 | DECLARE_BITMAP(mask, num_processors); |
1235 | } *args; | 1236 | } *args; |
1236 | struct multicall_space mcs; | 1237 | struct multicall_space mcs; |
1237 | 1238 | ||
@@ -1599,6 +1600,11 @@ static void __init xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1599 | for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { | 1600 | for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { |
1600 | pte_t pte; | 1601 | pte_t pte; |
1601 | 1602 | ||
1603 | #ifdef CONFIG_X86_32 | ||
1604 | if (pfn > max_pfn_mapped) | ||
1605 | max_pfn_mapped = pfn; | ||
1606 | #endif | ||
1607 | |||
1602 | if (!pte_none(pte_page[pteidx])) | 1608 | if (!pte_none(pte_page[pteidx])) |
1603 | continue; | 1609 | continue; |
1604 | 1610 | ||
@@ -1766,7 +1772,9 @@ pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd, | |||
1766 | initial_kernel_pmd = | 1772 | initial_kernel_pmd = |
1767 | extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE); | 1773 | extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE); |
1768 | 1774 | ||
1769 | max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->mfn_list)); | 1775 | max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + |
1776 | xen_start_info->nr_pt_frames * PAGE_SIZE + | ||
1777 | 512*1024); | ||
1770 | 1778 | ||
1771 | kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); | 1779 | kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); |
1772 | memcpy(initial_kernel_pmd, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); | 1780 | memcpy(initial_kernel_pmd, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index be1a464f6d66..60aeeb56948f 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -227,11 +227,7 @@ char * __init xen_memory_setup(void) | |||
227 | 227 | ||
228 | memcpy(map_raw, map, sizeof(map)); | 228 | memcpy(map_raw, map, sizeof(map)); |
229 | e820.nr_map = 0; | 229 | e820.nr_map = 0; |
230 | #ifdef CONFIG_X86_32 | ||
231 | xen_extra_mem_start = mem_end; | 230 | xen_extra_mem_start = mem_end; |
232 | #else | ||
233 | xen_extra_mem_start = max((1ULL << 32), mem_end); | ||
234 | #endif | ||
235 | for (i = 0; i < memmap.nr_entries; i++) { | 231 | for (i = 0; i < memmap.nr_entries; i++) { |
236 | unsigned long long end; | 232 | unsigned long long end; |
237 | 233 | ||
@@ -266,6 +262,12 @@ char * __init xen_memory_setup(void) | |||
266 | if (map[i].size > 0) | 262 | if (map[i].size > 0) |
267 | e820_add_region(map[i].addr, map[i].size, map[i].type); | 263 | e820_add_region(map[i].addr, map[i].size, map[i].type); |
268 | } | 264 | } |
265 | /* Align the balloon area so that max_low_pfn does not get set | ||
266 | * to be at the _end_ of the PCI gap at the far end (fee01000). | ||
267 | * Note that xen_extra_mem_start gets set in the loop above to be | ||
268 | * past the last E820 region. */ | ||
269 | if (xen_initial_domain() && (xen_extra_mem_start < (1ULL<<32))) | ||
270 | xen_extra_mem_start = (1ULL<<32); | ||
269 | 271 | ||
270 | /* | 272 | /* |
271 | * In domU, the ISA region is normal, usable memory, but we | 273 | * In domU, the ISA region is normal, usable memory, but we |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 41038c01de40..b4533a86d7e4 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -205,11 +205,18 @@ static void __init xen_smp_prepare_boot_cpu(void) | |||
205 | static void __init xen_smp_prepare_cpus(unsigned int max_cpus) | 205 | static void __init xen_smp_prepare_cpus(unsigned int max_cpus) |
206 | { | 206 | { |
207 | unsigned cpu; | 207 | unsigned cpu; |
208 | unsigned int i; | ||
208 | 209 | ||
209 | xen_init_lock_cpu(0); | 210 | xen_init_lock_cpu(0); |
210 | 211 | ||
211 | smp_store_cpu_info(0); | 212 | smp_store_cpu_info(0); |
212 | cpu_data(0).x86_max_cores = 1; | 213 | cpu_data(0).x86_max_cores = 1; |
214 | |||
215 | for_each_possible_cpu(i) { | ||
216 | zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); | ||
217 | zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); | ||
218 | zalloc_cpumask_var(&per_cpu(cpu_llc_shared_map, i), GFP_KERNEL); | ||
219 | } | ||
213 | set_cpu_sibling_map(0); | 220 | set_cpu_sibling_map(0); |
214 | 221 | ||
215 | if (xen_smp_intr_init(0)) | 222 | if (xen_smp_intr_init(0)) |