From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <lkp@intel.com>,
"David Hildenbrand (Red Hat)" <david@kernel.org>,
oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
linux-sh@vger.kernel.org
Subject: Re: [akpm-mm:mm-unstable 36/283] include/uapi/linux/const.h:20:25: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '17179869184' to '0'
Date: Thu, 13 Nov 2025 19:23:30 +0100 [thread overview]
Message-ID: <CAMuHMdXpUat2cTH_YBqQNUQY4=Y3em38GDY5vr+HYhd_qk3qcA@mail.gmail.com> (raw)
In-Reply-To: <20251113100036.70130321f6629ce9cc8956cf@linux-foundation.org>
Hi Andrew,
On Thu, 13 Nov 2025 at 19:08, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Thu, 13 Nov 2025 20:26:42 +0800 kernel test robot <lkp@intel.com> wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> > head: f58b4cb6b0c11172a25c2ade23477f55596d7138
> > commit: 2f6ff71280ffddb27ad7174d24f573e2683870cd [36/283] mm: fix MAX_FOLIO_ORDER on powerpc configs with hugetlb
> > config: sh-randconfig-002-20251113 (https://download.01.org/0day-ci/archive/20251113/202511132024.tfRZgB5P-lkp@intel.com/config)
> > compiler: sh4-linux-gcc (GCC) 11.5.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/202511132024.tfRZgB5P-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/202511132024.tfRZgB5P-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > In file included from arch/sh/include/asm/bug.h:112,
> > from include/linux/bug.h:5,
> > from include/linux/mmdebug.h:5,
> > from include/linux/mm.h:6,
> > from include/linux/migrate.h:5,
> > from mm/migrate.c:16:
> > mm/internal.h: In function 'folio_set_order':
> > >> include/uapi/linux/const.h:20:25: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '17179869184' to '0' [-Woverflow]
> > 20 | #define __AC(X,Y) (X##Y)
> > | ^~~~~~
> > include/asm-generic/bug.h:111:32: note: in definition of macro 'WARN_ON_ONCE'
> > 111 | int __ret_warn_on = !!(condition); \
> > | ^~~~~~~~~
> > mm/internal.h:758:9: note: in expansion of macro 'VM_WARN_ON_ONCE'
> > 758 | VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
> > | ^~~~~~~~~~~~~~~
> > include/uapi/linux/const.h:21:25: note: in expansion of macro '__AC'
> > 21 | #define _AC(X,Y) __AC(X,Y)
> > | ^~~~
> > include/linux/sizes.h:56:41: note: in expansion of macro '_AC'
> > 56 | #define SZ_16G _AC(0x400000000, ULL)
> > | ^~~
> > include/linux/mm.h:2095:43: note: in expansion of macro 'SZ_16G'
> > 2095 | #define MAX_FOLIO_ORDER get_order(SZ_16G)
> > | ^~~~~~
> > mm/internal.h:758:33: note: in expansion of macro 'MAX_FOLIO_ORDER'
> > 758 | VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
> > | ^~~~~~~~~~~~~~~
>
> Oh gee.
>
> Here's the patch: https://lkml.kernel.org/r/20251112145632.508687-1-david@kernel.org
>
> I'll append a copy below.
>
> For a start, you have found an sh config which sets neither
> CONFIG_32BIT not CONFIG_64BIT. Should that even be possible?
Apparently yes...
arch/sh/mm/Kconfig:
config 29BIT
def_bool !32BIT
select UNCACHED_MAPPING
config 32BIT
bool
default !MMU
config PMB
bool "Support 32-bit physical addressing through PMB"
depends on MMU && CPU_SH4A && !CPU_SH4AL_DSP
select 32BIT
select UNCACHED_MAPPING
help
If you say Y here, physical addressing will be extended to
32-bits through the SH-4A PMB. If this is not set, legacy
29-bit physical addressing will be used.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2025-11-13 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 12:26 kernel test robot
2025-11-13 18:00 ` Andrew Morton
2025-11-13 18:23 ` Geert Uytterhoeven [this message]
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='CAMuHMdXpUat2cTH_YBqQNUQY4=Y3em38GDY5vr+HYhd_qk3qcA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkp@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox