lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgAPtxN7WW222SFI@kernel.org>
Date:   Sun, 6 Feb 2022 20:13:11 +0200
From:   Mike Rapoport <rppt@...nel.org>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 41/75] hexagon: Add pmd_pfn()

On Fri, Feb 04, 2022 at 07:58:18PM +0000, Matthew Wilcox (Oracle) wrote:
> I need to use this function in common code, so define it for hexagon.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
>  arch/hexagon/include/asm/pgtable.h | 3 ++-

Why hexagon out of all architectures?
What about m68k, nios2, nds32 etc?

>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
> index 18cd6ea9ab23..87e96463ccd6 100644
> --- a/arch/hexagon/include/asm/pgtable.h
> +++ b/arch/hexagon/include/asm/pgtable.h
> @@ -235,10 +235,11 @@ static inline int pmd_bad(pmd_t pmd)
>  	return 0;
>  }
>  
> +#define pmd_pfn(pmd)	(pmd_val(pmd) >> PAGE_SHIFT)

I'd put it in include/linux/pgtable.h inside #ifndef pmd_pfn

>  /*
>   * pmd_page - converts a PMD entry to a page pointer
>   */
> -#define pmd_page(pmd)  (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
> +#define pmd_page(pmd)  (pfn_to_page(pmd_pfn(pmd)))
>  
>  /**
>   * pte_none - check if pte is mapped
> -- 
> 2.34.1
> 
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