Re: [PATCH v15 23/23] selftests: vm: pkeys: Use the correct page size on powerpc

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

 



Hi Michael,

On 15/01/20 12:37 pm, Michael Ellerman wrote:
> Sandipan Das <sandipan@xxxxxxxxxxxxx> writes:
>> Both 4K and 64K pages are supported on powerpc. Parts of
>> the selftest code perform alignment computations based on
>> the PAGE_SIZE macro which is currently hardcoded to 64K
>> for powerpc. This causes some test failures on kernels
>> configured with 4K page size.
>>
>> This problem is solved by determining the correct page
>> size during the build process rather than hardcoding it
>> in the header file.
> 
> Doing it at build time is wrong, the test could be built on a 4K system
> and then run on a 64K system, or vice versa.
> 
> You should just use getpagesize() at runtime.
> 
> cheers
> 

The reason I chose to do it this way was because PAGE_SIZE also determines
the alignment for the function "lots_o_noops_around_write" (which is used
by some of the test cases). Since __attribute__((__aligned__(X))) requires
X to be a constant, I am not sure if there a way around this.

- Sandipan





[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