Re: 2.5.73-mm1

William Lee Irwin III (wli@holomorphy.com)
Tue, 24 Jun 2003 01:14:45 -0700


On Mon, Jun 23, 2003 at 11:29:08PM -0700, Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.73/2.5.73-mm1/
> . PCI and PCMCIA updates
> . Make sysrq-T print the right thing.
> . Hopefully fix most of the time-goes-too-slowly problems.
> . Various other fixes.

This trivial patch allows architectures to micro-optimize
lowmem_page_address() at their whims. Roman Zippel originally wrote
and/or suggested this back when dependencies on page->virtual existing
were being shaken out. That's long-settled, so it's fine to do this now.

It's not much, but hopefully it'll start the flow of my various new
patches back to mainline.

-- wli

diff -prauN wli-2.5.73-1/include/linux/mm.h wli-2.5.73-2/include/linux/mm.h
--- wli-2.5.73-1/include/linux/mm.h 2003-06-22 11:32:31.000000000 -0700
+++ wli-2.5.73-2/include/linux/mm.h 2003-06-23 10:30:37.000000000 -0700
@@ -339,9 +339,14 @@ static inline void set_page_zone(struct
page->flags |= zone_num << ZONE_SHIFT;
}

-static inline void * lowmem_page_address(struct page *page)
+#ifndef CONFIG_DISCONTIGMEM
+/* The array of struct pages - for discontigmem use pgdat->lmem_map */
+extern struct page *mem_map;
+#endif
+
+static inline void *lowmem_page_address(struct page *page)
{
- return __va( ( (page - page_zone(page)->zone_mem_map) + page_zone(page)->zone_start_pfn) << PAGE_SHIFT);
+ return __va(page_to_pfn(page) << PAGE_SHIFT);
}

#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
@@ -395,11 +400,6 @@ static inline int page_mapped(struct pag
#define VM_FAULT_MINOR 1
#define VM_FAULT_MAJOR 2

-#ifndef CONFIG_DISCONTIGMEM
-/* The array of struct pages - for discontigmem use pgdat->lmem_map */
-extern struct page *mem_map;
-#endif
-
extern void show_free_areas(void);

struct page *shmem_nopage(struct vm_area_struct * vma,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/