All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: PARISC list <parisc-linux@lists.parisc-linux.org>
Cc: parisc-linux-cvs@lists.parisc-linux.org
Subject: [parisc-linux] Re: [parisc-linux-cvs] linux-2.6 jejb
Date: 01 May 2004 11:13:04 -0500	[thread overview]
Message-ID: <1083427986.2030.25.camel@mulgrave> (raw)
In-Reply-To: <20040501160556.D07DC4945CA@palinux.hppa>

On Sat, 2004-05-01 at 11:05, James Bottomley wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	jejb	04/05/01 10:05:56
> 
> Modified files:
> 	.              : Makefile 
> 	arch/parisc/kernel: asm-offsets.c head.S head64.S init_task.c 
> 	arch/parisc/mm : init.c 
> 	include/asm-parisc: pgtable.h 
> 
> Log message:
> More magic number elimination
> 
> Also break the assumption that sizeof(unsigned long)  == sizeof(pte_t)

Index: arch/parisc/kernel/asm-offsets.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/asm-offsets.c,v
retrieving revision 1.5
diff -u -r1.5 asm-offsets.c
--- a/arch/parisc/kernel/asm-offsets.c	30 Apr 2004 16:20:36 -0000	1.5
+++ b/arch/parisc/kernel/asm-offsets.c	1 May 2004 15:11:57 -0000
@@ -283,6 +283,10 @@
 	DEFINE(ASM_BITS_PER_PMD, BITS_PER_PMD);
 	DEFINE(ASM_BITS_PER_PTE, BITS_PER_PTE);
 	DEFINE(ASM_PMD_ENTRY, ((__PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT));
+	DEFINE(ASM_PGD_ENTRY, __PAGE_OFFSET >> PGDIR_SHIFT);
+	DEFINE(ASM_PGD_ENTRY_SIZE, PGD_ENTRY_SIZE);
+	DEFINE(ASM_PMD_ENTRY_SIZE, PMD_ENTRY_SIZE);
+	DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE);
 	BLANK();
 	return 0;
 }
Index: arch/parisc/kernel/head.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/head.S,v
retrieving revision 1.4
diff -u -r1.4 head.S
--- a/arch/parisc/kernel/head.S	25 Apr 2004 14:50:51 -0000	1.4
+++ b/arch/parisc/kernel/head.S	1 May 2004 15:11:58 -0000
@@ -83,12 +83,12 @@
 	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
 	mtctl		%r4,%cr25	/* Initialize user root pointer */
 
-	stw             %r3,((__PAGE_OFFSET>>PGDIR_SHIFT)*4)(%r4)
+	stw             %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4)
 	ldo		0x1000(%r3),%r3
-	stw             %r3,(((__PAGE_OFFSET>>PGDIR_SHIFT) + 1)*4)(%r4)
+	stw             %r3,(ASM_PGD_ENTRY + 1)*ASM_PGD_ENTRY_SIZE(%r4)
 	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */
 $pgt_fill_loop:
-	stwm		%r3,4(%r1)
+	stwm		%r3,ASM_PTE_ENTRY_SIZE(%r1)
 	ldo		0x1000(%r3),%r3
 	bb,>=		%r3,8,$pgt_fill_loop
 	nop
Index: arch/parisc/kernel/head64.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/head64.S,v
retrieving revision 1.5
diff -u -r1.5 head64.S
--- a/arch/parisc/kernel/head64.S	25 Apr 2004 14:50:51 -0000	1.5
+++ b/arch/parisc/kernel/head64.S	1 May 2004 15:11:58 -0000
@@ -88,20 +88,20 @@
 	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
 	mtctl		%r4,%cr25	/* Initialize user root pointer */
 
-	std             %r3,((__PAGE_OFFSET >> PGDIR_SHIFT)*8)(%r4)
+	std             %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4)
 
 	ldo		_PAGE_TABLE(%r1),%r3
