Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.6]
[cannot apply to powerpc/next kvm-ppc/kvm-ppc-next scottwood/next next-20200406]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    
https://github.com/0day-ci/linux/commits/Jordan-Niethe/Initial-Prefixed-Instruction-support/20200406-165215
base:    7111951b8d4973bda27ff663f2cf18b663d15b48
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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=9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <l...@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/sstep.h:5,
                    from arch/powerpc/kernel/align.c:26:
>> arch/powerpc/include/asm/inst.h:69:38: error: unknown type name 'ppc_inst'
      69 | static inline bool ppc_inst_prefixed(ppc_inst x)
         |                                      ^~~~~~~~
>> arch/powerpc/include/asm/inst.h:79:19: error: redefinition of 'ppc_inst_val'
      79 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h:21:19: note: previous definition of 
'ppc_inst_val' was here
      21 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h: In function 'ppc_inst_len':
>> arch/powerpc/include/asm/inst.h:103:10: error: implicit declaration of 
>> function 'ppc_inst_prefixed'; did you mean 'ppc_inst_write'? 
>> [-Werror=implicit-function-declaration]
     103 |  return (ppc_inst_prefixed(x)) ? 8  : 4;
         |          ^~~~~~~~~~~~~~~~~
         |          ppc_inst_write
   In file included from include/linux/kernel.h:11,
                    from arch/powerpc/kernel/align.c:16:
   arch/powerpc/kernel/align.c: In function 'fix_alignment':
>> arch/powerpc/include/asm/uaccess.h:115:9: error: implicit declaration of 
>> function 'ppc_inst_prefix'; did you mean 'ppc_inst_read'? 
>> [-Werror=implicit-function-declaration]
     115 |   (x) = ppc_inst_prefix(prefix, suffix); \
         |         ^~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> arch/powerpc/kernel/align.c:307:15: note: in expansion of macro 
>> '__get_user_instr'
     307 |  if (unlikely(__get_user_instr(instr, (void __user *)regs->nip)))
         |               ^~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/uaccess.h:115:9: error: incompatible types when 
>> assigning to type 'struct ppc_inst' from type 'int'
     115 |   (x) = ppc_inst_prefix(prefix, suffix); \
         |         ^~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> arch/powerpc/kernel/align.c:307:15: note: in expansion of macro 
>> '__get_user_instr'
     307 |  if (unlikely(__get_user_instr(instr, (void __user *)regs->nip)))
         |               ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from arch/powerpc/include/asm/code-patching.h:14,
                    from arch/powerpc/kernel/process.c:60:
>> arch/powerpc/include/asm/inst.h:69:38: error: unknown type name 'ppc_inst'
      69 | static inline bool ppc_inst_prefixed(ppc_inst x)
         |                                      ^~~~~~~~
>> arch/powerpc/include/asm/inst.h:79:19: error: redefinition of 'ppc_inst_val'
      79 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h:21:19: note: previous definition of 
'ppc_inst_val' was here
      21 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h: In function 'ppc_inst_len':
>> arch/powerpc/include/asm/inst.h:103:10: error: implicit declaration of 
>> function 'ppc_inst_prefixed'; did you mean 'ppc_inst_write'? 
>> [-Werror=implicit-function-declaration]
     103 |  return (ppc_inst_prefixed(x)) ? 8  : 4;
         |          ^~~~~~~~~~~~~~~~~
         |          ppc_inst_write
   cc1: all warnings being treated as errors
--
   In file included from arch/powerpc/include/asm/code-patching.h:14,
                    from arch/powerpc/kernel/setup_32.c:42:
>> arch/powerpc/include/asm/inst.h:69:38: error: unknown type name 'ppc_inst'
      69 | static inline bool ppc_inst_prefixed(ppc_inst x)
         |                                      ^~~~~~~~
>> arch/powerpc/include/asm/inst.h:79:19: error: redefinition of 'ppc_inst_val'
      79 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h:21:19: note: previous definition of 
'ppc_inst_val' was here
      21 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h: In function 'ppc_inst_len':
