linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
@ 2024-08-11 10:14 kernel test robot
  2024-08-12 17:47 ` Peter Xu
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-08-11 10:14 UTC (permalink / raw)
  To: Peter Xu; +Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   7d7894afcca68b40bfca49f4d1303167d224919e
commit: a5c1d6b162e7568305f50186568d6e033ad6d81f [206/222] mm/x86: add missing pud helpers
config: i386-randconfig-002-20240811 (https://download.01.org/0day-ci/archive/20240811/202408111850.Y7rbVXOo-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240811/202408111850.Y7rbVXOo-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/202408111850.Y7rbVXOo-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:9:
   In file included from include/linux/sched/task.h:13:
   In file included from include/linux/uaccess.h:12:
   In file included from arch/x86/include/asm/uaccess.h:17:
   In file included from arch/x86/include/asm/tlbflush.h:16:
>> arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
    1420 |                 return xchg(pudp, pud);
         |                        ^
   include/linux/atomic/atomic-instrumented.h:4758:2: note: expanded from macro 'xchg'
    4758 |         raw_xchg(__ai_ptr, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:12:18: note: expanded from macro 'raw_xchg'
      12 | #define raw_xchg arch_xchg
         |                  ^
   arch/x86/include/asm/cmpxchg.h:78:27: note: expanded from macro 'arch_xchg'
      78 | #define arch_xchg(ptr, v)       __xchg_op((ptr), (v), xchg, "")
         |                                 ^
   arch/x86/include/asm/cmpxchg.h:48:19: note: expanded from macro '__xchg_op'
      48 |                                       : "+q" (__ret), "+m" (*(ptr))     \
         |                                               ^
   1 error generated.
   make[3]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=3464415616
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1193: prepare0] Error 2 shuffle=3464415616
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:224: __sub-make] Error 2 shuffle=3464415616
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:224: __sub-make] Error 2 shuffle=3464415616
   make: Target 'prepare' not remade because of errors.


vim +1420 arch/x86/include/asm/pgtable.h

  1414	
  1415	static inline pud_t pudp_establish(struct vm_area_struct *vma,
  1416			unsigned long address, pud_t *pudp, pud_t pud)
  1417	{
  1418		page_table_check_pud_set(vma->vm_mm, pudp, pud);
  1419		if (IS_ENABLED(CONFIG_SMP)) {
> 1420			return xchg(pudp, pud);
  1421		} else {
  1422			pud_t old = *pudp;
  1423			WRITE_ONCE(*pudp, pud);
  1424			return old;
  1425		}
  1426	}
  1427	

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
  2024-08-11 10:14 [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q' kernel test robot
@ 2024-08-12 17:47 ` Peter Xu
  2024-08-13  2:27   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Xu @ 2024-08-12 17:47 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List

