All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: alexs@kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [alexshi:mmunstable 31/41] arch/s390/include/asm/pgalloc.h:140:27: error: initialization of 'struct ptdesc *' from incompatible pointer type 'pte_t *'
Date: Wed, 24 Jul 2024 23:42:21 +0800	[thread overview]
Message-ID: <202407242312.7e6oLU4e-lkp@intel.com> (raw)

tree:   https://github.com/alexshi/linux.git mmunstable
head:   45de53e1a6ceb1ede64b54126f9ee514f50c4e4c
commit: a0b75c1c1fda3892f1c8e0946254a4cb1226e10a [31/41] mm/pgtable: fully use ptdesc in pte_alloc_one series functions
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20240724/202407242312.7e6oLU4e-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240724/202407242312.7e6oLU4e-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407242312.7e6oLU4e-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/s390/include/asm/mmu_context.h:11,
                    from arch/s390/include/asm/elf.h:173,
                    from include/linux/elf.h:6,
                    from include/linux/module.h:19,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/blk_types.h:11,
                    from include/linux/writeback.h:13,
                    from include/linux/memcontrol.h:23,
                    from include/linux/swap.h:9,
                    from include/linux/mm_inline.h:8,
                    from mm/memory.c:45:
   mm/memory.c: In function '__pte_alloc':
>> arch/s390/include/asm/pgalloc.h:140:27: error: initialization of 'struct ptdesc *' from incompatible pointer type 'pte_t *' [-Wincompatible-pointer-types]
     140 | #define pte_alloc_one(mm) ((pte_t *)page_table_alloc(mm))
         |                           ^
   mm/memory.c:448:33: note: in expansion of macro 'pte_alloc_one'
     448 |         struct ptdesc *ptdesc = pte_alloc_one(mm);
         |                                 ^~~~~~~~~~~~~
   In file included from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from mm/memory.c:44:
   mm/memory.c: In function '__do_fault':
   include/linux/mm_types.h:502:51: error: '_Generic' selector of type 'pte_t *' is not compatible with any association
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                                   ^
   mm/memory.c:4650:37: note: in expansion of macro 'ptdesc_page'
    4650 |                 vmf->prealloc_pte = ptdesc_page(pte_alloc_one(vma->vm_mm));
         |                                     ^~~~~~~~~~~
   mm/memory.c: In function 'do_set_pmd':
   include/linux/mm_types.h:502:51: error: '_Generic' selector of type 'pte_t *' is not compatible with any association
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                                   ^
   mm/memory.c:4728:37: note: in expansion of macro 'ptdesc_page'
    4728 |                 vmf->prealloc_pte = ptdesc_page(pte_alloc_one(vma->vm_mm));
         |                                     ^~~~~~~~~~~
   mm/memory.c: In function 'do_fault_around':
   include/linux/mm_types.h:502:51: error: '_Generic' selector of type 'pte_t *' is not compatible with any association
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                                   ^
   mm/memory.c:5013:37: note: in expansion of macro 'ptdesc_page'
    5013 |                 vmf->prealloc_pte = ptdesc_page(pte_alloc_one(vmf->vma->vm_mm));
         |                                     ^~~~~~~~~~~
--
   mm/huge_memory.c: In function '__do_huge_pmd_anonymous_page':
