linux-stable/arch/powerpc
Michael Ellerman ee1bc694fb powerpc/kvm: Fix build error when PPC_MEM_KEYS/PPC_PSERIES=n
lkp reported a randconfig failure:

     In file included from arch/powerpc/include/asm/book3s/64/pkeys.h:6,
                    from arch/powerpc/kvm/book3s_64_mmu_host.c:15:
     arch/powerpc/include/asm/book3s/64/hash-pkey.h: In function 'hash__vmflag_to_pte_pkey_bits':
  >> arch/powerpc/include/asm/book3s/64/hash-pkey.h:10:23: error: 'VM_PKEY_BIT0' undeclared
        10 |  return (((vm_flags & VM_PKEY_BIT0) ? H_PTE_PKEY_BIT0 : 0x0UL) |
         |                       ^~~~~~~~~~~~

We added the include of book3s/64/pkeys.h for pte_to_hpte_pkey_bits(),
but that header on its own should only be included when PPC_MEM_KEYS=y.
Instead include linux/pkeys.h, which brings in the right definitions
when PPC_MEM_KEYS=y and also provides empty stubs when PPC_MEM_KEYS=n.

Fixes: e4e8bc1df6 ("powerpc/kvm: Fix PR KVM with KUAP/MEM_KEYS enabled")
Cc: stable@vger.kernel.org # v5.11+
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210425115831.2818434-1-mpe@ellerman.id.au
2021-04-27 10:48:37 +10:00
..
boot powerpc/boot: Fix build of dts/fsl 2020-12-21 22:06:09 +11:00
configs powerpc/configs: Add IBMVNIC to some 64-bit configs 2021-04-23 01:38:03 +10:00
crypto crypto: powerpc/sha256 - remove unneeded semicolon 2021-02-10 17:55:57 +11:00
include powerpc/kasan: Fix shadow start address with modules 2021-04-25 21:29:04 +10:00
kernel powerpc/kernel/iommu: Use largepool as a last resort when !largealloc 2021-04-23 12:54:58 +10:00
kexec powerpc/traps: Enhance readability for trap types 2021-04-17 22:20:19 +10:00
kvm powerpc/kvm: Fix build error when PPC_MEM_KEYS/PPC_PSERIES=n 2021-04-27 10:48:37 +10:00
lib powerpc: Move copy_inst_from_kernel_nofault() 2021-04-21 22:52:34 +10:00
math-emu powerpc/math: Fix missing __user qualifier for get_user() and other sparse warnings 2021-03-29 13:22:12 +11:00
mm powerpc/64s: Fix mm_cpumask memory ordering comment 2021-04-23 01:38:03 +10:00
net powerpc/ebpf32: Use standard function call for functions within 32M distance 2021-04-21 22:52:33 +10:00
perf powerpc/perf: Fix the threshold event selection for memory events in power10 2021-04-23 01:38:02 +10:00
platforms powerpc/44x: fix spelling mistake in Kconfig "varients" -> "variants" 2021-04-23 01:38:04 +10:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/iommu: Do not immediately panic when failed IOMMU table allocation 2021-04-23 01:38:04 +10:00
tools powerpc/tools: Remove 90 line limit in checkpatch script 2020-09-08 22:57:11 +10:00
xmon powerpc/inst: ppc_inst_as_u64() becomes ppc_inst_as_ulong() 2021-04-21 22:52:32 +10:00
Kbuild
Kconfig powerpc: Enable OPTPROBES on PPC32 2021-04-21 22:52:32 +10:00
Kconfig.debug powerpc: iommu: fix build when neither PCI or IBMVIO is set 2021-04-08 21:17:46 +10:00
Makefile powerpc: Only define _TASK_CPU for 32-bit 2021-04-20 14:22:24 +10:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00