[PATCH] zone table removal miss merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux