aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/lpar.c
diff options
context:
space:
mode:
authorBadari Pulavarty <pbadari@us.ibm.com>2008-01-28 17:19:24 -0500
committerPaul Mackerras <paulus@samba.org>2008-02-26 06:17:03 -0500
commitf8c8803bda4db47cbbdadb9b27b024e903e1d645 (patch)
tree394411edf1626257193e904e25a4dc763528e34f /arch/powerpc/platforms/pseries/lpar.c
parentf8303dd3db57bd7ab2062985ad7a9e898a8ac423 (diff)
[POWERPC] Add code for removing HPTEs for parts of the linear mapping
For memory remove, we need to clean up htab mappings for the section of the memory we are removing. This implements support for removing htab bolted mappings for pSeries logical partitions. Other sub-archs may need to implement similar functionality for hotplug memory remove to work on them. Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/lpar.c')
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 9a455d46379d..233d9be25f49 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
520 BUG_ON(lpar_rc != H_SUCCESS); 520 BUG_ON(lpar_rc != H_SUCCESS);
521} 521}
522 522
523static void pSeries_lpar_hpte_removebolted(unsigned long ea,
524 int psize, int ssize)
525{
526 unsigned long slot, vsid, va;
527
528 vsid = get_kernel_vsid(ea, ssize);
529 va = hpt_va(ea, vsid, ssize);
530
531 slot = pSeries_lpar_hpte_find(va, psize, ssize);
532 BUG_ON(slot == -1);
533
534 pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
535}
536
523/* Flag bits for H_BULK_REMOVE */ 537/* Flag bits for H_BULK_REMOVE */
524#define HBR_REQUEST 0x4000000000000000UL 538#define HBR_REQUEST 0x4000000000000000UL
525#define HBR_RESPONSE 0x8000000000000000UL 539#define HBR_RESPONSE 0x8000000000000000UL
@@ -597,6 +611,7 @@ void __init hpte_init_lpar(void)
597 ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; 611 ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
598 ppc_md.hpte_insert = pSeries_lpar_hpte_insert; 612 ppc_md.hpte_insert = pSeries_lpar_hpte_insert;
599 ppc_md.hpte_remove = pSeries_lpar_hpte_remove; 613 ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
614 ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
600 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; 615 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
601 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; 616 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
602} 617}