• Ard Biesheuvel's avatar
    x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol · 1fe4d9ba
    Ard Biesheuvel authored
    commit ce9084ba upstream.
    
    Turn ARCH_USE_MEMREMAP_PROT into a generic Kconfig symbol, and fix the
    dependency expression to reflect that AMD_MEM_ENCRYPT depends on it,
    instead of the other way around. This will permit ARCH_USE_MEMREMAP_PROT
    to be selected by other architectures.
    
    Note that the encryption related early memremap routines in
    arch/x86/mm/ioremap.c cannot be built for 32-bit x86 without triggering
    the following warning:
    
         arch/x86//mm/ioremap.c: In function 'early_memremap_encrypted':
      >> arch/x86/include/asm/pgtable_types.h:193:27: warning: conversion from
                         'long long unsigned int' to 'long unsigned int' changes
                         value from '9223372036854776163' to '355' [-Woverflow]
          #define __PAGE_KERNEL_ENC (__PAGE_KERNEL | _PAGE_ENC)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         arch/x86//mm/ioremap.c:713:46: note: in expansion of macro '__PAGE_KERNE...
    1fe4d9ba
Kconfig 30 KB