>> arch/powerpc/include/asm/inst.h:103:10: error: implicit declaration of 
>> function 'ppc_inst_prefixed'; did you mean 'ppc_inst_write'? 
>> [-Werror=implicit-function-declaration]
     103 |  return (ppc_inst_prefixed(x)) ? 8  : 4;
         |          ^~~~~~~~~~~~~~~~~
         |          ppc_inst_write
   In file included from arch/powerpc/include/asm/asm-compat.h:6,
                    from arch/powerpc/include/asm/bitops.h:42,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from arch/powerpc/kernel/setup_32.c:6:
   arch/powerpc/kernel/setup_32.c: In function 'machine_init':
   arch/powerpc/include/asm/ppc-opcode.h:234:24: error: incompatible type for 
argument 2 of 'patch_instruction_site'
     234 | #define PPC_INST_NOP   0x60000000
         |                        ^~~~~~~~~~
         |                        |
         |                        int
   arch/powerpc/kernel/setup_32.c:89:49: note: in expansion of macro 
'PPC_INST_NOP'
      89 |  patch_instruction_site(&patch__memcpy_nocache, PPC_INST_NOP);
         |                                                 ^~~~~~~~~~~~
   In file included from arch/powerpc/kernel/setup_32.c:42:
   arch/powerpc/include/asm/code-patching.h:39:69: note: expected 'struct 
ppc_inst' but argument is of type 'int'
      39 | static inline int patch_instruction_site(s32 *site, struct ppc_inst 
instr)
         |                                                     
~~~~~~~~~~~~~~~~^~~~~
   arch/powerpc/kernel/setup_32.c:91:48: error: passing argument 1 of 
'branch_target' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
      91 |  create_cond_branch(&insn, addr, branch_target(addr), 0x820000);
         |                                                ^~~~
         |                                                |
         |                                                unsigned int *
   In file included from arch/powerpc/kernel/setup_32.c:42:
   arch/powerpc/include/asm/code-patching.h:63:52: note: expected 'const struct 
ppc_inst *' but argument is of type 'unsigned int *'
      63 | unsigned long branch_target(const struct ppc_inst *instr);
         |                             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   arch/powerpc/kernel/setup_32.c:91:28: error: passing argument 2 of 
'create_cond_branch' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
      91 |  create_cond_branch(&insn, addr, branch_target(addr), 0x820000);
         |                            ^~~~
         |                            |
         |                            unsigned int *
   In file included from arch/powerpc/kernel/setup_32.c:42:
   arch/powerpc/include/asm/code-patching.h:28:71: note: expected 'const struct 
ppc_inst *' but argument is of type 'unsigned int *'
      28 | int create_cond_branch(struct ppc_inst *instr, const struct ppc_inst 
*addr,
         |                                                
~~~~~~~~~~~~~~~~~~~~~~~^~~~
   arch/powerpc/kernel/setup_32.c:92:20: error: passing argument 1 of 
'patch_instruction' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
      92 |  patch_instruction(addr, insn); /* replace b by bne cr0 */
         |                    ^~~~
         |                    |
         |                    unsigned int *
   In file included from arch/powerpc/kernel/setup_32.c:42:
   arch/powerpc/include/asm/code-patching.h:31:40: note: expected 'struct 
ppc_inst *' but argument is of type 'unsigned int *'
      31 | int patch_instruction(struct ppc_inst *addr, struct ppc_inst instr);
         |                       ~~~~~~~~~~~~~~~~~^~~~
   cc1: all warnings being treated as errors
--
   In file included from arch/powerpc/include/asm/code-patching.h:14,
                    from arch/powerpc/include/asm/kprobes.h:24,
                    from include/linux/kprobes.h:30,
                    from arch/powerpc/lib/code-patching.c:7:
>> arch/powerpc/include/asm/inst.h:69:38: error: unknown type name 'ppc_inst'
      69 | static inline bool ppc_inst_prefixed(ppc_inst x)
         |                                      ^~~~~~~~
>> arch/powerpc/include/asm/inst.h:79:19: error: redefinition of 'ppc_inst_val'
      79 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h:21:19: note: previous definition of 
'ppc_inst_val' was here
      21 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h: In function 'ppc_inst_len':
>> arch/powerpc/include/asm/inst.h:103:10: error: implicit declaration of 
>> function 'ppc_inst_prefixed'; did you mean 'ppc_inst_write'? 
>> [-Werror=implicit-function-declaration]
     103 |  return (ppc_inst_prefixed(x)) ? 8  : 4;
         |          ^~~~~~~~~~~~~~~~~
         |          ppc_inst_write
   In file included from include/linux/uaccess.h:11,
                    from arch/powerpc/include/asm/sections.h:7,
                    from include/linux/kallsyms.h:15,
                    from include/linux/ftrace.h:11,
                    from include/linux/kprobes.h:29,
                    from arch/powerpc/lib/code-patching.c:7:
   arch/powerpc/lib/code-patching.c: In function '__patch_instruction':
>> arch/powerpc/lib/code-patching.c:34:23: error: implicit declaration of 
>> function 'ppc_inst_suffix'; did you mean 'ppc_inst_swab'? 
>> [-Werror=implicit-function-declaration]
      34 |   __put_user_asm((u64)ppc_inst_suffix(instr) << 32 | 
ppc_inst_val(instr), patch_addr, err, "std");
         |                       ^~~~~~~~~~~~~~~
   arch/powerpc/include/asm/uaccess.h:153:10: note: in definition of macro 
'__put_user_asm'
     153 |   : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err))
         |          ^
   cc1: all warnings being treated as errors
