Re: [PATCH] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
Hi Stephen, Thanks for the suggestion, I'll send a new patch. On Thursday 10 July 2014 04:19 AM, Stephen Rothwell wrote: Hi Madhusudanan, On Wed, 09 Jul 2014 21:38:31 +0530 Madhusudanan Kandasamy kma...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/pte-hash64-64k.h b

[PATCH V2] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
() and returns -EINVAL if the input 4K PFN cannot be contained in PTE. Signed-off-by: Madhusudanan Kandasamy kma...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pte-hash64-64k.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/pte-hash64-64k.h b/arch

[PATCH V3] powerpc : Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-10 Thread Madhusudanan Kandasamy
: Added parentheses to protect 'pfn' and entire macro as suggested by Brian. V2 : Rewritten to avoid helper function as suggested by Stephen Rothwell. Signed-off-by: Madhusudanan Kandasamy kma...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pte-hash64-64k.h | 5 +++-- 1 file changed, 3

[PATCH] powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE

2014-07-09 Thread Madhusudanan Kandasamy
a helper inline function in the failure case so that the remap_4k_pfn() macro can still be used in expression contexts. Signed-off-by: Madhusudanan Kandasamy kma...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pte-hash64-64k.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions