[arm-platforms:irq/domain_cleanup 11/17] arch/x86/include/asm/pgtable_types.h:60:43: warning: left shift count >= width of type

kernel test robot lkp at intel.com
Thu May 13 06:34:13 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head:   8e0598e62fa7869706329d39c485097a24ee4b4b
commit: 0280c7950849a75ff5473618af7ddbfe624d2746 [11/17] irqdomain: Introduce irq_resolve_mapping()
config: x86_64-randconfig-a011-20210513 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=0280c7950849a75ff5473618af7ddbfe624d2746
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/domain_cleanup
        git checkout 0280c7950849a75ff5473618af7ddbfe624d2746
        # save the attached .config to linux build tree
        make W=1 W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/paravirt_types.h:39,
                    from arch/x86/include/asm/ptrace.h:97,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:13,
                    from arch/x86/include/asm/timex.h:5,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:11,
                    from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   arch/x86/include/asm/pgtable.h: In function 'pte_flags_pkey':
>> arch/x86/include/asm/pgtable_types.h:60:43: warning: left shift count >= width of type [-Wshift-count-overflow]
      60 | #define _PAGE_PKEY_BIT0 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT0)
         |                                           ^~
   arch/x86/include/asm/pgtable_types.h:71:26: note: in expansion of macro '_PAGE_PKEY_BIT0'
      71 | #define _PAGE_PKEY_MASK (_PAGE_PKEY_BIT0 | \
         |                          ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable.h:1393:22: note: in expansion of macro '_PAGE_PKEY_MASK'
    1393 |  return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
         |                      ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:61:43: warning: left shift count >= width of type [-Wshift-count-overflow]
      61 | #define _PAGE_PKEY_BIT1 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT1)
         |                                           ^~
   arch/x86/include/asm/pgtable_types.h:72:5: note: in expansion of macro '_PAGE_PKEY_BIT1'
      72 |     _PAGE_PKEY_BIT1 | \
         |     ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable.h:1393:22: note: in expansion of macro '_PAGE_PKEY_MASK'
    1393 |  return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
         |                      ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:62:43: warning: left shift count >= width of type [-Wshift-count-overflow]
      62 | #define _PAGE_PKEY_BIT2 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT2)
         |                                           ^~
   arch/x86/include/asm/pgtable_types.h:73:5: note: in expansion of macro '_PAGE_PKEY_BIT2'
      73 |     _PAGE_PKEY_BIT2 | \
         |     ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable.h:1393:22: note: in expansion of macro '_PAGE_PKEY_MASK'
    1393 |  return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
         |                      ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:63:43: warning: left shift count >= width of type [-Wshift-count-overflow]
      63 | #define _PAGE_PKEY_BIT3 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT3)
         |                                           ^~
   arch/x86/include/asm/pgtable_types.h:74:5: note: in expansion of macro '_PAGE_PKEY_BIT3'
      74 |     _PAGE_PKEY_BIT3)
         |     ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable.h:1393:22: note: in expansion of macro '_PAGE_PKEY_MASK'
    1393 |  return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
         |                      ^~~~~~~~~~~~~~~
   In file included from include/linux/pgtable.h:6,
                    from include/linux/kasan.h:28,
                    from include/linux/slab.h:136,
                    from include/linux/irq.h:21,
                    from include/linux/irqdomain.h:34,
                    from arch/x86/include/asm/irqdomain.h:5,
                    from arch/x86/include/asm/msi.h:5,
                    from include/linux/msi.h:7,
                    from arch/x86/include/asm/mshyperv.h:7,
                    from include/clocksource/hyperv_timer.h:18,
                    from arch/x86/include/asm/vdso/gettimeofday.h:21,
                    from include/vdso/datapage.h:137,
                    from arch/x86/entry/vdso/vdso32/../../../../../lib/vdso/gettimeofday.c:5,
                    from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15,
                    from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