On Sun, Aug 11, 2024 at 06:14:39PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   7d7894afcca68b40bfca49f4d1303167d224919e
> commit: a5c1d6b162e7568305f50186568d6e033ad6d81f [206/222] mm/x86: add missing pud helpers
> config: i386-randconfig-002-20240811 (https://download.01.org/0day-ci/archive/20240811/202408111850.Y7rbVXOo-lkp@intel.com/config)
> compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240811/202408111850.Y7rbVXOo-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/202408111850.Y7rbVXOo-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from arch/x86/kernel/asm-offsets.c:14:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:17:
>    In file included from include/linux/fs.h:33:
>    In file included from include/linux/percpu-rwsem.h:7:
>    In file included from include/linux/rcuwait.h:6:
>    In file included from include/linux/sched/signal.h:9:
>    In file included from include/linux/sched/task.h:13:
>    In file included from include/linux/uaccess.h:12:
>    In file included from arch/x86/include/asm/uaccess.h:17:
>    In file included from arch/x86/include/asm/tlbflush.h:16:
> >> arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
>     1420 |                 return xchg(pudp, pud);
>          |                        ^
>    include/linux/atomic/atomic-instrumented.h:4758:2: note: expanded from macro 'xchg'
>     4758 |         raw_xchg(__ai_ptr, __VA_ARGS__); \
>          |         ^
>    include/linux/atomic/atomic-arch-fallback.h:12:18: note: expanded from macro 'raw_xchg'
>       12 | #define raw_xchg arch_xchg
>          |                  ^
>    arch/x86/include/asm/cmpxchg.h:78:27: note: expanded from macro 'arch_xchg'
>       78 | #define arch_xchg(ptr, v)       __xchg_op((ptr), (v), xchg, "")
>          |                                 ^
>    arch/x86/include/asm/cmpxchg.h:48:19: note: expanded from macro '__xchg_op'
>       48 |                                       : "+q" (__ret), "+m" (*(ptr))     \
>          |                                               ^
>    1 error generated.
>    make[3]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=3464415616
>    make[3]: Target 'prepare' not remade because of errors.
>    make[2]: *** [Makefile:1193: prepare0] Error 2 shuffle=3464415616
>    make[2]: Target 'prepare' not remade because of errors.
>    make[1]: *** [Makefile:224: __sub-make] Error 2 shuffle=3464415616
>    make[1]: Target 'prepare' not remade because of errors.
>    make: *** [Makefile:224: __sub-make] Error 2 shuffle=3464415616
>    make: Target 'prepare' not remade because of errors.
> 
> 
> vim +1420 arch/x86/include/asm/pgtable.h
> 
>   1414	
>   1415	static inline pud_t pudp_establish(struct vm_area_struct *vma,
>   1416			unsigned long address, pud_t *pudp, pud_t pud)
>   1417	{
>   1418		page_table_check_pud_set(vma->vm_mm, pudp, pud);
>   1419		if (IS_ENABLED(CONFIG_SMP)) {
> > 1420			return xchg(pudp, pud);
>   1421		} else {
>   1422			pud_t old = *pudp;
>   1423			WRITE_ONCE(*pudp, pud);
>   1424			return old;
>   1425		}
>   1426	}
>   1427	

It's a bit weird that the build won't fail if with gcc, but only trigger
this if with clang.

The issue reported here seems to be real, where it's still the i386 PAE
config and pud here should be u64.  We may need below to fix it:

===========8<============
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 1e463c9a650f..4c2d080d26b4 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1436,6 +1436,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
 }
 #endif

+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
 static inline pud_t pudp_establish(struct vm_area_struct *vma,
                unsigned long address, pud_t *pudp, pud_t pud)
 {
@@ -1448,6 +1449,7 @@ static inline pud_t pudp_establish(struct vm_area_struct *vma,
                return old;
        }
 }
+#endif

 #define __HAVE_ARCH_PMDP_INVALIDATE_AD
 extern pmd_t pmdp_invalidate_ad(struct vm_area_struct *vma,
===========8<============

I'll squash this when I repost the whole 1g pud series soon (with quite a
few commit message enhancements, and English fixes).

Thanks,

-- 
Peter Xu



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
  2024-08-12 17:47 ` Peter Xu
@ 2024-08-13  2:27   ` Andrew Morton
  2024-08-13 12:39     ` Peter Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2024-08-13  2:27 UTC (permalink / raw)
  To: Peter Xu
  Cc: kernel test robot, llvm, oe-kbuild-all, Linux Memory Management List

On Mon, 12 Aug 2024 13:47:34 -0400 Peter Xu <peterx@redhat.com> wrote:

> I'll squash this when I repost the whole 1g pud series soon (with quite a
> few commit message enhancements, and English fixes).

I'll drop the series "mm/mprotect: Fix dax puds", v4.  Please work
against latest mm-unstable.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q'
  2024-08-13  2:27   ` Andrew Morton
@ 2024-08-13 12:39     ` Peter Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Xu @ 2024-08-13 12:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel test robot, llvm, oe-kbuild-all, Linux Memory Management List

On Mon, Aug 12, 2024 at 07:27:08PM -0700, Andrew Morton wrote:
> On Mon, 12 Aug 2024 13:47:34 -0400 Peter Xu <peterx@redhat.com> wrote:
> 
> > I'll squash this when I repost the whole 1g pud series soon (with quite a
> > few commit message enhancements, and English fixes).
> 
> I'll drop the series "mm/mprotect: Fix dax puds", v4.  Please work
> against latest mm-unstable.

Yes, thanks.  I just pulled and it looks like the v4-dropped branch is
still not pushed.

Btw, I posted v5 yesterday:

  https://lore.kernel.org/r/20240812181225.1360970-1-peterx@redhat.com

I would hope it could already apply on top of latest mm-unstable after v4
dropped.  Please let me know otherwise.

Thanks,

-- 
Peter Xu



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-13 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-11 10:14 [akpm-mm:mm-unstable 206/222] arch/x86/include/asm/pgtable.h:1420:10: error: invalid output size for constraint '+q' kernel test robot
2024-08-12 17:47 ` Peter Xu
2024-08-13  2:27   ` Andrew Morton
2024-08-13 12:39     ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox