All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Subject: Re: pgcl-2.6.0-test5-bk3-17
Date: Sun, 30 Nov 2003 23:44:45 -0800	[thread overview]
Message-ID: <20031201074445.GH19856@holomorphy.com> (raw)
In-Reply-To: <20031201073632.GQ8039@holomorphy.com>

On Sun, Nov 30, 2003 at 11:36:32PM -0800, William Lee Irwin III wrote:
> Stack decoding fixes, shutting up some compiler warnings, and dumping
> PAGE_SIZE and MMUPAGE_SIZE into /proc/meminfo (for lack of a better place).
> The printk()'s down there should eventually get ripped out anyway for
> minimal impact and a quieter boot, but until then...

This fixes some bad address calculations in arch/i386/mm/boot_ioremap.c


-- wli


diff -prauN pgcl-2.6.0-test11-7/arch/i386/mm/boot_ioremap.c pgcl-2.6.0-test11-8/arch/i386/mm/boot_ioremap.c
--- pgcl-2.6.0-test11-7/arch/i386/mm/boot_ioremap.c	2003-11-26 12:46:12.000000000 -0800
+++ pgcl-2.6.0-test11-8/arch/i386/mm/boot_ioremap.c	2003-11-30 13:07:00.000000000 -0800
@@ -31,7 +31,7 @@
 
 #define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
 #define boot_pte_index(address) \
-	     (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
+	     (((address) >> MMUPAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
 
 static inline boot_pte_t* boot_vaddr_to_pte(void *address)
 {
@@ -52,17 +52,17 @@ static void __boot_ioremap(unsigned long
 	char *vaddr = virtual_source;
 
 	pte = boot_vaddr_to_pte(virtual_source);
-	for (i=0; i < nrpages; i++, phys_addr += PAGE_SIZE, pte++) {
-		set_pte(pte, pfn_pte(phys_addr>>PAGE_SHIFT, PAGE_KERNEL));
-		__flush_tlb_one(&vaddr[i*PAGE_SIZE]);
+	for (i=0; i < nrpages; i++, phys_addr += MMUPAGE_SIZE, pte++) {
+		set_pte(pte, pfn_pte(phys_addr>>MMUPAGE_SHIFT, PAGE_KERNEL));
+		__flush_tlb_one(&vaddr[i*MMUPAGE_SIZE]);
 	}
 }
 
 /* the virtual space we're going to remap comes from this array */
 #define BOOT_IOREMAP_PAGES 4
-#define BOOT_IOREMAP_SIZE (BOOT_IOREMAP_PAGES*PAGE_SIZE)
+#define BOOT_IOREMAP_SIZE (BOOT_IOREMAP_PAGES*MMUPAGE_SIZE)
 __initdata char boot_ioremap_space[BOOT_IOREMAP_SIZE] 
-		__attribute__ ((aligned (PAGE_SIZE)));
+		__attribute__ ((aligned (MMUPAGE_SIZE)));
 
 /*
  * This only applies to things which need to ioremap before paging_init()
@@ -83,11 +83,11 @@ __init void* boot_ioremap(unsigned long 
 	last_addr = phys_addr + size - 1;
 
 	/* page align the requested address */
-	offset = phys_addr & ~PAGE_MASK;
-	phys_addr &= PAGE_MASK;
-	size = PAGE_ALIGN(last_addr) - phys_addr;
+	offset = phys_addr & ~MMUPAGE_MASK;
+	phys_addr &= MMUPAGE_MASK;
+	size = MMUPAGE_ALIGN(last_addr) - phys_addr;
 	
-	nrpages = size >> PAGE_SHIFT;
+	nrpages = size >> MMUPAGE_SHIFT;
 	if (nrpages > BOOT_IOREMAP_PAGES)
 		return NULL;
 	

  reply	other threads:[~2003-12-01  7:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-28  4:15 pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-28  7:21 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-28 23:51   ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30  1:12   ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30 16:43   ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30 18:46     ` pgcl-2.6.0-test5-bk3-17 Zwane Mwaikambo
2003-11-30 18:50       ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-01  7:36     ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-01  7:44       ` William Lee Irwin III [this message]
2003-12-07  7:28       ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-07 18:45         ` pgcl-2.6.0-test5-bk3-17 Zwane Mwaikambo
2003-12-07 19:12           ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-01 16:46     ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III

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=20031201074445.GH19856@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.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.