summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-09-03 05:33:51 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-03 05:33:51 -0700
commit2589a05fefe5545b48c479591903f26ef42b2244 (patch)
tree20a0dddcb7c2c7827d0adbb0107b4cbc9f649059 /include/linux
parent11bf19bc0eb48735772e664d07573f916f6e3f29 (diff)
[PATCH] convert node/zone_start_paddr to pfns
I've had ia32-discontigmem under test for a month, uneventfully. Possibly because I don't have a machine to test it on.... A major part of this work is a general move to convert the low-level memory management to consistently use pageframe numbers. It's a bit schizo at present.. This patch was written by Martin Bligh. A version of this patch is in the 2.4 aa tree. It changes the unsigned longs node_start_paddr and zone_start_paddr to page frame numbers. This is necessary because a PAE address is 36 bits and cannot be represented in an unsigned long. - The per-node physical memory start address node_start_paddr becomes a pfn, node_start_pfn. - The per-zone physical memory start address zone_start_paddr becomes a pfn, zone_start_pfn. - free_area_init_node() takes a pfn rather than a physical address. Patricia has tested this patch on the following configurations: UP, SMP, SMP PAE, multiquad, multiquad PAE, multiquad DISCONTIGMEM, multiquad DISCONTIGMEM PAE.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/mmzone.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index cdfaea4e3307..84dc4bba425e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -316,8 +316,8 @@ static inline void set_page_zone(struct page *page, unsigned long zone_num)
#else /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL */
#define page_address(page) \
- __va( (((page) - page_zone(page)->zone_mem_map) << PAGE_SHIFT) \
- + page_zone(page)->zone_start_paddr)
+ __va( ( ((page) - page_zone(page)->zone_mem_map) \
+ + page_zone(page)->zone_start_pfn) << PAGE_SHIFT)
#endif /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL */
@@ -398,7 +398,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
extern void free_area_init(unsigned long * zones_size);
extern void free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
- unsigned long * zones_size, unsigned long zone_start_paddr,
+ unsigned long * zones_size, unsigned long zone_start_pfn,
unsigned long *zholes_size);
extern void mem_init(void);
extern void show_mem(void);
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f30bd4f44863..e5b6bc1111b8 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -110,7 +110,8 @@ struct zone {
*/
struct pglist_data *zone_pgdat;
struct page *zone_mem_map;
- unsigned long zone_start_paddr;
+ /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */
+ unsigned long zone_start_pfn;
unsigned long zone_start_mapnr;
/*
@@ -161,7 +162,7 @@ typedef struct pglist_data {
struct page *node_mem_map;
unsigned long *valid_addr_bitmap;
struct bootmem_data *bdata;
- unsigned long node_start_paddr;
+ unsigned long node_start_pfn;
unsigned long node_start_mapnr;
unsigned long node_size;
int node_id;