Hi Russell,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[cannot apply to v5.0-rc8 next-20190228]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Michael-Ellerman/powerpc-powernv-idle-Restore-IAMR-after-idle/20190228-235025
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-ppc64e_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
        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
        GCC_VERSION=8.2.0 make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/entry_64.S: Assembler messages:
>> arch/powerpc/kernel/entry_64.S:279: Error: unrecognized opcode: 
>> `kuap_check_amr'
>> arch/powerpc/kernel/entry_64.S:317: Error: unrecognized opcode: 
>> `kuap_restore_amr'
   arch/powerpc/kernel/entry_64.S:606: Error: unrecognized opcode: 
`kuap_check_amr'

vim +279 arch/powerpc/kernel/entry_64.S

   250  
   251          ld      r9,TI_FLAGS(r12)
   252          li      r11,-MAX_ERRNO
   253          andi.   
r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
   254          bne-    .Lsyscall_exit_work
   255  
   256          andi.   r0,r8,MSR_FP
   257          beq 2f
   258  #ifdef CONFIG_ALTIVEC
   259          andis.  r0,r8,MSR_VEC@h
   260          bne     3f
   261  #endif
   262  2:      addi    r3,r1,STACK_FRAME_OVERHEAD
   263          bl      restore_math
   264          ld      r8,_MSR(r1)
   265          ld      r3,RESULT(r1)
   266          li      r11,-MAX_ERRNO
   267  
   268  3:      cmpld   r3,r11
   269          ld      r5,_CCR(r1)
   270          bge-    .Lsyscall_error
   271  .Lsyscall_error_cont:
   272          ld      r7,_NIP(r1)
   273  BEGIN_FTR_SECTION
   274          stdcx.  r0,0,r1                 /* to clear the reservation */
   275  END_FTR_SECTION_IFCLR(CPU_FTR_STCX_CHECKS_ADDRESS)
   276          andi.   r6,r8,MSR_PR
   277          ld      r4,_LINK(r1)
   278  
 > 279          kuap_check_amr r11
   280  
   281  #ifdef CONFIG_PPC_BOOK3S
   282          /*
   283           * Clear MSR_RI, MSR_EE is already and remains disabled. We 
could do
   284           * this later, but testing shows that doing it here causes less 
slow
   285           * down than doing it closer to the rfid.
   286           */
   287          li      r11,0
   288          mtmsrd  r11,1
   289  #endif
   290  
   291          beq-    1f
   292          ACCOUNT_CPU_USER_EXIT(r13, r11, r12)
   293  
   294  BEGIN_FTR_SECTION
   295          HMT_MEDIUM_LOW
   296  END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
   297  
   298  #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
   299          std     r8, PACATMSCRATCH(r13)
   300  #endif
   301  
   302          /*
   303           * We don't need to restore AMR on the way back to userspace 
for KUAP.
   304           * The value of AMR only matters while we're in the kernel.
   305           */
   306          ld      r13,GPR13(r1)   /* only restore r13 if returning to 
usermode */
   307          ld      r2,GPR2(r1)
   308          ld      r1,GPR1(r1)
   309          mtlr    r4
   310          mtcr    r5
   311          mtspr   SPRN_SRR0,r7
   312          mtspr   SPRN_SRR1,r8
   313          RFI_TO_USER
   314          b       .       /* prevent speculative execution */
   315  
   316  1:      /* exit to kernel */
 > 317          kuap_restore_amr r2
   318  
   319          ld      r2,GPR2(r1)
   320          ld      r1,GPR1(r1)
   321          mtlr    r4
   322          mtcr    r5
   323          mtspr   SPRN_SRR0,r7
   324          mtspr   SPRN_SRR1,r8
   325          RFI_TO_KERNEL
   326          b       .       /* prevent speculative execution */
   327  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to