* [Linux-ia64] janitor patch for _PAGE_SIZE_*
@ 2003-05-02 5:45 Martin Pool
2003-05-06 19:34 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: Martin Pool @ 2003-05-02 5:45 UTC (permalink / raw)
To: linux-ia64
I was looking at the ia64 port and noticed the _PAGE_SIZE* definitions
are inconsistent with other uses of this term in the kernel.
This patch just renames them to _PAGE_SHIFT. It only touches ia64
code.
diff -ur linux-2.5.67-ia64/arch/ia64/mm/tlb.c linux-2.5.67-ia64-mbp/arch/ia64/mm/tlb.c
--- linux-2.5.67-ia64/arch/ia64/mm/tlb.c 2003-04-28 11:55:16.000000000 +1000
+++ linux-2.5.67-ia64-mbp/arch/ia64/mm/tlb.c 2003-05-02 15:35:26.000000000 +1000
@@ -23,16 +23,16 @@
#include <asm/tlbflush.h>
#define SUPPORTED_PGBITS ( \
- 1 << _PAGE_SIZE_256M | \
- 1 << _PAGE_SIZE_64M | \
- 1 << _PAGE_SIZE_16M | \
- 1 << _PAGE_SIZE_4M | \
- 1 << _PAGE_SIZE_1M | \
- 1 << _PAGE_SIZE_256K | \
- 1 << _PAGE_SIZE_64K | \
- 1 << _PAGE_SIZE_16K | \
- 1 << _PAGE_SIZE_8K | \
- 1 << _PAGE_SIZE_4K )
+ 1 << _PAGE_SHIFT_256M | \
+ 1 << _PAGE_SHIFT_64M | \
+ 1 << _PAGE_SHIFT_16M | \
+ 1 << _PAGE_SHIFT_4M | \
+ 1 << _PAGE_SHIFT_1M | \
+ 1 << _PAGE_SHIFT_256K | \
+ 1 << _PAGE_SHIFT_64K | \
+ 1 << _PAGE_SHIFT_16K | \
+ 1 << _PAGE_SHIFT_8K | \
+ 1 << _PAGE_SHIFT_4K )
struct ia64_ctx ia64_ctx = {
.lock = SPIN_LOCK_UNLOCKED,
@@ -155,8 +155,8 @@
nbits = ia64_fls(size + 0xfff);
if (((1UL << nbits) & SUPPORTED_PGBITS) = 0) {
- if (nbits > _PAGE_SIZE_256M)
- nbits = _PAGE_SIZE_256M;
+ if (nbits > _PAGE_SHIFT_256M)
+ nbits = _PAGE_SHIFT_256M;
else
/*
* Some page sizes are not implemented in the
diff -ur linux-2.5.67-ia64/include/asm-ia64/pgtable.h linux-2.5.67-ia64-mbp/include/asm-ia64/pgtable.h
--- linux-2.5.67-ia64/include/asm-ia64/pgtable.h 2003-05-02 15:29:33.000000000 +1000
+++ linux-2.5.67-ia64-mbp/include/asm-ia64/pgtable.h 2003-05-02 15:35:25.000000000 +1000
@@ -65,16 +65,16 @@
#define _PFN_MASK _PAGE_PPN_MASK
#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_A | _PAGE_D)
-#define _PAGE_SIZE_4K 12
-#define _PAGE_SIZE_8K 13
-#define _PAGE_SIZE_16K 14
-#define _PAGE_SIZE_64K 16
-#define _PAGE_SIZE_256K 18
-#define _PAGE_SIZE_1M 20
-#define _PAGE_SIZE_4M 22
-#define _PAGE_SIZE_16M 24
-#define _PAGE_SIZE_64M 26
-#define _PAGE_SIZE_256M 28
+#define _PAGE_SHIFT_4K 12
+#define _PAGE_SHIFT_8K 13
+#define _PAGE_SHIFT_16K 14
+#define _PAGE_SHIFT_64K 16
+#define _PAGE_SHIFT_256K 18
+#define _PAGE_SHIFT_1M 20
+#define _PAGE_SHIFT_4M 22
+#define _PAGE_SHIFT_16M 24
+#define _PAGE_SHIFT_64M 26
+#define _PAGE_SHIFT_256M 28
#define __ACCESS_BITS _PAGE_ED | _PAGE_A | _PAGE_P | _PAGE_MA_WB
#define __DIRTY_BITS_NO_ED _PAGE_A | _PAGE_P | _PAGE_D | _PAGE_MA_WB
@@ -475,15 +475,15 @@
* know...
*/
#if defined(CONFIG_IA64_GRANULE_64MB)
-# define IA64_GRANULE_SHIFT _PAGE_SIZE_64M
+# define IA64_GRANULE_SHIFT _PAGE_SHIFT_64M
#elif defined(CONFIG_IA64_GRANULE_16MB)
-# define IA64_GRANULE_SHIFT _PAGE_SIZE_16M
+# define IA64_GRANULE_SHIFT _PAGE_SHIFT_16M
#endif
#define IA64_GRANULE_SIZE (1 << IA64_GRANULE_SHIFT)
/*
* log2() of the page size we use to map the kernel image (IA64_TR_KERNEL):
*/
-#define KERNEL_TR_PAGE_SHIFT _PAGE_SIZE_64M
+#define KERNEL_TR_PAGE_SHIFT _PAGE_SHIFT_64M
#define KERNEL_TR_PAGE_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
#define KERNEL_TR_PAGE_NUM ((KERNEL_START - PAGE_OFFSET) / KERNEL_TR_PAGE_SIZE)
--
Martin
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Linux-ia64] janitor patch for _PAGE_SIZE_*
2003-05-02 5:45 [Linux-ia64] janitor patch for _PAGE_SIZE_* Martin Pool
@ 2003-05-06 19:34 ` David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2003-05-06 19:34 UTC (permalink / raw)
To: linux-ia64
>>>>> On Fri, 2 May 2003 15:45:09 +1000, Martin Pool <mbp@samba.org> said:
Martin> I was looking at the ia64 port and noticed the _PAGE_SIZE*
Martin> definitions are inconsistent with other uses of this term in
Martin> the kernel.
Martin> This patch just renames them to _PAGE_SHIFT. It only touches ia64
Martin> code.
I'm not going to apply this one for the following reason: those macros
actually are page-size _codes_ for the PTEs. Yes, the codes happen to
be equal to the log2() of the page-size, but this isn't necessarily
so. It's probably unlikely this will ever change, but unless it's
nailed down by the architecture somewhere (I don't think it is), I'd
like to leave that distinction. Subtle as it may be.
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-06 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-02 5:45 [Linux-ia64] janitor patch for _PAGE_SIZE_* Martin Pool
2003-05-06 19:34 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox