Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8991
b: refs/heads/master
c: 1b3cb73
h: refs/heads/master
i:
  8989: c031892
  8987: 747c1ae
  8983: c9263aa
  8975: 7a3228f
  8959: 854e93c
v: v3
  • Loading branch information
Russell King authored and Russell King committed Sep 15, 2005
1 parent 9245b21 commit 74ebcdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 13b9d47ed36e8019a99c798b84c341ef75868e02
refs/heads/master: 1b3cb73f7306f97a68fa973dec9f3c3b68bd29cf
15 changes: 14 additions & 1 deletion trunk/include/asm-arm/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,25 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
#define page_to_pfn(page) \
(( (page) - page_zone(page)->zone_mem_map) \
+ page_zone(page)->zone_start_pfn)

#define pfn_to_page(pfn) \
(PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT))
#define pfn_valid(pfn) (PFN_TO_NID(pfn) < MAX_NUMNODES)

#define pfn_valid(pfn) \
({ \
unsigned int nid = PFN_TO_NID(pfn); \
int valid = nid < MAX_NUMNODES; \
if (valid) { \
pg_data_t *node = NODE_DATA(nid); \
valid = (pfn - node->node_start_pfn) < \
node->node_spanned_pages; \
} \
valid; \
})

#define virt_to_page(kaddr) \
(ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))

#define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES)

/*
Expand Down

0 comments on commit 74ebcdb

Please sign in to comment.