Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31149
b: refs/heads/master
c: a9d2d38
h: refs/heads/master
i:
  31147: f42df1d
v: v3
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Jun 27, 2006
1 parent 8f39382 commit 45fec9f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5a2e7fdb53028ce187c0ce0ae0d45ca7546fd5e
refs/heads/master: a9d2d386c42b816a81eb1d02dfb7b502ba8cea82
10 changes: 9 additions & 1 deletion trunk/arch/parisc/kernel/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ parisc_cache_init(void)

void disable_sr_hashing(void)
{
int srhash_type;
int srhash_type, retval;
unsigned long space_bits;

switch (boot_cpu_data.cpu_type) {
case pcx: /* We shouldn't get this far. setup.c should prevent it. */
Expand All @@ -262,6 +263,13 @@ void disable_sr_hashing(void)
}

disable_sr_hashing_asm(srhash_type);

retval = pdc_spaceid_bits(&space_bits);
/* If this procedure isn't implemented, don't panic. */
if (retval < 0 && retval != PDC_BAD_OPTION)
panic("pdc_spaceid_bits call failed.\n");
if (space_bits != 0)
panic("SpaceID hashing is still on!\n");
}

void flush_dcache_page(struct page *page)
Expand Down
20 changes: 20 additions & 0 deletions trunk/arch/parisc/kernel/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,26 @@ int pdc_cache_info(struct pdc_cache_info *cache_info)
return retval;
}

/**
* pdc_spaceid_bits - Return whether Space ID hashing is turned on.
* @space_bits: Should be 0, if not, bad mojo!
*
* Returns information about Space ID hashing.
*/
int pdc_spaceid_bits(unsigned long *space_bits)
{
int retval;

spin_lock_irq(&pdc_lock);
pdc_result[0] = 0;
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*space_bits = pdc_result[0];
spin_unlock_irq(&pdc_lock);

return retval;
}

#ifndef CONFIG_PA20
/**
* pdc_btlb_info - Return block TLB information.
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-parisc/pdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ int pdc_model_cpuid(unsigned long *cpu_id);
int pdc_model_versions(unsigned long *versions, int id);
int pdc_model_capabilities(unsigned long *capabilities);
int pdc_cache_info(struct pdc_cache_info *cache);
int pdc_spaceid_bits(unsigned long *space_bits);
#ifndef CONFIG_PA20
int pdc_btlb_info(struct pdc_btlb_info *btlb);
int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
Expand Down

0 comments on commit 45fec9f

Please sign in to comment.