[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20141101.152112.741323581543029110.davem@davemloft.net>
Date: Sat, 01 Nov 2014 15:21:12 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: aneesh.kumar@...ux.vnet.ibm.com
Cc: akpm@...ux-foundation.org, steve.capper@...aro.org,
aarcange@...hat.com, benh@...nel.crashing.org, mpe@...erman.id.au,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH V4 1/2] mm: Update generic gup implementation to handle
hugepage directory
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Date: Wed, 29 Oct 2014 13:49:44 +0530
> Update generic gup implementation with powerpc specific details.
> On powerpc at pmd level we can have hugepte, normal pmd pointer
> or a pointer to the hugepage directory.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> ---
> Changes from V3:
> * Drop arm and arm64 changes
> * Add hugepte assumption to the function
Wait, what are you doing here?
You can't assume that a pmd is something you can just go:
__pte(pmd_val(x))
with. Not at all.
You have to use the correct pmd_*() accessors at all times on
this object.
Platforms can encode PMDs however they like. In fact, on sparc64,
we used to have 32-bit PMDs with a special encoding for huge
PMDs that looked nothing at all like a 64-bit PTE.
Please code this in a portable manner to support the powerpc
facilities, don't add assumptions that are not necessarily
universally true.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists