[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU3mfA_SuPqw8ZjkECnP456R=K49fg2yHdOznrSzvTjAg@mail.gmail.com>
Date: Mon, 23 Sep 2024 10:09:28 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
Huang Ying <ying.huang@...el.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [GIT PULL] MM updates for 6.12-rc1
Hi Linus,
On Sun, Sep 22, 2024 at 6:35 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Sun, 22 Sept 2024 at 02:32, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > kernel/resource.c: In function ‘gfr_start’:
> > ./include/linux/minmax.h:93:30: error: conversion from ‘long long
> > unsigned int’ to ‘resource_size_t’ {aka ‘unsigned int’} changes value
> > from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow]
> >
> > Due to
> >
> > #define PHYSMEM_END (-1ULL)
> >
> > not being correct on 32-bit without LPAE.
>
> Hmm. Can you check if making it be
>
> #define PHYSMEM_END ((phys_addr_t)-1)
>
> fixes things for you?
That fixes the warning/error, as expected.
> That said, it would probably be even better if we got rid of these
> games entirely, and m68k just defined MAX_PHYSMEM_BITS instead. Maybe
> as a config option, since I assume it's going to be either 24 or 32
> depending on CPU (or are there other choices? I used to know the old
> m68k, but...)
Indeed, on 68000 and 68008 it could be 24 resp. 20 ;-)
But all systems with a MMU (and even MC68328 without MMU) do support
a 32-bit external address space, so 32 seems fine.
BTW, other 32-bit architectures are suffering from the same issue
(kisskb shows mips, xtensa, parisc, powerpc failures).
BTW2, the following may not work with the default PHYSMEM_END due
to integer overflow, on both 32-bit and 64-bit:
mm/sparse.c: unsigned long max_sparsemem_pfn = (PHYSMEM_END + 1) >>
PAGE_SHIFT;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists