aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/kernel/cache.c10
-rw-r--r--arch/parisc/kernel/firmware.c20
-rw-r--r--include/asm-parisc/pdc.h1
3 files changed, 30 insertions, 1 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 851519cbad6f..bc7c4a4e26a1 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -236,7 +236,8 @@ parisc_cache_init(void)
236 236
237void disable_sr_hashing(void) 237void disable_sr_hashing(void)
238{ 238{
239 int srhash_type; 239 int srhash_type, retval;
240 unsigned long space_bits;
240 241
241 switch (boot_cpu_data.cpu_type) { 242 switch (boot_cpu_data.cpu_type) {
242 case pcx: /* We shouldn't get this far. setup.c should prevent it. */ 243 case pcx: /* We shouldn't get this far. setup.c should prevent it. */
@@ -262,6 +263,13 @@ void disable_sr_hashing(void)
262 } 263 }
263 264
264 disable_sr_hashing_asm(srhash_type); 265 disable_sr_hashing_asm(srhash_type);
266
267 retval = pdc_spaceid_bits(&space_bits);
268 /* If this procedure isn't implemented, don't panic. */
269 if (retval < 0 && retval != PDC_BAD_OPTION)
270 panic("pdc_spaceid_bits call failed.\n");
271 if (space_bits != 0)
272 panic("SpaceID hashing is still on!\n");
265} 273}
266 274
267void flush_dcache_page(struct page *page) 275void flush_dcache_page(struct page *page)
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 */
521int 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.
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 592f13bcc987..3d3446ec207e 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -733,6 +733,7 @@ int pdc_model_cpuid(unsigned long *cpu_id);
733int pdc_model_versions(unsigned long *versions, int id); 733int pdc_model_versions(unsigned long *versions, int id);
734int pdc_model_capabilities(unsigned long *capabilities); 734int pdc_model_capabilities(unsigned long *capabilities);
735int pdc_cache_info(struct pdc_cache_info *cache); 735int pdc_cache_info(struct pdc_cache_info *cache);
736int pdc_spaceid_bits(unsigned long *space_bits);
736#ifndef CONFIG_PA20 737#ifndef CONFIG_PA20
737int pdc_btlb_info(struct pdc_btlb_info *btlb); 738int pdc_btlb_info(struct pdc_btlb_info *btlb);
738int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); 739int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);