OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-parisc/] [mmzone.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _PARISC_MMZONE_H
2
#define _PARISC_MMZONE_H
3
 
4
struct node_map_data {
5
    pg_data_t pg_data;
6
    struct page *adj_node_mem_map;
7
};
8
 
9
extern struct node_map_data node_data[];
10
extern unsigned char *chunkmap;
11
 
12
#define BADCHUNK                ((unsigned char)0xff)
13
#define CHUNKSZ                 (256*1024*1024)
14
#define CHUNKSHIFT              28
15
#define CHUNKMASK               (~(CHUNKSZ - 1))
16
#define CHUNKNUM(paddr)         ((paddr) >> CHUNKSHIFT)
17
 
18
#define NODE_DATA(nid)          (&node_data[nid].pg_data)
19
#define NODE_MEM_MAP(nid)       (NODE_DATA(nid)->node_mem_map)
20
#define ADJ_NODE_MEM_MAP(nid)   (node_data[nid].adj_node_mem_map)
21
 
22
#define phys_to_page(paddr) \
23
        (ADJ_NODE_MEM_MAP(chunkmap[CHUNKNUM((paddr))]) \
24
        + ((paddr) >> PAGE_SHIFT))
25
 
26
#define virt_to_page(kvaddr) phys_to_page(__pa(kvaddr))
27
 
28
/* This is kind of bogus, need to investigate performance of doing it right */
29
#define VALID_PAGE(page)        ((page - mem_map) < max_mapnr)
30
 
31
#endif /* !_PARISC_MMZONE_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.