--
   In file included from arch/powerpc/include/asm/code-patching.h:14,
                    from arch/powerpc/include/asm/kprobes.h:24,
                    from include/linux/kprobes.h:30,
                    from arch/powerpc/lib/sstep.c:8:
>> arch/powerpc/include/asm/inst.h:69:38: error: unknown type name 'ppc_inst'
      69 | static inline bool ppc_inst_prefixed(ppc_inst x)
         |                                      ^~~~~~~~
>> arch/powerpc/include/asm/inst.h:79:19: error: redefinition of 'ppc_inst_val'
      79 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h:21:19: note: previous definition of 
'ppc_inst_val' was here
      21 | static inline u32 ppc_inst_val(struct ppc_inst x)
         |                   ^~~~~~~~~~~~
   arch/powerpc/include/asm/inst.h: In function 'ppc_inst_len':
>> arch/powerpc/include/asm/inst.h:103:10: error: implicit declaration of 
>> function 'ppc_inst_prefixed'; did you mean 'ppc_inst_write'? 
>> [-Werror=implicit-function-declaration]
     103 |  return (ppc_inst_prefixed(x)) ? 8  : 4;
         |          ^~~~~~~~~~~~~~~~~
         |          ppc_inst_write
   arch/powerpc/lib/sstep.c: In function 'analyse_instr':
>> arch/powerpc/lib/sstep.c:1176:11: error: implicit declaration of function 
>> 'ppc_inst_suffix'; did you mean 'ppc_inst_swab'? 
>> [-Werror=implicit-function-declaration]
    1176 |  suffix = ppc_inst_suffix(instr);
         |           ^~~~~~~~~~~~~~~
         |           ppc_inst_swab
   cc1: all warnings being treated as errors

vim +/ppc_inst +69 arch/powerpc/include/asm/inst.h

    68  
  > 69  static inline bool ppc_inst_prefixed(ppc_inst x)
    70  {
    71          return 0;
    72  }
    73  
    74  static inline struct ppc_inst ppc_inst_swab(struct ppc_inst x)
    75  {
    76          return ppc_inst(swab32(ppc_inst_val(x)));
    77  }
    78  
  > 79  static inline u32 ppc_inst_val(struct ppc_inst x)
    80  {
    81          return x.val;
    82  }
    83  
    84  static inline struct ppc_inst ppc_inst_read(const struct ppc_inst *ptr)
    85  {
    86          return *ptr;
    87  }
    88  
    89  static inline void ppc_inst_write(struct ppc_inst *ptr, struct ppc_inst 
x)
    90  {
    91          *ptr = x;
    92  }
    93  
    94  #endif /* __powerpc64__ */
    95  
    96  static inline bool ppc_inst_equal(struct ppc_inst x, struct ppc_inst y)
    97  {
    98          return !memcmp(&x, &y, sizeof(struct ppc_inst));
    99  }
   100  
   101  static inline int ppc_inst_len(struct ppc_inst x)
   102  {
 > 103          return (ppc_inst_prefixed(x)) ? 8  : 4;
   104  }
   105  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to