Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24306
b: refs/heads/master
c: a0140c1
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Mar 27, 2006
1 parent 3cd0790 commit 2bd8883
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ecd702bcb924d5fb7f687e09986f688336ac896
refs/heads/master: a0140c1d85637ee5f4ea7c78f066e3611a6a79dc
3 changes: 1 addition & 2 deletions trunk/include/asm-alpha/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
pte_t pte; \
unsigned long pfn; \
\
pfn = ((unsigned long)((page)-page_zone(page)->zone_mem_map)) << 32; \
pfn += page_zone(page)->zone_start_pfn << 32; \
pfn = page_to_pfn(page) << 32; \
pte_val(pte) = pfn | pgprot_val(pgprot); \
\
pte; \
Expand Down
10 changes: 5 additions & 5 deletions trunk/include/asm-generic/memory_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ extern unsigned long page_to_pfn(struct page *page);
NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\
})

#define page_to_pfn(pg) \
({ struct page *__pg = (pg); \
struct zone *__zone = page_zone(__pg); \
(unsigned long)(__pg - __zone->zone_mem_map) + \
__zone->zone_start_pfn; \
#define page_to_pfn(pg) \
({ struct page *__pg = (pg); \
struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg)); \
(unsigned long)(__pg - __pgdat->node_mem_map) + \
__pgdat->node_start_pfn; \
})

#elif defined(CONFIG_SPARSEMEM)
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ struct zone {
* Discontig memory support fields.
*/
struct pglist_data *zone_pgdat;
struct page *zone_mem_map;
/* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */
unsigned long zone_start_pfn;

Expand Down
6 changes: 2 additions & 4 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,6 @@ static __meminit void init_currently_empty_zone(struct zone *zone,
zone_wait_table_init(zone, size);
pgdat->nr_zones = zone_idx(zone) + 1;

zone->zone_mem_map = pfn_to_page(zone_start_pfn);
zone->zone_start_pfn = zone_start_pfn;

memmap_init(size, pgdat->node_id, zone_idx(zone), zone_start_pfn);
Expand Down Expand Up @@ -2768,9 +2767,8 @@ struct page *pfn_to_page(unsigned long pfn)
}
unsigned long page_to_pfn(struct page *page)
{
struct zone *zone = page_zone(page);
return (page - zone->zone_mem_map) + zone->zone_start_pfn;

struct pglist_data *pgdat = NODE_DATA(page_to_nid(page));
return (page - pgdat->node_mem_map) + pgdat->node_start_pfn;
}
#elif defined(CONFIG_SPARSEMEM)
struct page *pfn_to_page(unsigned long pfn)
Expand Down

0 comments on commit 2bd8883

Please sign in to comment.