omap_hsmmc: Flush posted write to IRQ
[linux-ginger.git] / arch / sh / include / asm / mmzone.h
blob7f5363b29ba079a33ad77d03c587fd31cfe2105e
1 #ifndef __ASM_SH_MMZONE_H
2 #define __ASM_SH_MMZONE_H
4 #ifdef __KERNEL__
6 #ifdef CONFIG_NEED_MULTIPLE_NODES
7 #include <linux/numa.h>
9 extern struct pglist_data *node_data[];
10 #define NODE_DATA(nid) (node_data[nid])
12 #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
13 #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
14 NODE_DATA(nid)->node_spanned_pages)
16 static inline int pfn_to_nid(unsigned long pfn)
18 int nid;
20 for (nid = 0; nid < MAX_NUMNODES; nid++)
21 if (pfn >= node_start_pfn(nid) && pfn <= node_end_pfn(nid))
22 break;
24 return nid;
27 static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn)
29 return NODE_DATA(pfn_to_nid(pfn));
32 /* arch/sh/mm/numa.c */
33 void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end);
34 #else
35 static inline void
36 setup_bootmem_node(int nid, unsigned long start, unsigned long end)
39 #endif /* CONFIG_NEED_MULTIPLE_NODES */
41 /* Platform specific mem init */
42 void __init plat_mem_setup(void);
44 /* arch/sh/kernel/setup.c */
45 void __init setup_bootmem_allocator(unsigned long start_pfn);
46 void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
47 unsigned long end_pfn);
49 #endif /* __KERNEL__ */
50 #endif /* __ASM_SH_MMZONE_H */