-	std             %r3,(ASM_PMD_ENTRY * 8) (%r5)
+	std             %r3,(ASM_PMD_ENTRY * ASM_PMD_ENTRY_SIZE) (%r5)
 	ldo		0x1000(%r3),%r3
-	std             %r3,((ASM_PMD_ENTRY + 1)*8)(%r5)
+	std             %r3,((ASM_PMD_ENTRY + 1)*ASM_PMD_ENTRY_SIZE)(%r5)
 	ldo		0x1000(%r3),%r3
-	std             %r3,((ASM_PMD_ENTRY + 2)*8)(%r5)
+	std             %r3,((ASM_PMD_ENTRY + 2)*ASM_PMD_ENTRY_SIZE)(%r5)
 	ldo		0x1000(%r3),%r3
-	std             %r3,((ASM_PMD_ENTRY + 3)*8)(%r5)
+	std             %r3,((ASM_PMD_ENTRY + 3)*ASM_PMD_ENTRY_SIZE)(%r5)
 
 	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */
 $pgt_fill_loop:
-	std,ma		%r3,8(%r1)
+	std,ma		%r3,ASM_PTE_ENTRY_SIZE(%r1)
 	ldo		0x1000(%r3),%r3
 	bb,>=		%r3,8,$pgt_fill_loop
 	nop
Index: arch/parisc/kernel/init_task.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/init_task.c,v
retrieving revision 1.4
diff -u -r1.4 init_task.c
--- a/arch/parisc/kernel/init_task.c	30 Apr 2004 16:20:36 -0000	1.4
+++ b/arch/parisc/kernel/init_task.c	1 May 2004 15:11:58 -0000
@@ -54,9 +54,9 @@
 
 pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((aligned(PAGE_SIZE<<PGD_ORDER))) = { {0}, };
 #ifdef __LP64__
-unsigned long pmd0[PTRS_PER_PMD] __attribute__ ((aligned(4096))) = { 0, };
+pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((aligned(4096))) = { {0}, };
 #endif
-unsigned long pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((aligned(4096))) = { 0, };
+pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((aligned(4096))) = { {0}, };
 
 /*
  * Initial task structure.
Index: arch/parisc/mm/init.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/mm/init.c,v
retrieving revision 1.4
diff -u -r1.4 init.c
--- a/arch/parisc/mm/init.c	25 Apr 2004 14:50:51 -0000	1.4
+++ b/arch/parisc/mm/init.c	1 May 2004 15:11:59 -0000
@@ -550,7 +550,7 @@
 		 */
 
 		if (!pmd) {
-			pmd = (pmd_t *) alloc_bootmem_low_pages_node(NODE_DATA(0),PAGE_SIZE);
+			pmd = (pmd_t *) alloc_bootmem_low_pages_node(NODE_DATA(0),PAGE_SIZE << PMD_ORDER);
 			pmd = (pmd_t *) __pa(pmd);
 		}
 
Index: include/asm-parisc/pgtable.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-parisc/pgtable.h,v
retrieving revision 1.6
diff -u -r1.6 pgtable.h
--- a/include/asm-parisc/pgtable.h	30 Apr 2004 16:20:36 -0000	1.6
+++ b/include/asm-parisc/pgtable.h	1 May 2004 15:12:18 -0000
@@ -225,7 +225,7 @@
 
 /* initial page tables for 0-8MB for kernel */
 
