Rev 778 | Rev 788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 778 | Rev 786 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #define IS_BUDDY_LEFT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
59 | #define IS_BUDDY_LEFT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
60 | #define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
60 | #define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
61 | 61 | ||
62 | #define ZONE_BLACKLIST_SIZE 8 |
62 | #define ZONE_BLACKLIST_SIZE 8 |
63 | 63 | ||
- | 64 | #define frame_alloc(order, flags) frame_alloc_generic(order, flags, NULL, NULL) |
|
- | 65 | #define frame_alloc_rc(order, flags, status) frame_alloc_generic(order, flags, status, NULL) |
|
- | 66 | #define frame_alloc_rc_zone(order, flags, status, zone) frame_alloc_generic(order, flags, status, zone) |
|
- | 67 | ||
64 | struct zone { |
68 | struct zone { |
65 | link_t link; /**< link to previous and next zone */ |
69 | link_t link; /**< link to previous and next zone */ |
66 | 70 | ||
67 | SPINLOCK_DECLARE(lock); /**< this lock protects everything below */ |
71 | SPINLOCK_DECLARE(lock); /**< this lock protects everything below */ |
68 | __address base; /**< physical address of the first frame in the frames array */ |
72 | __address base; /**< physical address of the first frame in the frames array */ |
Line 99... | Line 103... | ||
99 | extern void zone_attach(zone_t *zone); |
103 | extern void zone_attach(zone_t *zone); |
100 | 104 | ||
101 | extern void frame_init(void); |
105 | extern void frame_init(void); |
102 | extern void frame_initialize(frame_t *frame, zone_t *zone); |
106 | extern void frame_initialize(frame_t *frame, zone_t *zone); |
103 | 107 | ||
104 | __address frame_alloc(int flags, __u8 order, int * status, zone_t **pzone); |
108 | __address frame_alloc_generic(__u8 order, int flags, int * status, zone_t **pzone); |
- | 109 | ||
- | 110 | ||
105 | extern void frame_free(__address addr); |
111 | extern void frame_free(__address addr); |
106 | 112 | ||
107 | zone_t * get_zone_by_frame(frame_t * frame); |
113 | zone_t * get_zone_by_frame(frame_t * frame); |
108 | 114 | ||
109 | /* |
115 | /* |