Re: [PATCH 2/3] mm: add bytes_to_page_end() helper
From: David Hildenbrand (Arm)
Date: Mon May 18 2026 - 09:24:54 EST
On 5/18/26 15:15, Lorenzo Stoakes wrote:
> On Mon, May 18, 2026 at 03:06:16PM +0200, David Hildenbrand (Arm) wrote:
>> On 5/18/26 12:24, Lorenzo Stoakes wrote:
>>>
>>> Yeah please don't, that's already a weird situation I don't really love the idea
>>> of extending that.
>>>
>>> mm_types.h seems the more appropriate place.
>>
>> I think I'd prefer vdso/page.h for something as basic as that.
>>
>> But definitely no new header unless really unavoidable :)
>
> I just find vdso/page.h an extremely weird beast. what does the VDSO have to do
> with it and why are we smuggling some basic definitions there...
Yeah, I don't know the history of all that, but I know that BIT(), ALIGN() etc
are also in vdso/ ... and confused me in the past.
So as long as PAGE_MASK etc is in there, I guess adding simple helpers in there
as well is the right thing to do. (I don't know if the defines could be
reasonably moved at this point)
--
Cheers,
David