[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 08/16] sparc64: add the missing pgd_page definition
On Sat, Jun 01, 2019 at 09:28:54AM -0700, Linus Torvalds wrote:
> Both sparc64 and sh had this pattern, but now that I look at it more
> closely, I think your version is wrong, or at least nonoptimal.

I bet it is. Then again these symbols are just required for the code
to compile, as neither sparc64 nor sh actually use the particular
variant of huge pages we need it for. Then again even actually dead
code should better be not too buggy if it isn't just a stub.

> So I thgink this would be better done with
> #define pgd_page(pgd) pfn_to_page(pgd_pfn(pgd))
> where that "pgd_pfn()" would need to be a new (but likely very
> trivial) function. That's what we do for pte_pfn().
> IOW, it would likely end up something like
> #define pgd_to_pfn(pgd) (pgd_val(x) >> PFN_PGD_SHIFT)

True. I guess it would be best if we could get most if not all
architectures to use common versions of these macros so that we have
the issue settled once.

 \ /
  Last update: 2019-06-03 09:45    [W:0.073 / U:5.740 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site