mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
powerpc/pseries: Flush lazy kernel mappings after unplug operations
This ensures that the translations for unmapped IO mappings or unmapped memory are properly removed from the MMU hash table before such an unplug. Without this, the hypervisor refuses the unplug operations due to those resources still being mapped by the partition. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
4b83c330b4
commit
b4a26be9f6
3 changed files with 13 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <linux/mutex.h>
|
||||
|
|
@ -430,6 +431,8 @@ int dlpar_remove_slot(char *drc_name)
|
|||
rc = dlpar_remove_pci_slot(drc_name, dn);
|
||||
break;
|
||||
}
|
||||
vm_unmap_aliases();
|
||||
|
||||
printk(KERN_INFO "%s: slot %s removed\n", DLPAR_MODULE_NAME, drc_name);
|
||||
exit:
|
||||
mutex_unlock(&rpadlpar_mutex);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/pci_hotplug.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <asm/eeh.h> /* for eeh_add_device() */
|
||||
#include <asm/rtas.h> /* rtas_call */
|
||||
#include <asm/pci-bridge.h> /* for pci_controller */
|
||||
|
|
@ -418,6 +419,8 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
|
|||
return -EINVAL;
|
||||
|
||||
pcibios_remove_pci_devices(slot->bus);
|
||||
vm_unmap_aliases();
|
||||
|
||||
slot->state = NOT_CONFIGURED;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue