diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:04:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:04:22 -0400 |
commit | 21cdbc1378e8aa96e1ed4a606dce1a8e7daf7fdf (patch) | |
tree | 55b6c294b912ccdc3eede15960b0ece53a69d902 /arch/s390/kernel/early.c | |
parent | 86d9c070175de65890794fa227b68297da6206d8 (diff) | |
parent | ef3500b2b2955af4fa6b0564b51c0c604e38c571 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (81 commits)
[S390] remove duplicated #includes
[S390] cpumask: use mm_cpumask() wrapper
[S390] cpumask: Use accessors code.
[S390] cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.
[S390] cpumask: remove cpu_coregroup_map
[S390] fix clock comparator save area usage
[S390] Add hwcap flag for the etf3 enhancement facility
[S390] Ensure that ipl panic notifier is called late.
[S390] fix dfp elf hwcap/facility bit detection
[S390] smp: perform initial cpu reset before starting a cpu
[S390] smp: fix memory leak on __cpu_up
[S390] ipl: Improve checking logic and remove switch defaults.
[S390] s390dbf: Remove needless check for NULL pointer.
[S390] s390dbf: Remove redundant initilizations.
[S390] use kzfree()
[S390] BUG to BUG_ON changes
[S390] zfcpdump: Prevent zcore from beeing built as a kernel module.
[S390] Use csum_partial in checksum.h
[S390] cleanup lowcore.h
[S390] eliminate ipl_device from lowcore
...
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 2a2ca268b1dd..4d221c81c849 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Heiko Carstens <heiko.carstens@de.ibm.com> | 6 | * Heiko Carstens <heiko.carstens@de.ibm.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/compiler.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
@@ -20,6 +21,7 @@ | |||
20 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
21 | #include <asm/sections.h> | 22 | #include <asm/sections.h> |
22 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/sysinfo.h> | ||
23 | #include <asm/cpcmd.h> | 25 | #include <asm/cpcmd.h> |
24 | #include <asm/sclp.h> | 26 | #include <asm/sclp.h> |
25 | #include "entry.h" | 27 | #include "entry.h" |
@@ -173,19 +175,21 @@ static noinline __init void init_kernel_storage_key(void) | |||
173 | page_set_storage_key(init_pfn << PAGE_SHIFT, PAGE_DEFAULT_KEY); | 175 | page_set_storage_key(init_pfn << PAGE_SHIFT, PAGE_DEFAULT_KEY); |
174 | } | 176 | } |
175 | 177 | ||
178 | static __initdata struct sysinfo_3_2_2 vmms __aligned(PAGE_SIZE); | ||
179 | |||
176 | static noinline __init void detect_machine_type(void) | 180 | static noinline __init void detect_machine_type(void) |
177 | { | 181 | { |
178 | struct cpuinfo_S390 *cpuinfo = &S390_lowcore.cpu_data; | 182 | /* No VM information? Looks like LPAR */ |
179 | 183 | if (stsi(&vmms, 3, 2, 2) == -ENOSYS) | |
180 | get_cpu_id(&S390_lowcore.cpu_data.cpu_id); | 184 | return; |
181 | 185 | if (!vmms.count) | |
182 | /* Running under z/VM ? */ | 186 | return; |
183 | if (cpuinfo->cpu_id.version == 0xff) | ||
184 | machine_flags |= MACHINE_FLAG_VM; | ||
185 | 187 | ||
186 | /* Running under KVM ? */ | 188 | /* Running under KVM? If not we assume z/VM */ |
187 | if (cpuinfo->cpu_id.version == 0xfe) | 189 | if (!memcmp(vmms.vm[0].cpi, "\xd2\xe5\xd4", 3)) |
188 | machine_flags |= MACHINE_FLAG_KVM; | 190 | machine_flags |= MACHINE_FLAG_KVM; |
191 | else | ||
192 | machine_flags |= MACHINE_FLAG_VM; | ||
189 | } | 193 | } |
190 | 194 | ||
191 | static __init void early_pgm_check_handler(void) | 195 | static __init void early_pgm_check_handler(void) |
@@ -348,7 +352,6 @@ static void __init setup_boot_command_line(void) | |||
348 | 352 | ||
349 | /* copy arch command line */ | 353 | /* copy arch command line */ |
350 | strlcpy(boot_command_line, COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); | 354 | strlcpy(boot_command_line, COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); |
351 | boot_command_line[ARCH_COMMAND_LINE_SIZE - 1] = 0; | ||
352 | 355 | ||
353 | /* append IPL PARM data to the boot command line */ | 356 | /* append IPL PARM data to the boot command line */ |
354 | if (MACHINE_IS_VM) { | 357 | if (MACHINE_IS_VM) { |