From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934973Ab2JYNIb (ORCPT ); Thu, 25 Oct 2012 09:08:31 -0400 Received: from casper.infradead.org ([85.118.1.10]:51353 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933162Ab2JYNI2 (ORCPT ); Thu, 25 Oct 2012 09:08:28 -0400 Message-Id: <20121025124832.996734608@chello.nl> User-Agent: quilt/0.48-1 Date: Thu, 25 Oct 2012 14:16:24 +0200 From: Peter Zijlstra To: Rik van Riel , Andrea Arcangeli , Mel Gorman , Johannes Weiner , Thomas Gleixner , Linus Torvalds , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Gerald Schaefer , Martin Schwidefsky , Heiko Carstens , Peter Zijlstra , Ralf Baechle , Ingo Molnar Subject: [PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390 References: <20121025121617.617683848@chello.nl> Content-Disposition: inline; filename=0007-sched-numa-mm-s390-thp-Implement-pmd_pgprot-for-s390.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gerald Schaefer This patch adds an implementation of pmd_pgprot() for s390, in preparation to future THP changes. Reported-by: Stephen Rothwell Signed-off-by: Gerald Schaefer Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Ralf Baechle Signed-off-by: Ingo Molnar --- arch/s390/include/asm/pgtable.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) Index: tip/arch/s390/include/asm/pgtable.h =================================================================== --- tip.orig/arch/s390/include/asm/pgtable.h +++ tip/arch/s390/include/asm/pgtable.h @@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_ *pmdp = entry; } +static inline pgprot_t pmd_pgprot(pmd_t pmd) +{ + pgprot_t prot = PAGE_RW; + + if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) { + if (pmd_val(pmd) & _SEGMENT_ENTRY_INV) + prot = PAGE_NONE; + else + prot = PAGE_RO; + } + return prot; +} + static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) { unsigned long pgprot_pmd = 0; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx133.postini.com [74.125.245.133]) by kanga.kvack.org (Postfix) with SMTP id A82C46B0071 for ; Thu, 25 Oct 2012 09:08:21 -0400 (EDT) Message-Id: <20121025124832.996734608@chello.nl> Date: Thu, 25 Oct 2012 14:16:24 +0200 From: Peter Zijlstra Subject: [PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390 References: <20121025121617.617683848@chello.nl> Content-Disposition: inline; filename=0007-sched-numa-mm-s390-thp-Implement-pmd_pgprot-for-s390.patch Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel , Andrea Arcangeli , Mel Gorman , Johannes Weiner , Thomas Gleixner , Linus Torvalds , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Gerald Schaefer , Martin Schwidefsky , Heiko Carstens , Peter Zijlstra , Ralf Baechle , Ingo Molnar From: Gerald Schaefer This patch adds an implementation of pmd_pgprot() for s390, in preparation to future THP changes. Reported-by: Stephen Rothwell Signed-off-by: Gerald Schaefer Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Ralf Baechle Signed-off-by: Ingo Molnar --- arch/s390/include/asm/pgtable.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) Index: tip/arch/s390/include/asm/pgtable.h =================================================================== --- tip.orig/arch/s390/include/asm/pgtable.h +++ tip/arch/s390/include/asm/pgtable.h @@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_ *pmdp = entry; } +static inline pgprot_t pmd_pgprot(pmd_t pmd) +{ + pgprot_t prot = PAGE_RW; + + if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) { + if (pmd_val(pmd) & _SEGMENT_ENTRY_INV) + prot = PAGE_NONE; + else + prot = PAGE_RO; + } + return prot; +} + static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) { unsigned long pgprot_pmd = 0; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org