>> arch/x86/include/asm/pgtable.h:1393:39: warning: right shift count >= width of type [-Wshift-count-overflow]
    1393 |  return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
         |                                       ^~
   In file included from include/linux/kasan.h:28,
                    from include/linux/slab.h:136,
                    from include/linux/irq.h:21,
                    from include/linux/irqdomain.h:34,
                    from arch/x86/include/asm/irqdomain.h:5,
                    from arch/x86/include/asm/msi.h:5,
                    from include/linux/msi.h:7,
                    from arch/x86/include/asm/mshyperv.h:7,
                    from include/clocksource/hyperv_timer.h:18,
                    from arch/x86/include/asm/vdso/gettimeofday.h:21,
                    from include/vdso/datapage.h:137,
                    from arch/x86/entry/vdso/vdso32/../../../../../lib/vdso/gettimeofday.c:5,
                    from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15,
                    from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   include/linux/pgtable.h: At top level:
   include/linux/pgtable.h:1511:2: error: #error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
    1511 | #error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
         |  ^~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   arch/x86/entry/vdso/vdso32/../vclock_gettime.c:70:5: warning: no previous prototype for '__vdso_clock_gettime64' [-Wmissing-prototypes]
      70 | int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
         |     ^~~~~~~~~~~~~~~~~~~~~~


vim +60 arch/x86/include/asm/pgtable_types.h

8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  42  
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  43  #define _PAGE_PRESENT	(_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  44  #define _PAGE_RW	(_AT(pteval_t, 1) << _PAGE_BIT_RW)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  45  #define _PAGE_USER	(_AT(pteval_t, 1) << _PAGE_BIT_USER)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  46  #define _PAGE_PWT	(_AT(pteval_t, 1) << _PAGE_BIT_PWT)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  47  #define _PAGE_PCD	(_AT(pteval_t, 1) << _PAGE_BIT_PCD)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  48  #define _PAGE_ACCESSED	(_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  49  #define _PAGE_DIRTY	(_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  50  #define _PAGE_PSE	(_AT(pteval_t, 1) << _PAGE_BIT_PSE)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  51  #define _PAGE_GLOBAL	(_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
c46a7c817e662a Mel Gorman          2014-06-04  52  #define _PAGE_SOFTW1	(_AT(pteval_t, 1) << _PAGE_BIT_SOFTW1)
f955371ca9d398 David Vrabel        2014-01-07  53  #define _PAGE_SOFTW2	(_AT(pteval_t, 1) << _PAGE_BIT_SOFTW2)
6c0df8689494e1 Joerg Roedel        2018-07-18  54  #define _PAGE_SOFTW3	(_AT(pteval_t, 1) << _PAGE_BIT_SOFTW3)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  55  #define _PAGE_PAT	(_AT(pteval_t, 1) << _PAGE_BIT_PAT)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  56  #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  57  #define _PAGE_SPECIAL	(_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  58  #define _PAGE_CPA_TEST	(_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
5c1d90f51027e1 Dave Hansen         2016-02-12  59  #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
5c1d90f51027e1 Dave Hansen         2016-02-12 @60  #define _PAGE_PKEY_BIT0	(_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT0)
5c1d90f51027e1 Dave Hansen         2016-02-12  61  #define _PAGE_PKEY_BIT1	(_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT1)
5c1d90f51027e1 Dave Hansen         2016-02-12  62  #define _PAGE_PKEY_BIT2	(_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT2)
5c1d90f51027e1 Dave Hansen         2016-02-12  63  #define _PAGE_PKEY_BIT3	(_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT3)
5c1d90f51027e1 Dave Hansen         2016-02-12  64  #else
5c1d90f51027e1 Dave Hansen         2016-02-12  65  #define _PAGE_PKEY_BIT0	(_AT(pteval_t, 0))
5c1d90f51027e1 Dave Hansen         2016-02-12  66  #define _PAGE_PKEY_BIT1	(_AT(pteval_t, 0))
5c1d90f51027e1 Dave Hansen         2016-02-12  67  #define _PAGE_PKEY_BIT2	(_AT(pteval_t, 0))
5c1d90f51027e1 Dave Hansen         2016-02-12  68  #define _PAGE_PKEY_BIT3	(_AT(pteval_t, 0))
5c1d90f51027e1 Dave Hansen         2016-02-12  69  #endif
8d19c99faf6165 Jeremy Fitzhardinge 2009-02-08  70  

:::::: The code at line 60 was first introduced by commit
:::::: 5c1d90f51027e197e1299ab1235a2fed78910905 x86/mm/pkeys: Add PTE bits for storing protection key

:::::: TO: Dave Hansen <dave.hansen at linux.intel.com>
:::::: CC: Ingo Molnar <mingo at kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35035 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210513/1365aef5/attachment-0001.gz>


More information about the linux-arm-kernel mailing list