public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: zippel@linux-m68k.org
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 09/11] use proper defines for zone initialization
Date: Thu, 25 May 2006 02:27:51 +0200	[thread overview]
Message-ID: <20060525003423.142224000@linux-m68k.org> (raw)
In-Reply-To: 20060525002742.723577000@linux-m68k.org

MAX_NR_ZONES changed, so use correct defines now.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---

 arch/m68k/mm/motorola.c |   12 ++++++------
 arch/m68k/mm/sun3mmu.c  |    5 ++---
 2 files changed, 8 insertions(+), 9 deletions(-)

Index: linux-2.6-mm/arch/m68k/mm/motorola.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/mm/motorola.c
+++ linux-2.6-mm/arch/m68k/mm/motorola.c
@@ -203,7 +203,7 @@ void __init paging_init(void)
 {
 	int chunk;
 	unsigned long mem_avail = 0;
-	unsigned long zones_size[3] = { 0, };
+	unsigned long zones_size[MAX_NR_ZONES] = { 0, };
 
 #ifdef DEBUG
 	{
@@ -257,12 +257,12 @@ void __init paging_init(void)
 #ifdef DEBUG
 	printk ("before free_area_init\n");
 #endif
-	zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ?
-			 (mach_max_dma_address+1) : (unsigned long)high_memory);
-	zones_size[1] = (unsigned long)high_memory - zones_size[0];
+	zones_size[ZONE_DMA] = (mach_max_dma_address < (unsigned long)high_memory ?
+				(mach_max_dma_address+1) : (unsigned long)high_memory);
+	zones_size[ZONE_NORMAL] = (unsigned long)high_memory - zones_size[0];
 
-	zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT;
-	zones_size[1] >>= PAGE_SHIFT;
+	zones_size[ZONE_DMA] = (zones_size[ZONE_DMA] - PAGE_OFFSET) >> PAGE_SHIFT;
+	zones_size[ZONE_NORMAL] >>= PAGE_SHIFT;
 
 	free_area_init(zones_size);
 }
Index: linux-2.6-mm/arch/m68k/mm/sun3mmu.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/mm/sun3mmu.c
+++ linux-2.6-mm/arch/m68k/mm/sun3mmu.c
@@ -46,7 +46,7 @@ void __init paging_init(void)
 	unsigned long address;
 	unsigned long next_pgtable;
 	unsigned long bootmem_end;
-	unsigned long zones_size[3] = {0, 0, 0};
+	unsigned long zones_size[MAX_NR_ZONES] = { 0, };
 	unsigned long size;
 
 
@@ -92,8 +92,7 @@ void __init paging_init(void)
 	current->mm = NULL;
 
 	/* memory sizing is a hack stolen from motorola.c..  hope it works for us */
-	zones_size[0] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
-	zones_size[1] = 0;
+	zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
 
 	free_area_init(zones_size);
 

--


  parent reply	other threads:[~2006-05-25  1:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25  0:27 [PATCH 00/11] various m68k patches zippel
2006-05-25  0:27 ` [PATCH 01/11] completely initialize hw_regs_t in ide_setup_ports zippel
2006-05-25  0:27 ` [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n zippel
2006-05-25  1:33   ` Andrew Morton
2006-05-25  4:07     ` Greg KH
2006-05-25  4:28       ` Andrew Morton
2006-05-30 12:21       ` Roman Zippel
2006-05-25  0:27 ` [PATCH 03/11] cleanup unistd.h zippel
2006-05-25  0:27 ` [PATCH 04/11] Remove some unused definitions in zorro.h zippel
2006-05-25  0:27 ` [PATCH 05/11] use c99 initializer zippel
2006-05-25  0:27 ` [PATCH 06/11] print correct stack trace zippel
2006-05-25  0:27 ` [PATCH 07/11] restore amikbd compatibility with 2.4 zippel
2006-05-25  1:36   ` Andrew Morton
2006-05-25  1:50     ` Roman Zippel
2006-05-25  0:27 ` [PATCH 08/11] extra delay zippel
2006-05-25  0:27 ` zippel [this message]
2006-05-25  0:27 ` [PATCH 10/11] adjust to changed HARDIRQ_MASK zippel
2006-05-25  0:27 ` [PATCH 11/11] m68k mac VIA2 fixes and cleanups zippel

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=20060525003423.142224000@linux-m68k.org \
    --to=zippel@linux-m68k.org \
    --cc=akpm@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox