Re: [PATCH] mm: Introduce page_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 May 2019 18:55:11 -0700 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> > > +	return (unsigned long)PAGE_SIZE << compound_order(page);
> > > + }
> > 
> > Also, I suspect the cast here is unneeded.  Architectures used to
> > differe in the type of PAGE_SIZE but please tell me that's been fixed
> > for a lomng time...
> 
> It's an unsigned int for most, if not all architectures.  For, eg,
> PowerPC, a PUD page is larger than 4GB.  So let's just include the cast
> and not have to worry about undefined semantics screwing us over.

I think you'll find that PAGE_SIZE is unsigned long on all
architectures.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux