Re: [PATCH 2/3] proc/kcore: Do not map unaccepted memory

From: Dave Hansen
Date: Thu Sep 07 2023 - 11:53:48 EST


On 9/6/23 00:39, Adrian Hunter wrote:
> +static bool pfn_is_unaccepted_memory(unsigned long pfn)
> +{
> + phys_addr_t paddr = pfn << PAGE_SHIFT;
> +
> + return range_contains_unaccepted_memory(paddr, paddr + PAGE_SIZE);
> +}

Please just add this as an inline helper to common code rather than
copying and pasting two copies around the tree.