diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-26 01:44:58 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-26 01:44:58 -0400 |
commit | 2f98492c5375e906e48c78d88351f45bb11b6a8a (patch) | |
tree | 13373dbdc047a2b70623dbf2cd3181865266f976 /arch/sh/kernel/cpu | |
parent | b18cae4224bde7e5a332c19bc99247b2098ea232 (diff) |
sh: Expose physical addressing mode through cpuinfo.
CPUs can be in either the legacy 29-bit or 32-bit physical addressing
modes. This follows the x86 approach of tracking the phys bits in cpuinfo
and exposing it to userspace through procfs.
This change was requested to permit kexec-tools to detect the physical
addressing mode in order to determine the appropriate address mangling.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r-- | arch/sh/kernel/cpu/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c index 97661061ff20..fac742e514ee 100644 --- a/arch/sh/kernel/cpu/init.c +++ b/arch/sh/kernel/cpu/init.c | |||
@@ -340,6 +340,8 @@ asmlinkage void __cpuinit cpu_init(void) | |||
340 | */ | 340 | */ |
341 | current_cpu_data.asid_cache = NO_CONTEXT; | 341 | current_cpu_data.asid_cache = NO_CONTEXT; |
342 | 342 | ||
343 | current_cpu_data.phys_bits = __in_29bit_mode() ? 29 : 32; | ||
344 | |||
343 | speculative_execution_init(); | 345 | speculative_execution_init(); |
344 | expmask_init(); | 346 | expmask_init(); |
345 | 347 | ||