On Wed, 7 Jan 2026 16:48:39 +0000 Kevin Brodsky kevin.brodsky@arm.com wrote:
FORCE_READ(*addr) ensures that the compiler will emit a load from addr. Several tests need to trigger such a load for every page in the range [addr, addr + len), ensuring that every page is faulted in, if it wasn't already.
Introduce a new helper force_read_pages_in_range() that does exactly that and replace existing loops with a call to it.
Seems like a good cleanup to me.
Some of those loops have a different step size, but reading from every page is appropriate in all cases.
So the test program's behavior is slightly be changed. I believe that shouldn't be problem, but I'm not that familiar with the test code, so not very sure. I'd like to listen voices from people more familiar with those.
Meanwhile, I'm curious what do you think about making the helper function receives the step size together, and let the callers just pass their current step size.
Thanks, SJ
[...]