powerpc/pseries: Enable support of ibm,dynamic-memory-v2
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Fri, 1 Dec 2017 16:48:03 +0000 (10:48 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 16 Jan 2018 12:26:30 +0000 (23:26 +1100)
Add required bits to the architecture vector to enable support
of the ibm,dynamic-memory-v2 device tree property.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/firmware.h
arch/powerpc/include/asm/prom.h
arch/powerpc/kernel/prom_init.c
arch/powerpc/platforms/pseries/firmware.c

index 8645897472b10bfcb5bd6a4ac3699d3e375ce439..832df61f30ef9bc9b963ab2de649345000099dfb 100644 (file)
@@ -51,6 +51,7 @@
 #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
 #define FW_FEATURE_PRRN                ASM_CONST(0x0000000200000000)
+#define FW_FEATURE_DRMEM_V2    ASM_CONST(0x0000000400000000)
 
 #ifndef __ASSEMBLY__
 
@@ -67,7 +68,7 @@ enum {
                FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
                FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
                FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN |
-               FW_FEATURE_HPT_RESIZE,
+               FW_FEATURE_HPT_RESIZE | FW_FEATURE_DRMEM_V2,
        FW_FEATURE_PSERIES_ALWAYS = 0,
        FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL,
        FW_FEATURE_POWERNV_ALWAYS = 0,
index f0a30a003bd878a11067dad9420c1bd5536f65fc..9f27866e3126d82d9e1e051f3a0b82995cc0217c 100644 (file)
@@ -143,6 +143,7 @@ extern int of_get_ibm_chip_id(struct device_node *np);
 #define OV5_PFO_HW_842         0x1140  /* PFO Compression Accelerator */
 #define OV5_PFO_HW_ENCR                0x1120  /* PFO Encryption Accelerator */
 #define OV5_SUB_PROCESSORS     0x1501  /* 1,2,or 4 Sub-Processors supported */
+#define OV5_DRMEM_V2           0x1680  /* ibm,dynamic-reconfiguration-v2 */
 #define OV5_XIVE_SUPPORT       0x17C0  /* XIVE Exploitation Support Mask */
 #define OV5_XIVE_LEGACY                0x1700  /* XIVE legacy mode Only */
 #define OV5_XIVE_EXPLOIT       0x1740  /* XIVE exploitation mode Only */
index 02190e90c7aef4a1a71d513542ebcef556295753..acf4b2e0530cb671df1e80d56927e8650f0c2f84 100644 (file)
@@ -869,6 +869,7 @@ struct ibm_arch_vec __cacheline_aligned ibm_architecture_vec = {
                .reserved2 = 0,
                .reserved3 = 0,
                .subprocessors = 1,
+               .byte22 = OV5_FEAT(OV5_DRMEM_V2),
                .intarch = 0,
                .mmu = 0,
                .hash_ext = 0,
index 63cc82ad58ac2ed766bd374b3f0ef754c52b5160..aac3ea2911b2189eb8d87e45ddfdfc5d3b56887c 100644 (file)
@@ -114,6 +114,7 @@ static __initdata struct vec5_fw_feature
 vec5_fw_features_table[] = {
        {FW_FEATURE_TYPE1_AFFINITY,     OV5_TYPE1_AFFINITY},
        {FW_FEATURE_PRRN,               OV5_PRRN},
+       {FW_FEATURE_DRMEM_V2,           OV5_DRMEM_V2},
 };
 
 static void __init fw_vec5_feature_init(const char *vec5, unsigned long len)