Re: [PATCH] powerpc: Add POWER10 raw mode cputable entry
On 8/14/20 11:57 AM, kernel test robot wrote: Hi Madhavan, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.8 next-20200814] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Madhavan-Srinivasan/powerpc-Add-POWER10-raw-mode-cputable-entry/20200814-120142 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-defconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): arch/powerpc/kernel/cputable.c:561:26: error: '__machine_check_early_realmode_p10' undeclared here (not in a function); did you mean '__machine_check_early_realmode_p9'? 561 | .machine_check_early = __machine_check_early_realmode_p10, | ^~ | __machine_check_early_realmode_p9 Yes, i did hit this in my compile check and i added the below line, diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b4066354f073..b22216db5c71 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -75,6 +75,7 @@ extern void __restore_cpu_power10(void); extern long __machine_check_early_realmode_p7(struct pt_regs *regs); extern long __machine_check_early_realmode_p8(struct pt_regs *regs); extern long __machine_check_early_realmode_p9(struct pt_regs *regs); +extern long __machine_check_early_realmode_p10(struct pt_regs *regs); #endif /* CONFIG_PPC64 */ #if defined(CONFIG_E500) extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec); but my bad, i sent the one i internally reviewed which did not have it. I will send again. Sorry Maddy vim +561 arch/powerpc/kernel/cputable.c 136 137 static struct cpu_spec __initdata cpu_specs[] = { 138 #ifdef CONFIG_PPC_BOOK3S_64 139 { /* PPC970 */ 140 .pvr_mask = 0x, 141 .pvr_value = 0x0039, 142 .cpu_name = "PPC970", 143 .cpu_features = CPU_FTRS_PPC970, 144 .cpu_user_features = COMMON_USER_POWER4 | 145 PPC_FEATURE_HAS_ALTIVEC_COMP, 146 .mmu_features = MMU_FTRS_PPC970, 147 .icache_bsize = 128, 148 .dcache_bsize = 128, 149 .num_pmcs = 8, 150 .pmc_type = PPC_PMC_IBM, 151 .cpu_setup = __setup_cpu_ppc970, 152 .cpu_restore= __restore_cpu_ppc970, 153 .oprofile_cpu_type = "ppc64/970", 154 .oprofile_type = PPC_OPROFILE_POWER4, 155 .platform = "ppc970", 156 }, 157 { /* PPC970FX */ 158 .pvr_mask = 0x, 159 .pvr_value = 0x003c, 160 .cpu_name = "PPC970FX", 161 .cpu_features = CPU_FTRS_PPC970, 162 .cpu_user_features = COMMON_USER_POWER4 | 163 PPC_FEATURE_HAS_ALTIVEC_COMP, 164 .mmu_features = MMU_FTRS_PPC970, 165 .icache_bsize = 128, 166 .dcache_bsize = 128, 167 .num_pmcs = 8, 168 .pmc_type = PPC_PMC_IBM, 169 .cpu_setup = __setup_cpu_ppc970, 170 .cpu_restore= __restore_cpu_ppc970, 171 .oprofile_cpu_type = "ppc64/970", 172 .oprofile_type = PPC_OPROFILE_POWER4, 173 .platform = "ppc970", 174 }, 175 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ 176 .pvr_mask = 0x, 177 .pvr_value = 0x00440100, 178 .cpu_name = "PPC970MP", 179 .cpu_features = CPU_FTRS_PPC970,
Re: [PATCH] powerpc: Add POWER10 raw mode cputable entry
Hi Madhavan, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.8 next-20200814] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Madhavan-Srinivasan/powerpc-Add-POWER10-raw-mode-cputable-entry/20200814-120142 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-defconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> arch/powerpc/kernel/cputable.c:561:26: error: >> '__machine_check_early_realmode_p10' undeclared here (not in a function); >> did you mean '__machine_check_early_realmode_p9'? 561 | .machine_check_early = __machine_check_early_realmode_p10, | ^~ | __machine_check_early_realmode_p9 vim +561 arch/powerpc/kernel/cputable.c 136 137 static struct cpu_spec __initdata cpu_specs[] = { 138 #ifdef CONFIG_PPC_BOOK3S_64 139 { /* PPC970 */ 140 .pvr_mask = 0x, 141 .pvr_value = 0x0039, 142 .cpu_name = "PPC970", 143 .cpu_features = CPU_FTRS_PPC970, 144 .cpu_user_features = COMMON_USER_POWER4 | 145 PPC_FEATURE_HAS_ALTIVEC_COMP, 146 .mmu_features = MMU_FTRS_PPC970, 147 .icache_bsize = 128, 148 .dcache_bsize = 128, 149 .num_pmcs = 8, 150 .pmc_type = PPC_PMC_IBM, 151 .cpu_setup = __setup_cpu_ppc970, 152 .cpu_restore= __restore_cpu_ppc970, 153 .oprofile_cpu_type = "ppc64/970", 154 .oprofile_type = PPC_OPROFILE_POWER4, 155 .platform = "ppc970", 156 }, 157 { /* PPC970FX */ 158 .pvr_mask = 0x, 159 .pvr_value = 0x003c, 160 .cpu_name = "PPC970FX", 161 .cpu_features = CPU_FTRS_PPC970, 162 .cpu_user_features = COMMON_USER_POWER4 | 163 PPC_FEATURE_HAS_ALTIVEC_COMP, 164 .mmu_features = MMU_FTRS_PPC970, 165 .icache_bsize = 128, 166 .dcache_bsize = 128, 167 .num_pmcs = 8, 168 .pmc_type = PPC_PMC_IBM, 169 .cpu_setup = __setup_cpu_ppc970, 170 .cpu_restore= __restore_cpu_ppc970, 171 .oprofile_cpu_type = "ppc64/970", 172 .oprofile_type = PPC_OPROFILE_POWER4, 173 .platform = "ppc970", 174 }, 175 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ 176 .pvr_mask = 0x, 177 .pvr_value = 0x00440100, 178 .cpu_name = "PPC970MP", 179 .cpu_features = CPU_FTRS_PPC970, 180 .cpu_user_features = COMMON_USER_POWER4 | 181 PPC_FEATURE_HAS_ALTIVEC_COMP, 182 .mmu_features = MMU_FTRS_PPC970, 183 .icache_bsize = 128, 184 .dcache_bsize = 128, 185 .num_pmcs = 8, 186 .pmc_type = PPC_PMC_IBM, 187 .cpu_setup = __setup_cpu_ppc970, 188 .cpu_restore= __restore_cpu_ppc970, 189 .oprofile_cpu_type = "ppc64/970MP", 190 .oprofile_type = PPC_OPROFILE_POWER4, 191 .platform = "ppc970", 192 }, 193 { /* PPC970MP */ 194 .pvr_mask = 0x, 195
[PATCH] powerpc: Add POWER10 raw mode cputable entry
Add a raw mode cputable entry for POWER10. Copies most of the fields from commit a3ea40d5c736 ("powerpc: Add POWER10 architected mode") except for oprofile_cpu_type, machine_check_early, pvr_mask and pvr_mask filed. On bare metal systems we use DT CPU features, which doesn't need a cputable entry. But in VMs we still rely on the raw cputable entry to set the correct values for the PMU related fields. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/kernel/cputable.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b4066354f0730..1e052f53e5dca 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -541,6 +541,25 @@ static struct cpu_spec __initdata cpu_specs[] = { .machine_check_early= __machine_check_early_realmode_p9, .platform = "power9", }, + { /* Power10 */ + .pvr_mask = 0x, + .pvr_value = 0x0080, + .cpu_name = "POWER10 (raw)", + .cpu_features = CPU_FTRS_POWER10, + .cpu_user_features = COMMON_USER_POWER10, + .cpu_user_features2 = COMMON_USER2_POWER10, + .mmu_features = MMU_FTRS_POWER10, + .icache_bsize = 128, + .dcache_bsize = 128, + .num_pmcs = 6, + .pmc_type = PPC_PMC_IBM, + .oprofile_cpu_type = "ppc64/power10", + .oprofile_type = PPC_OPROFILE_INVALID, + .cpu_setup = __setup_cpu_power10, + .cpu_restore= __restore_cpu_power10, + .machine_check_early= __machine_check_early_realmode_p10, + .platform = "power10", + }, { /* Cell Broadband Engine */ .pvr_mask = 0x, .pvr_value = 0x0070, -- 2.26.2