diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 863c8d08c02..3dfd0985861 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -285,6 +285,26 @@ static void __init conmode_default(void) | |||
285 | } | 285 | } |
286 | } | 286 | } |
287 | 287 | ||
288 | #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE) | ||
289 | static void __init setup_zfcpdump(unsigned int console_devno) | ||
290 | { | ||
291 | static char str[64]; | ||
292 | |||
293 | if (ipl_info.type != IPL_TYPE_FCP_DUMP) | ||
294 | return; | ||
295 | if (console_devno != -1) | ||
296 | sprintf(str, "cio_ignore=all,!0.0.%04x,!0.0.%04x", | ||
297 | ipl_info.data.fcp.dev_id.devno, console_devno); | ||
298 | else | ||
299 | sprintf(str, "cio_ignore=all,!0.0.%04x", | ||
300 | ipl_info.data.fcp.dev_id.devno); | ||
301 | strcat(COMMAND_LINE, str); | ||
302 | console_loglevel = 2; | ||
303 | } | ||
304 | #else | ||
305 | static inline void setup_zfcpdump(unsigned int console_devno) {} | ||
306 | #endif /* CONFIG_ZFCPDUMP */ | ||
307 | |||
288 | #ifdef CONFIG_SMP | 308 | #ifdef CONFIG_SMP |
289 | void (*_machine_restart)(char *command) = machine_restart_smp; | 309 | void (*_machine_restart)(char *command) = machine_restart_smp; |
290 | void (*_machine_halt)(void) = machine_halt_smp; | 310 | void (*_machine_halt)(void) = machine_halt_smp; |
@@ -586,13 +606,20 @@ setup_resources(void) | |||
586 | } | 606 | } |
587 | } | 607 | } |
588 | 608 | ||
609 | unsigned long real_memory_size; | ||
610 | EXPORT_SYMBOL_GPL(real_memory_size); | ||
611 | |||
589 | static void __init setup_memory_end(void) | 612 | static void __init setup_memory_end(void) |
590 | { | 613 | { |
591 | unsigned long real_size, memory_size; | 614 | unsigned long memory_size; |
592 | unsigned long max_mem, max_phys; | 615 | unsigned long max_mem, max_phys; |
593 | int i; | 616 | int i; |
594 | 617 | ||
595 | memory_size = real_size = 0; | 618 | #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE) |
619 | if (ipl_info.type == IPL_TYPE_FCP_DUMP) | ||
620 | memory_end = ZFCPDUMP_HSA_SIZE; | ||
621 | #endif | ||
622 | memory_size = 0; | ||
596 | max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE; | 623 | max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE; |
597 | memory_end &= PAGE_MASK; | 624 | memory_end &= PAGE_MASK; |
598 | 625 | ||
@@ -601,7 +628,8 @@ static void __init setup_memory_end(void) | |||
601 | for (i = 0; i < MEMORY_CHUNKS; i++) { | 628 | for (i = 0; i < MEMORY_CHUNKS; i++) { |
602 | struct mem_chunk *chunk = &memory_chunk[i]; | 629 | struct mem_chunk *chunk = &memory_chunk[i]; |
603 | 630 | ||
604 | real_size = max(real_size, chunk->addr + chunk->size); | 631 | real_memory_size = max(real_memory_size, |
632 | chunk->addr + chunk->size); | ||
605 | if (chunk->addr >= max_mem) { | 633 | if (chunk->addr >= max_mem) { |
606 | memset(chunk, 0, sizeof(*chunk)); | 634 | memset(chunk, 0, sizeof(*chunk)); |
607 | continue; | 635 | continue; |
@@ -765,6 +793,7 @@ setup_arch(char **cmdline_p) | |||
765 | 793 | ||
766 | parse_early_param(); | 794 | parse_early_param(); |
767 | 795 | ||
796 | setup_ipl_info(); | ||
768 | setup_memory_end(); | 797 | setup_memory_end(); |
769 | setup_addressing_mode(); | 798 | setup_addressing_mode(); |
770 | setup_memory(); | 799 | setup_memory(); |
@@ -782,6 +811,9 @@ setup_arch(char **cmdline_p) | |||
782 | 811 | ||
783 | /* Setup default console */ | 812 | /* Setup default console */ |
784 | conmode_default(); | 813 | conmode_default(); |
814 | |||
815 | /* Setup zfcpdump support */ | ||
816 | setup_zfcpdump(console_devno); | ||
785 | } | 817 | } |
786 | 818 | ||
787 | void print_cpu_info(struct cpuinfo_S390 *cpuinfo) | 819 | void print_cpu_info(struct cpuinfo_S390 *cpuinfo) |