Re: [Linux-ia64] kernel update (relative to v2.5.18)

Peter Chubb
2002-06-14T03:12:53Z

+/*
+ * Note: the MAP_NR_*() macro can't use __pa() because MAP_NR_*(X) MUST
+ * map to something >= max_mapnr if X is outside the identity mapped
+ * kernel space.
+ */
+
+/*
+ * The dense variant can be used as long as the size of memory holes isn't
+ * very big.
+ */
+#define MAP_NR_DENSE(addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+

Bjorn,
Given that the only current use of MAP_NR_DENSE is in
machvec.c: map_nr_dense() why not open-code it there, instead of using
the MACRO? (So
unsigned long
map_nr_dense(unsigned long addr) {
return (addr - PAGE_OFFSET) >> PAGE_SHIFT;
}
)

And move the comment there too instead of in page.h.
It might make things a little cleaner that way.

Peter C