These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / s390 / mm / fault.c
index 4c8f5d7..ec1a30d 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/uaccess.h>
 #include <linux/hugetlb.h>
 #include <asm/asm-offsets.h>
+#include <asm/diag.h>
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 #include <asm/mmu_context.h>
@@ -589,7 +590,7 @@ int pfault_init(void)
                .reffcode = 0,
                .refdwlen = 5,
                .refversn = 2,
-               .refgaddr = __LC_CURRENT_PID,
+               .refgaddr = __LC_LPP,
                .refselmk = 1ULL << 48,
                .refcmpmk = 1ULL << 48,
                .reserved = __PF_RES_FIELD };
@@ -597,6 +598,7 @@ int pfault_init(void)
 
        if (pfault_disable)
                return -1;
+       diag_stat_inc(DIAG_STAT_X258);
        asm volatile(
                "       diag    %1,%0,0x258\n"
                "0:     j       2f\n"
@@ -618,6 +620,7 @@ void pfault_fini(void)
 
        if (pfault_disable)
                return;
+       diag_stat_inc(DIAG_STAT_X258);
        asm volatile(
                "       diag    %0,0,0x258\n"
                "0:\n"
@@ -646,7 +649,7 @@ static void pfault_interrupt(struct ext_code ext_code,
                return;
        inc_irq_stat(IRQEXT_PFL);
        /* Get the token (= pid of the affected task). */
-       pid = sizeof(void *) == 4 ? param32 : param64;
+       pid = param64 & LPP_PFAULT_PID_MASK;
        rcu_read_lock();
        tsk = find_task_by_pid_ns(pid, &init_pid_ns);
        if (tsk)