~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/linux/memblock.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
};
36
36
 
37
37
struct memblock {
 
38
        bool bottom_up;  /* is bottom up direction? */
38
39
        phys_addr_t current_limit;
39
40
        struct memblock_type memory;
40
41
        struct memblock_type reserved;
148
149
 
149
150
phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align);
150
151
 
 
152
#ifdef CONFIG_MOVABLE_NODE
 
153
/*
 
154
 * Set the allocation direction to bottom-up or top-down.
 
155
 */
 
156
static inline void memblock_set_bottom_up(bool enable)
 
157
{
 
158
        memblock.bottom_up = enable;
 
159
}
 
160
 
 
161
/*
 
162
 * Check if the allocation direction is bottom-up or not.
 
163
 * if this is true, that said, memblock will allocate memory
 
164
 * in bottom-up direction.
 
165
 */
 
166
static inline bool memblock_bottom_up(void)
 
167
{
 
168
        return memblock.bottom_up;
 
169
}
 
170
#else
 
171
static inline void memblock_set_bottom_up(bool enable) {}
 
172
static inline bool memblock_bottom_up(void) { return false; }
 
173
#endif
 
174
 
151
175
/* Flags for memblock_alloc_base() amd __memblock_alloc_base() */
152
176
#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)
153
177
#define MEMBLOCK_ALLOC_ACCESSIBLE       0