* [PATCH] zone table removal miss merge
[not found] <20060927021934.9461b867.akpm@osdl.org>
@ 2006-09-27 11:23 ` Andy Whitcroft
2006-09-27 16:19 ` Christoph Lameter
0 siblings, 1 reply; 2+ messages in thread
From: Andy Whitcroft @ 2006-09-27 11:23 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, linux-kernel, Christoph Lameter, Andy Whitcroft,
Dave Hansen
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zone table removal miss merge
2006-09-27 11:23 ` [PATCH] zone table removal miss merge Andy Whitcroft
@ 2006-09-27 16:19 ` Christoph Lameter
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2006-09-27 16:19 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: Andrew Morton, linux-mm, linux-kernel, Dave Hansen
On Wed, 27 Sep 2006, Andy Whitcroft wrote:
> The below should fix it.
Acked-by: Christoph Lameter <clameter@sgi.com>
Note that if ZONE_DMA is off then ZONES_WIDTH may become
0 and therefore also ZONES_PGSHIFT is zero.
If you then do
#define ZONEID_PGSHIFT ZONES_PGSHIFT
then ZONEID_PGSHIFT will be 0!
So this could be an issue for the optional ZONE_DMA patch.
Could you also make sure that ZONEID_PGSHIFT is set correctly even if
ZONES_WIDTH is zero?
This affects the optional ZONE_DMA patch. zone table removal should be
fine with just the above patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-27 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060927021934.9461b867.akpm@osdl.org>
2006-09-27 11:23 ` [PATCH] zone table removal miss merge Andy Whitcroft
2006-09-27 16:19 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox