diff options
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 5015ca1275ca..632cda8f2e76 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -239,6 +239,25 @@ __initcall(register_memory); | |||
239 | 239 | ||
240 | 240 | ||
241 | #ifdef CONFIG_KEXEC | 241 | #ifdef CONFIG_KEXEC |
242 | |||
243 | /* | ||
244 | * This function checks if the reserved crashkernel is allowed on the specific | ||
245 | * IA64 machine flavour. Machines without an IO TLB use swiotlb and require | ||
246 | * some memory below 4 GB (i.e. in 32 bit area), see the implementation of | ||
247 | * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that | ||
248 | * in kdump case. See the comment in sba_init() in sba_iommu.c. | ||
249 | * | ||
250 | * So, the only machvec that really supports loading the kdump kernel | ||
251 | * over 4 GB is "sn2". | ||
252 | */ | ||
253 | static int __init check_crashkernel_memory(unsigned long pbase, size_t size) | ||
254 | { | ||
255 | if (ia64_platform_is("sn2") || ia64_platform_is("uv")) | ||
256 | return 1; | ||
257 | else | ||
258 | return pbase < (1UL << 32); | ||
259 | } | ||
260 | |||
242 | static void __init setup_crashkernel(unsigned long total, int *n) | 261 | static void __init setup_crashkernel(unsigned long total, int *n) |
243 | { | 262 | { |
244 | unsigned long long base = 0, size = 0; | 263 | unsigned long long base = 0, size = 0; |
@@ -252,6 +271,16 @@ static void __init setup_crashkernel(unsigned long total, int *n) | |||
252 | base = kdump_find_rsvd_region(size, | 271 | base = kdump_find_rsvd_region(size, |
253 | rsvd_region, *n); | 272 | rsvd_region, *n); |
254 | } | 273 | } |
274 | |||
275 | if (!check_crashkernel_memory(base, size)) { | ||
276 | pr_warning("crashkernel: There would be kdump memory " | ||
277 | "at %ld GB but this is unusable because it " | ||
278 | "must\nbe below 4 GB. Change the memory " | ||
279 | "configuration of the machine.\n", | ||
280 | (unsigned long)(base >> 30)); | ||
281 | return; | ||
282 | } | ||
283 | |||
255 | if (base != ~0UL) { | 284 | if (base != ~0UL) { |
256 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | 285 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " |
257 | "for crashkernel (System RAM: %ldMB)\n", | 286 | "for crashkernel (System RAM: %ldMB)\n", |
@@ -518,7 +547,8 @@ setup_arch (char **cmdline_p) | |||
518 | # ifdef CONFIG_ACPI_NUMA | 547 | # ifdef CONFIG_ACPI_NUMA |
519 | acpi_numa_init(); | 548 | acpi_numa_init(); |
520 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? | 549 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? |
521 | 32 : cpus_weight(early_cpu_possible_map)), additional_cpus); | 550 | 32 : cpus_weight(early_cpu_possible_map)), |
551 | additional_cpus > 0 ? additional_cpus : 0); | ||
522 | # endif | 552 | # endif |
523 | #else | 553 | #else |
524 | # ifdef CONFIG_SMP | 554 | # ifdef CONFIG_SMP |
@@ -531,6 +561,17 @@ setup_arch (char **cmdline_p) | |||
531 | /* process SAL system table: */ | 561 | /* process SAL system table: */ |
532 | ia64_sal_init(__va(efi.sal_systab)); | 562 | ia64_sal_init(__va(efi.sal_systab)); |
533 | 563 | ||
564 | #ifdef CONFIG_ITANIUM | ||
565 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
566 | #else | ||
567 | { | ||
568 | u64 num_phys_stacked; | ||
569 | |||
570 | if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96) | ||
571 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
572 | } | ||
573 | #endif | ||
574 | |||
534 | #ifdef CONFIG_SMP | 575 | #ifdef CONFIG_SMP |
535 | cpu_physical_id(0) = hard_smp_processor_id(); | 576 | cpu_physical_id(0) = hard_smp_processor_id(); |
536 | #endif | 577 | #endif |
@@ -538,8 +579,6 @@ setup_arch (char **cmdline_p) | |||
538 | cpu_init(); /* initialize the bootstrap CPU */ | 579 | cpu_init(); /* initialize the bootstrap CPU */ |
539 | mmu_context_init(); /* initialize context_id bitmap */ | 580 | mmu_context_init(); /* initialize context_id bitmap */ |
540 | 581 | ||
541 | check_sal_cache_flush(); | ||
542 | |||
543 | #ifdef CONFIG_ACPI | 582 | #ifdef CONFIG_ACPI |
544 | acpi_boot_init(); | 583 | acpi_boot_init(); |
545 | #endif | 584 | #endif |
@@ -567,6 +606,7 @@ setup_arch (char **cmdline_p) | |||
567 | ia64_mca_init(); | 606 | ia64_mca_init(); |
568 | 607 | ||
569 | platform_setup(cmdline_p); | 608 | platform_setup(cmdline_p); |
609 | check_sal_cache_flush(); | ||
570 | paging_init(); | 610 | paging_init(); |
571 | } | 611 | } |
572 | 612 | ||