Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1201168

[PATCH v3 2/10] x86/asm: Move PUD_PAGE macros to page_types.h

Path csiph.com!goblin3!goblin1!goblin.stu.neva.ru!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Toshi Kani <toshi.kani@hp.com>
Newsgroups linux.kernel
Subject [PATCH v3 2/10] x86/asm: Move PUD_PAGE macros to page_types.h
Date Wed, 05 Aug 2015 23:50:02 +0200
Message-ID <pUeJs-5l3-33@gated-at.bofh.it> (permalink)
References <pUeJr-5l3-7@gated-at.bofh.it>
X-Original-To hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com
X-Mailer git-send-email 2.4.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 53
Organization linux.* mail to news gateway
X-Original-Cc akpm@linux-foundation.org, bp@alien8.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, jgross@suse.com, konrad.wilk@oracle.com, elliott@hp.com, Toshi Kani <toshi.kani@hp.com>
X-Original-Date Wed, 5 Aug 2015 15:43:25 -0600
X-Original-Message-ID <1438811013-30983-3-git-send-email-toshi.kani@hp.com>
X-Original-References <1438811013-30983-1-git-send-email-toshi.kani@hp.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1201168

Show key headers only | View raw


PUD_SHIFT is defined according to a kernel configuration, which
allows it be commonly used by any kernels.  However, PUD_PAGE_SIZE
and PUD_PAGE_MASK, which are calculated from PUD_SHIFT, are defined
in page_64_types.h, which allows them be used by a 64-bit kernel
only.

Move PUD_PAGE_SIZE and PUD_PAGE_MASK to page_types.h so that they
can be used by any kernels as well.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
---
 arch/x86/include/asm/page_64_types.h |    3 ---
 arch/x86/include/asm/page_types.h    |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
index 4edd53b..4928cf0 100644
--- a/arch/x86/include/asm/page_64_types.h
+++ b/arch/x86/include/asm/page_64_types.h
@@ -26,9 +26,6 @@
 #define MCE_STACK 4
 #define N_EXCEPTION_STACKS 4  /* hw limit: 7 */
 
-#define PUD_PAGE_SIZE		(_AC(1, UL) << PUD_SHIFT)
-#define PUD_PAGE_MASK		(~(PUD_PAGE_SIZE-1))
-
 /*
  * Set __PAGE_OFFSET to the most negative possible address +
  * PGDIR_SIZE*16 (pgd slot 272).  The gap is to allow a space for a
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h
index c7c712f..c5b7fb2 100644
--- a/arch/x86/include/asm/page_types.h
+++ b/arch/x86/include/asm/page_types.h
@@ -20,6 +20,9 @@
 #define PMD_PAGE_SIZE		(_AC(1, UL) << PMD_SHIFT)
 #define PMD_PAGE_MASK		(~(PMD_PAGE_SIZE-1))
 
+#define PUD_PAGE_SIZE		(_AC(1, UL) << PUD_SHIFT)
+#define PUD_PAGE_MASK		(~(PUD_PAGE_SIZE-1))
+
 #define HPAGE_SHIFT		PMD_SHIFT
 #define HPAGE_SIZE		(_AC(1,UL) << HPAGE_SHIFT)
 #define HPAGE_MASK		(~(HPAGE_SIZE - 1))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/10] x86/mm: Handle large PAT bit in pud/pmd interfaces Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 9/10] x86/mm: Fix __split_large_page() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 1/10] x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 10/10] x86/mm: Fix the same pgprot handling in try_preserve_large_page() Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 6/10] x86/mm: Fix slow_virt_to_phys() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 3/10] x86/asm: Fix pud/pmd interfaces to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 7/10] x86/mm: Fix gup_huge_p?d() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 2/10] x86/asm: Move PUD_PAGE macros to page_types.h Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 8/10] x86/mm: Fix try_preserve_large_page() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
  [PATCH v3 5/10] x86/mm: Fix page table dump to show PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200

csiph-web