linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Christoph Lameter <clameter@sgi.com>,
	Andy Whitcroft <apw@shadowen.org>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: [PATCH] zone table removal miss merge
Date: Wed, 27 Sep 2006 12:23:15 +0100	[thread overview]
Message-ID: <20060927112315.GA8093@shadowen.org> (raw)
In-Reply-To: <20060927021934.9461b867.akpm@osdl.org>

As suspected this is not related to SPARSEMEM configuration at all.
But relates to the case where the node,zone size is zero.  Here we
then are trying to shift (sizeof(int) - 0) which is illegal.

We should be defining ZONEID_SHIFT in terms of ZONE_PGSHIFT not
ZONE_PGOFF.  As this was correct in the orginal patch I assume this
was somehow damaged during merge.

The below should fix it.

-apw
=== 8< ===
zone table removal miss-merge

It looks very much like zone table removal v2 suffered during merge
into -mm.  This patch is needed to get rid of the following errors
on arm (and I suspect other platforms):

  include/linux/mm.h: In function `page_zone_id':
  include/linux/mm.h:450: warning: right shift count >= width of type

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a7997d9..2eb64fa 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -421,7 +421,7 @@ #define ZONEID_SHIFT		(SECTIONS_SHIFT + 
 #else
 #define ZONEID_SHIFT		(NODES_SHIFT + ZONES_SHIFT)
 #endif
-#define ZONEID_PGSHIFT		ZONES_PGOFF
+#define ZONEID_PGSHIFT		ZONES_PGSHIFT
 
 #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
 #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2006-09-27 11:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18 19:21 [PATCH] Get rid of zone_table V2 Christoph Lameter
2006-09-18 20:28 ` Andrew Morton
2006-09-18 22:51   ` Christoph Lameter
2006-09-18 23:15     ` Andrew Morton
2006-09-18 23:46       ` Christoph Lameter
2006-09-18 23:58         ` Andrew Morton
2006-09-19  0:08           ` Christoph Lameter
2006-09-19  0:14           ` Christoph Lameter
2006-09-19  0:31             ` Andrew Morton
2006-09-19  1:20               ` Christoph Lameter
2006-09-19  6:12               ` Christoph Lameter
2006-09-19  6:33                 ` Andrew Morton
2006-09-19 14:10                   ` Christoph Lameter
2006-09-19 15:38                     ` Andrew Morton
2006-09-19 15:41                       ` Christoph Lameter
2006-09-19 16:23                         ` Nick Piggin
2006-09-19 16:45                           ` Nick Piggin
2006-09-19 17:50                             ` Christoph Lameter
2006-09-19 18:24                               ` Andi Kleen
2006-09-19 16:17                       ` Nick Piggin
2006-09-24 10:06 ` Andrew Morton
2006-09-24 16:58   ` Christoph Lameter
2006-09-27  9:19   ` Andrew Morton
2006-09-27  9:26     ` Andy Whitcroft
2006-09-27 11:23     ` Andy Whitcroft [this message]
2006-09-27 16:19       ` [PATCH] zone table removal miss merge Christoph Lameter
2006-09-27 11:27     ` [PATCH] Get rid of zone_table V2 Andy Whitcroft
2006-09-27 16:24       ` Andrew Morton
2006-09-30 18:47       ` Christoph Lameter
2006-09-30 18:48         ` Christoph Lameter
2006-09-30 20:08         ` Andrew Morton
2006-10-02 15:57           ` Christoph Lameter
2006-10-02 17:10           ` Christoph Lameter
2006-10-04 10:10             ` Andy Whitcroft
2006-10-06 14:45             ` [PATCH] zoneid fix up calculations for ZONEID_PGSHIFT Andy Whitcroft
2006-10-06 17:00               ` Christoph Lameter

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=20060927112315.GA8093@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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