diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-06-16 18:20:00 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-06-27 19:28:42 -0400 |
commit | a9d2d386c42b816a81eb1d02dfb7b502ba8cea82 (patch) | |
tree | 0c01caa8a470713dc8a68db0ed584cfe3142392d /arch/parisc/kernel/firmware.c | |
parent | e5a2e7fdb53028ce187c0ce0ae0d45ca7546fd5e (diff) |
[PARISC] Ensure Space ID hashing is turned off
Check PDC_CACHE to see if spaceid hashing is turned on, and fail to
boot if that is the case.
However, some old machines do not implement the PDC_CACHE_RET_SPID
firmware call, so continue to boot if the call fails because of
PDC_BAD_OPTION (but fail in all other error returns).
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/kernel/firmware.c')
-rw-r--r-- | arch/parisc/kernel/firmware.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 0596f27340cc..c80c277454f3 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -512,6 +512,26 @@ int pdc_cache_info(struct pdc_cache_info *cache_info) | |||
512 | return retval; | 512 | return retval; |
513 | } | 513 | } |
514 | 514 | ||
515 | /** | ||
516 | * pdc_spaceid_bits - Return whether Space ID hashing is turned on. | ||
517 | * @space_bits: Should be 0, if not, bad mojo! | ||
518 | * | ||
519 | * Returns information about Space ID hashing. | ||
520 | */ | ||
521 | int pdc_spaceid_bits(unsigned long *space_bits) | ||
522 | { | ||
523 | int retval; | ||
524 | |||
525 | spin_lock_irq(&pdc_lock); | ||
526 | pdc_result[0] = 0; | ||
527 | retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0); | ||
528 | convert_to_wide(pdc_result); | ||
529 | *space_bits = pdc_result[0]; | ||
530 | spin_unlock_irq(&pdc_lock); | ||
531 | |||
532 | return retval; | ||
533 | } | ||
534 | |||
515 | #ifndef CONFIG_PA20 | 535 | #ifndef CONFIG_PA20 |
516 | /** | 536 | /** |
517 | * pdc_btlb_info - Return block TLB information. | 537 | * pdc_btlb_info - Return block TLB information. |