summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/pgtable.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-04-15 15:31:11 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-04-15 15:31:11 +0200
commitd1b25279c1a3fe99a14b3afc6d590e218f854b10 (patch)
treec5bb8bf18477aafe66ed22380846c8967ea21939 /arch/s390/mm/pgtable.c
parentgenirq: Use cpumask_available() for check of cpumask variable (diff)
parentirqchip/irq-imx-gpcv2: Clear OF_POPULATED flag (diff)
downloadlinux-d1b25279c1a3fe99a14b3afc6d590e218f854b10.tar.xz
linux-d1b25279c1a3fe99a14b3afc6d590e218f854b10.zip
Merge tag 'irqchip-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates from Marc Zyngier - Unify gemini and moxa irqchips under the faraday banner - Extend mtk-sysirq to deal with multiple MMIO regions - ACPI/IORT support for GICv3 ITS platform MSI - ACPI support for mbigen - Add mtk-cirq wakeup interrupt controller driver - Atmel aic5 suspend support - Allow GPCv2 to be probed both as an irqchip and a device
Diffstat (limited to 'arch/s390/mm/pgtable.c')
-rw-r--r--arch/s390/mm/pgtable.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index b48dc5f1900b..463e5ef02304 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -608,12 +608,29 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
bool test_and_clear_guest_dirty(struct mm_struct *mm, unsigned long addr)
{
spinlock_t *ptl;
+ pgd_t *pgd;
+ pud_t *pud;
+ pmd_t *pmd;
pgste_t pgste;
pte_t *ptep;
pte_t pte;
bool dirty;
- ptep = get_locked_pte(mm, addr, &ptl);
+ pgd = pgd_offset(mm, addr);
+ pud = pud_alloc(mm, pgd, addr);
+ if (!pud)
+ return false;
+ pmd = pmd_alloc(mm, pud, addr);
+ if (!pmd)
+ return false;
+ /* We can't run guests backed by huge pages, but userspace can
+ * still set them up and then try to migrate them without any
+ * migration support.
+ */
+ if (pmd_large(*pmd))
+ return true;
+
+ ptep = pte_alloc_map_lock(mm, pmd, addr, &ptl);
if (unlikely(!ptep))
return false;