From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [PATCHv2 12/19] s390: expose number of page table levels
Date: Fri, 30 Jan 2015 16:54:24 +0200 [thread overview]
Message-ID: <1422629664-19954-1-git-send-email-kirill.shutemov@linux.intel.com> (raw)
In-Reply-To: <20150130154830.6e5c4774@mschwide>
We would want to use number of page table level to define mm_struct.
Let's expose it as CONFIG_PGTABLE_LEVELS.
Core mm expects __PAGETABLE_{PUD,PMD}_FOLDED to be defined if these page
table levels folded.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---
v2: fix typo
---
arch/s390/Kconfig | 5 +++++
arch/s390/include/asm/pgtable.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 8d11babf9aa5..6870e6ab903f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -155,6 +155,11 @@ config S390
config SCHED_OMIT_FRAME_POINTER
def_bool y
+config PGTABLE_LEVELS
+ int
+ default 4 if 64BIT
+ default 2
+
source "init/Kconfig"
source "kernel/Kconfig.freezer"
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index fbb5ee3ae57c..e08ec38f8c6e 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -91,7 +91,9 @@ extern unsigned long zero_page_mask;
*/
#define PTRS_PER_PTE 256
#ifndef CONFIG_64BIT
+#define __PAGETABLE_PUD_FOLDED
#define PTRS_PER_PMD 1
+#define __PAGETABLE_PMD_FOLDED
#define PTRS_PER_PUD 1
#else /* CONFIG_64BIT */
#define PTRS_PER_PMD 2048
--
2.1.4
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-01-30 14:54 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 14:43 [PATCH 00/19] expose page table levels on Kconfig leve Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 01/19] alpha: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 02/19] arm64: " Kirill A. Shutemov
2015-01-30 14:56 ` Catalin Marinas
2015-01-31 6:23 ` Jungseok Lee
2015-01-30 14:43 ` [PATCH 03/19] arm: " Kirill A. Shutemov
2015-01-30 16:02 ` Russell King - ARM Linux
2015-01-30 16:24 ` Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 04/19] frv: mark PUD and PMD folded Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 05/19] ia64: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-01-31 0:17 ` [PATCHv2 " Kirill A. Shutemov
2015-02-02 12:56 ` Paul Bolle
2015-02-02 13:50 ` Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 06/19] m32r: mark PMD folded Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 07/19] m68k: mark PMD folded and expose number of page table levels Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 08/19] mips: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 09/19] mn10300: mark PUD and PMD folded Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 10/19] parisc: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 11/19] powerpc: " Kirill A. Shutemov
2015-01-31 0:27 ` [PATCHv2 " Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 12/19] s390: expose number of page table levels Kirill A. Shutemov
2015-01-30 14:48 ` Martin Schwidefsky
2015-01-30 14:54 ` Kirill A. Shutemov [this message]
2015-01-30 14:43 ` [PATCH 13/19] sh: " Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 14/19] sparc: " Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 15/19] tile: " Kirill A. Shutemov
2015-01-30 14:49 ` Chris Metcalf
2015-01-30 14:43 ` [PATCH 16/19] um: " Kirill A. Shutemov
2015-01-30 19:29 ` Richard Weinberger
2015-01-30 14:43 ` [PATCH 17/19] x86: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-01-31 0:30 ` [PATCHv2 " Kirill A. Shutemov
2015-02-02 11:26 ` Paul Bolle
2015-02-02 11:37 ` Kirill A. Shutemov
2015-02-02 11:57 ` Paul Bolle
2015-02-02 12:07 ` Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 18/19] mm: define default PGTABLE_LEVELS to two Kirill A. Shutemov
2015-01-30 14:43 ` [PATCH 19/19] mm: do not add nr_pmds into mm_struct if PMD is folded Kirill A. Shutemov
2015-01-30 17:26 ` [PATCH 00/19] expose page table levels on Kconfig leve Guenter Roeck
2015-01-30 18:50 ` Kirill A. Shutemov
2015-01-30 19:14 ` Guenter Roeck
2015-01-30 20:09 ` Kirill A. Shutemov
2015-01-30 20:41 ` Guenter Roeck
2015-01-30 20:59 ` Guenter Roeck
2015-01-31 0:11 ` Kirill A. Shutemov
2015-01-31 6:23 ` Guenter Roeck
2015-01-31 0:36 ` [PATCH] mm: do not use mm->nr_pmds on !MMU configurations Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422629664-19954-1-git-send-email-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@roeck-us.net \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).