Re: + pg_uncached-is-ia64-only.patch added to -mm tree

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

 



KAMEZAWA Hiroyuki <[email protected]> wrote:
>
> Hi, Andrew
> 
> On Thu, 06 Apr 2006 21:20:26 -0700
> [email protected] wrote:
> 
> > 
> > The patch titled
> > 
> >      PG_uncached is ia64 only
> > 
> > has been added to the -mm tree.  Its filename is
> > 
> >      pg_uncached-is-ia64-only.patch
> > 
> > See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
> > out what to do about this
> > 
> 
> in include/linux/mmzone.h
> ==
> #elif BITS_PER_LONG == 64
> /*
>  * with 64 bit flags field, there's plenty of room.
>  */
> #define FLAGS_RESERVED          32
> 
> #else

OK.

> 
> it looks this is used here.
> 
> #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
> #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
> #endif
> 
> I'm not sure but please compile check FLAGS_RESRVED with SPARSEMEM or
> 

Yes, that test won't trigger.

> 
> #if (BITS_PER_LONG > 32)               /* 64-bit only flags. we can use full 
>                                           low 32bits */
> #define PG_uncached	31
> #endif
> 
> Hm..Is this  ugly ? :(

It's easier to change FLAGS_RESERVED ;)

diff -puN include/linux/page-flags.h~pg_uncached-is-ia64-only include/linux/page-flags.h
--- devel/include/linux/page-flags.h~pg_uncached-is-ia64-only	2006-04-06 21:50:51.000000000 -0700
+++ devel-akpm/include/linux/page-flags.h	2006-04-06 21:50:51.000000000 -0700
@@ -7,6 +7,8 @@
 
 #include <linux/percpu.h>
 #include <linux/cache.h>
+#include <linux/types.h>
+
 #include <asm/pgtable.h>
 
 /*
@@ -86,7 +88,10 @@
 #define PG_mappedtodisk		16	/* Has blocks allocated on-disk */
 #define PG_reclaim		17	/* To be reclaimed asap */
 #define PG_nosave_free		18	/* Free, should not be written */
-#define PG_uncached		19	/* Page has been mapped as uncached */
+
+#if (BITS_PER_LONG > 32)
+#define PG_uncached		32	/* Page has been mapped as uncached */
+#endif
 
 /*
  * Global page accounting.  One instance per CPU.  Only unsigned longs are
diff -puN include/linux/mmzone.h~pg_uncached-is-ia64-only include/linux/mmzone.h
--- devel/include/linux/mmzone.h~pg_uncached-is-ia64-only	2006-04-06 21:50:56.000000000 -0700
+++ devel-akpm/include/linux/mmzone.h	2006-04-06 21:51:12.000000000 -0700
@@ -457,7 +457,7 @@ extern struct zone *next_zone(struct zon
 /*
  * with 64 bit flags field, there's plenty of room.
  */
-#define FLAGS_RESERVED		32
+#define FLAGS_RESERVED		24
 
 #else
 
_

-
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