Re: [patch 2/2] convert s390 page handling macros to functions v3

Dave Hansen
2006-09-10T16:25:41Z

On Sun, 2006-09-10 at 15:08 +0200, Heiko Carstens wrote:
>
> +static inline int page_test_and_clear_dirty(struct page *page)
> +{
> + unsigned long physpage = __pa((page - mem_map) << PAGE_SHIFT);
> + int skey = page_get_storage_key(physpage);

This has nothing to do with your patch at all, but why is 'page -
mem_map' being open-coded here?

I see at least a couple of page_to_phys() definitions on some
architectures. This operation is done enough times that s390 could
probably use the same treatment.

It could at least use a page_to_pfn() instead of the 'page - mem_map'
operation, right?

-- Dave