Hi zhong,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on v4.19-rc5 next-20180926]
[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/zhong-jiang/misc-genwqe-remove-duplicated-include-and-order-header-files-alphabetically-in-card_utils-c/20180927-005512
config: x86_64-randconfig-g0-09270408 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

   In file included from drivers/misc/genwqe/card_utils.c:25:0:
>> arch/x86/include/asm/pgtable.h:51:8: error: unknown type name 'spinlock_t'
    extern spinlock_t pgd_lock;
           ^
   In file included from drivers/misc/genwqe/card_utils.c:25:0:
   arch/x86/include/asm/pgtable.h: In function 'read_pkru':
>> arch/x86/include/asm/pgtable.h:130:2: error: implicit declaration of 
>> function 'boot_cpu_has' [-Werror=implicit-function-declaration]
     if (boot_cpu_has(X86_FEATURE_OSPKE))
     ^
>> arch/x86/include/asm/pgtable.h:131:3: error: implicit declaration of 
>> function '__read_pkru' [-Werror=implicit-function-declaration]
      return __read_pkru();
      ^
   arch/x86/include/asm/pgtable.h: In function 'write_pkru':
>> arch/x86/include/asm/pgtable.h:138:3: error: implicit declaration of 
>> function '__write_pkru' [-Werror=implicit-function-declaration]
      __write_pkru(pkru);
      ^
   In file included from arch/x86/include/asm/processor.h:24:0,
                    from arch/x86/include/asm/pgtable_64.h:14,
                    from arch/x86/include/asm/pgtable.h:694,
                    from drivers/misc/genwqe/card_utils.c:25:
   arch/x86/include/asm/special_insns.h: At top level:
>> arch/x86/include/asm/special_insns.h:122:19: error: conflicting types for 
>> '__read_pkru'
    static inline u32 __read_pkru(void)
                      ^
   In file included from drivers/misc/genwqe/card_utils.c:25:0:
   arch/x86/include/asm/pgtable.h:131:10: note: previous implicit declaration 
of '__read_pkru' was here
      return __read_pkru();
             ^
   In file included from arch/x86/include/asm/processor.h:24:0,
                    from arch/x86/include/asm/pgtable_64.h:14,
                    from arch/x86/include/asm/pgtable.h:694,
                    from drivers/misc/genwqe/card_utils.c:25:
>> arch/x86/include/asm/special_insns.h:127:20: warning: conflicting types for 
>> '__write_pkru'
    static inline void __write_pkru(u32 pkru)
                       ^
>> arch/x86/include/asm/special_insns.h:127:20: error: static declaration of 
>> '__write_pkru' follows non-static declaration
   In file included from drivers/misc/genwqe/card_utils.c:25:0:
   arch/x86/include/asm/pgtable.h:138:3: note: previous implicit declaration of 
'__write_pkru' was here
      __write_pkru(pkru);
      ^
   In file included from arch/x86/include/asm/pgtable.h:694:0,
                    from drivers/misc/genwqe/card_utils.c:25:
   arch/x86/include/asm/pgtable_64.h: In function 'native_ptep_get_and_clear':
   arch/x86/include/asm/pgtable_64.h:87:2: error: implicit declaration of 
function 'xchg' [-Werror=implicit-function-declaration]
     return native_make_pte(xchg(&xp->pte, 0));
     ^
   cc1: some warnings being treated as errors

vim +/spinlock_t +51 arch/x86/include/asm/pgtable.h

8405b122a include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30   50  
e3ed910db include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30  @51  
extern spinlock_t pgd_lock;
e3ed910db include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30   52  
extern struct list_head pgd_list;
8405b122a include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30   53  
617d34d9e arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2010-09-21   54  
extern struct mm_struct *pgd_page_get_mm(struct page *page);
617d34d9e arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2010-09-21   55  
21729f81c arch/x86/include/asm/pgtable.h Tom Lendacky        2017-07-17   56  
extern pmdval_t early_pmd_flags;
21729f81c arch/x86/include/asm/pgtable.h Tom Lendacky        2017-07-17   57  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   58  
#ifdef CONFIG_PARAVIRT
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   59  
#include <asm/paravirt.h>
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   60  
#else  /* !CONFIG_PARAVIRT */
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   61  
#define set_pte(ptep, pte)                native_set_pte(ptep, pte)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   62  
#define set_pte_at(mm, addr, ptep, pte)   native_set_pte_at(mm, addr, ptep, pte)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   63  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   64  
#define set_pte_atomic(ptep, pte)                                 \
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   65    
native_set_pte_atomic(ptep, pte)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   66  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   67  
#define set_pmd(pmdp, pmd)                native_set_pmd(pmdp, pmd)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   68  
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   69  
#ifndef __PAGETABLE_P4D_FOLDED
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   70  
#define set_pgd(pgdp, pgd)                native_set_pgd(pgdp, pgd)
ed7588d5d arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2018-05-18   71  
#define pgd_clear(pgd)                    (pgtable_l5_enabled() ? 
native_pgd_clear(pgd) : 0)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   72  
#endif
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   73  
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   74  
#ifndef set_p4d
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   75  # 
define set_p4d(p4dp, p4d)               native_set_p4d(p4dp, p4d)
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   76  
#endif
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   77  
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   78  
#ifndef __PAGETABLE_PUD_FOLDED
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   79  
#define p4d_clear(p4d)                    native_p4d_clear(p4d)
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   80  
#endif
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   81  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   82  
#ifndef set_pud
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   83  # 
define set_pud(pudp, pud)               native_set_pud(pudp, pud)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   84  
#endif
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   85  
d0f33ac9a arch/x86/include/asm/pgtable.h Arnd Bergmann       2017-03-16   86  
#ifndef __PAGETABLE_PUD_FOLDED
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   87  
#define pud_clear(pud)                    native_pud_clear(pud)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   88  
#endif
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   89  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   90  
#define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   91  
#define pmd_clear(pmd)                    native_pmd_clear(pmd)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   92  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   93  
#define pgd_val(x)        native_pgd_val(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   94  
#define __pgd(x)  native_make_pgd(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11   95  
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   96  
#ifndef __PAGETABLE_P4D_FOLDED
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   97  
#define p4d_val(x)        native_p4d_val(x)
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   98  
#define __p4d(x)  native_make_p4d(x)
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17   99  
#endif
f2a6a7050 arch/x86/include/asm/pgtable.h Kirill A. Shutemov  2017-03-17  100  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  101  
#ifndef __PAGETABLE_PUD_FOLDED
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  102  
#define pud_val(x)        native_pud_val(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  103  
#define __pud(x)  native_make_pud(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  104  
#endif
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  105  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  106  
#ifndef __PAGETABLE_PMD_FOLDED
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  107  
#define pmd_val(x)        native_pmd_val(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  108  
#define __pmd(x)  native_make_pmd(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  109  
#endif
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  110  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  111  
#define pte_val(x)        native_pte_val(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  112  
#define __pte(x)  native_make_pte(x)
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  113  
224101ed6 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-18  114  
#define arch_end_context_switch(prev)     do {} while(0)
224101ed6 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-18  115  
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  116  
#endif    /* CONFIG_PARAVIRT */
54321d947 arch/x86/include/asm/pgtable.h Jeremy Fitzhardinge 2009-02-11  117  
8405b122a include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30  118  /*
4614139c6 include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30  119   
* The following only work if pte_present() is true.
4614139c6 include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30  120   
* Undefined behaviour if not..
4614139c6 include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-01-30  121   
*/
3cbaeafeb include/asm-x86/pgtable.h      Joe Perches         2008-03-23  122  
static inline int pte_dirty(pte_t pte)
3cbaeafeb include/asm-x86/pgtable.h      Joe Perches         2008-03-23  123  {
a15af1c9e include/asm-x86/pgtable.h      Jeremy Fitzhardinge 2008-05-26  124    
return pte_flags(pte) & _PAGE_DIRTY;
3cbaeafeb include/asm-x86/pgtable.h      Joe Perches         2008-03-23  125  }
3cbaeafeb include/asm-x86/pgtable.h      Joe Perches         2008-03-23  126  
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  127  
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  128  
static inline u32 read_pkru(void)
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  129  {
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12 @130    
if (boot_cpu_has(X86_FEATURE_OSPKE))
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12 @131    
        return __read_pkru();
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  132    
return 0;
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  133  }
a927cb83f arch/x86/include/asm/pgtable.h Dave Hansen         2016-02-12  134  
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22  135  
static inline void write_pkru(u32 pkru)
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22  136  {
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22  137    
if (boot_cpu_has(X86_FEATURE_OSPKE))
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22 @138    
        __write_pkru(pkru);
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22  139  }
9e90199c2 arch/x86/include/asm/pgtable.h Xiao Guangrong      2016-03-22  140  

:::::: The code at line 51 was first introduced by commit
:::::: e3ed910db221768f8fd6192b13373e17d61bcdf0 x86: use the same pgd_list for 
PAE and 64-bit

:::::: TO: Jeremy Fitzhardinge <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

---
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