-extern unsigned long pg0[];
+extern pte_t pg0[];
 
 /* zero page used for uninitialized stuff */
 

       reply	other threads:[~2004-05-01 16:13 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040501160556.D07DC4945CA@palinux.hppa>
2004-05-01 16:13 ` James Bottomley [this message]
     [not found] <20040505204811.27F0C4945E4@palinux.hppa>
2004-05-05 20:50 ` [parisc-linux] Re: [parisc-linux-cvs] linux-2.6 jejb James Bottomley
2004-05-06  5:05   ` Randolph Chung
2004-05-06  5:22     ` Randolph Chung
2004-05-06  9:33     ` M. Grabert
2004-05-06 13:25     ` Kyle McMartin
     [not found] <20040502161601.DC7C24945C7@palinux.hppa>
2004-05-03 20:51 ` James Bottomley
     [not found] <20040501200312.40BB74945E1@palinux.hppa>
2004-05-01 20:09 ` James Bottomley
2004-05-03  8:57   ` Joel Soete
     [not found] <20040430162037.9D2B94945CD@palinux.hppa>
2004-04-30 16:25 ` James Bottomley
     [not found] <20040427171140.706074945BD@palinux.hppa>
2004-04-27 17:15 ` James Bottomley
     [not found] <20040425145051.10F5C4942B8@palinux.hppa>
2004-04-25 14:55 ` James Bottomley
     [not found] <20040414174535.81173494194@palinux.hppa>
2004-04-14 17:53 ` James Bottomley
     [not found] <20040412154800.D31F6494194@palinux.hppa>
2004-04-12 15:55 ` James Bottomley
     [not found] <20040407004901.031D3494194@palinux.hppa>
2004-04-07  0:54 ` James Bottomley
2004-04-08  6:15   ` Joel Soete
2004-04-08 12:36     ` James Bottomley
     [not found] <20040406213446.CB675494194@palinux.hppa>
2004-04-06 21:37 ` James Bottomley
     [not found] <20040405174131.84BF1494194@palinux.hppa>
2004-04-06 13:21 ` Carlos O'Donell
2004-04-06 14:18   ` James Bottomley
2004-04-06 15:40     ` Randolph Chung
     [not found] <20040405024740.9330F494194@palinux.hppa>
2004-04-05  2:49 ` James Bottomley
2004-04-05  2:54   ` James Bottomley
     [not found] <20040320210116.7A727494553@palinux.hppa>
2004-03-20 21:04 ` James Bottomley
2004-03-20 21:10   ` Helge Deller
2004-03-20 21:13     ` Helge Deller
     [not found] <20040228212407.DB126494190@palinux.hppa>
2004-02-28 22:21 ` Joel Soete
2004-02-28 22:42   ` James Bottomley
2004-02-29  9:39     ` Joel Soete
2004-03-04 16:39       ` Joel Soete
2004-02-06  7:31 [parisc-linux] " Joel Soete
2004-02-06 17:50 ` Grant Grundler
2004-02-06 18:06   ` bame
2004-02-06 19:16 ` Randolph Chung
2004-02-06 17:08   ` Joel Soete
2004-02-07  6:40     ` Randolph Chung
2004-02-09  7:26       ` Joel Soete
     [not found] <20040204182455.1CC11494191@palinux.hppa>
2004-02-05  9:20 ` [parisc-linux] " Randolph Chung
2004-02-05 15:19   ` James Bottomley
2004-02-05 15:29 ` [parisc-linux] " Joel Soete
2004-02-05 20:31   ` Randolph Chung
2004-02-05 18:49     ` Joel Soete
     [not found] <20040113155603.CBCC249425A@palinux.hppa>
2004-01-13 15:58 ` [parisc-linux] " James Bottomley
     [not found] <20030924175431.D51BC49408B@palinux.hppa>
2003-09-24 18:01 ` James Bottomley
     [not found] <20030919010356.148684940A4@palinux.hppa>
2003-09-19  1:06 ` James Bottomley
2003-09-19 11:24   ` Randolph Chung
2003-09-19 14:02     ` James Bottomley
2003-09-19 18:24       ` Jim Hull
     [not found] <20030903200300.8B7B7494064@palinux.hppa>
2003-09-03 20:07 ` James Bottomley
     [not found] <20030903165113.138BF494064@palinux.hppa>
2003-09-03 16:56 ` James Bottomley

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=1083427986.2030.25.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=parisc-linux-cvs@lists.parisc-linux.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.