>> mm/huge_memory.c:959:16: error: assignment to 'struct ptdesc *' from incompatible pointer type 'pte_t *' [-Wincompatible-pointer-types]
     959 |         ptdesc = pte_alloc_one(vma->vm_mm);
         |                ^
   In file included from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from mm/huge_memory.c:8:
   include/linux/mm_types.h:504:41: error: passing argument 3 of 'pgtable_trans_huge_deposit' from incompatible pointer type [-Wincompatible-pointer-types]
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     503 |         const struct ptdesc *:          (const struct page *)(pt),      \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     504 |         struct ptdesc *:                (struct page *)(pt)))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         struct page *
   mm/huge_memory.c:997:66: note: in expansion of macro 'ptdesc_page'
     997 |                 pgtable_trans_huge_deposit(vma->vm_mm, vmf->pmd, ptdesc_page(ptdesc));
         |                                                                  ^~~~~~~~~~~
   In file included from include/linux/pgtable.h:6,
                    from include/linux/mm.h:30:
   arch/s390/include/asm/pgtable.h:1717:43: note: expected 'pgtable_t' {aka 'pte_t *'} but argument is of type 'struct page *'
    1717 |                                 pgtable_t pgtable);
         |                                 ~~~~~~~~~~^~~~~~~
   mm/huge_memory.c: In function 'do_huge_pmd_anonymous_page':
   mm/huge_memory.c:1091:24: error: assignment to 'struct ptdesc *' from incompatible pointer type 'pte_t *' [-Wincompatible-pointer-types]
    1091 |                 ptdesc = pte_alloc_one(vma->vm_mm);
         |                        ^
   include/linux/mm_types.h:504:41: error: passing argument 1 of 'set_huge_zero_folio' from incompatible pointer type [-Wincompatible-pointer-types]
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     503 |         const struct ptdesc *:          (const struct page *)(pt),      \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     504 |         struct ptdesc *:                (struct page *)(pt)))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         struct page *
   mm/huge_memory.c:1113:53: note: in expansion of macro 'ptdesc_page'
    1113 |                                 set_huge_zero_folio(ptdesc_page(ptdesc), vma->vm_mm, vma,
         |                                                     ^~~~~~~~~~~
   mm/huge_memory.c:1055:43: note: expected 'pgtable_t' {aka 'pte_t *'} but argument is of type 'struct page *'
    1055 | static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm,
         |                                 ~~~~~~~~~~^~~~~~~
   mm/huge_memory.c: In function 'insert_pfn_pmd':
   include/linux/mm_types.h:504:41: error: passing argument 3 of 'pgtable_trans_huge_deposit' from incompatible pointer type [-Wincompatible-pointer-types]
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     503 |         const struct ptdesc *:          (const struct page *)(pt),      \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     504 |         struct ptdesc *:                (struct page *)(pt)))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         struct page *
   mm/huge_memory.c:1167:53: note: in expansion of macro 'ptdesc_page'
    1167 |                 pgtable_trans_huge_deposit(mm, pmd, ptdesc_page(ptdesc));
         |                                                     ^~~~~~~~~~~
   arch/s390/include/asm/pgtable.h:1717:43: note: expected 'pgtable_t' {aka 'pte_t *'} but argument is of type 'struct page *'
    1717 |                                 pgtable_t pgtable);
         |                                 ~~~~~~~~~~^~~~~~~
   mm/huge_memory.c: In function 'vmf_insert_pfn_pmd':
   mm/huge_memory.c:1213:24: error: assignment to 'struct ptdesc *' from incompatible pointer type 'pte_t *' [-Wincompatible-pointer-types]
    1213 |                 ptdesc = pte_alloc_one(vma->vm_mm);
         |                        ^
   mm/huge_memory.c: In function 'copy_huge_pmd':
   mm/huge_memory.c:1376:16: error: assignment to 'struct ptdesc *' from incompatible pointer type 'pte_t *' [-Wincompatible-pointer-types]
    1376 |         ptdesc = pte_alloc_one(dst_mm);
         |                ^
   include/linux/mm_types.h:504:41: error: passing argument 3 of 'pgtable_trans_huge_deposit' from incompatible pointer type [-Wincompatible-pointer-types]
     502 | #define ptdesc_page(pt)                 (_Generic((pt),                 \
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     503 |         const struct ptdesc *:          (const struct page *)(pt),      \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     504 |         struct ptdesc *:                (struct page *)(pt)))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         struct page *
   mm/huge_memory.c:1449:53: note: in expansion of macro 'ptdesc_page'
    1449 |         pgtable_trans_huge_deposit(dst_mm, dst_pmd, ptdesc_page(ptdesc));
         |                                                     ^~~~~~~~~~~
   arch/s390/include/asm/pgtable.h:1717:43: note: expected 'pgtable_t' {aka 'pte_t *'} but argument is of type 'struct page *'
    1717 |                                 pgtable_t pgtable);
         |                                 ~~~~~~~~~~^~~~~~~


vim +140 arch/s390/include/asm/pgalloc.h

b2fa47e6bf5148a arch/s390/include/asm/pgalloc.h Martin Schwidefsky      2011-05-23  135  
^1da177e4c3f415 include/asm-s390/pgalloc.h      Linus Torvalds          2005-04-16  136  /*
^1da177e4c3f415 include/asm-s390/pgalloc.h      Linus Torvalds          2005-04-16  137   * page table entry allocation/free routines.
^1da177e4c3f415 include/asm-s390/pgalloc.h      Linus Torvalds          2005-04-16  138   */
4cf58924951ef80 arch/s390/include/asm/pgalloc.h Joel Fernandes (Google  2019-01-03  139) #define pte_alloc_one_kernel(mm) ((pte_t *)page_table_alloc(mm))
4cf58924951ef80 arch/s390/include/asm/pgalloc.h Joel Fernandes (Google  2019-01-03 @140) #define pte_alloc_one(mm) ((pte_t *)page_table_alloc(mm))
146e4b3c8b92071 include/asm-s390/pgalloc.h      Martin Schwidefsky      2008-02-09  141  

:::::: The code at line 140 was first introduced by commit
:::::: 4cf58924951ef80eec636b863e7a53973c44261a mm: treewide: remove unused address argument from pte_alloc functions

:::::: TO: Joel Fernandes (Google) <joel@joelfernandes.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-07-24 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202407242312.7e6oLU4e-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexs@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.