diff options
author | Paul Moore <pmoore@redhat.com> | 2014-01-23 15:52:06 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-01-23 15:52:06 -0500 |
commit | 41be702a542a0d14bb0b1c16e824fa9ed27616ec (patch) | |
tree | e48942a05882da47544e179c6a0c920e00137a6a /include/linux/memblock.h | |
parent | 8ed814602876bec9bad2649ca17f34b499357a1c (diff) | |
parent | d8ec26d7f8287f5788a494f56e8814210f0e64be (diff) | |
download | op-kernel-dev-41be702a542a0d14bb0b1c16e824fa9ed27616ec.zip op-kernel-dev-41be702a542a0d14bb0b1c16e824fa9ed27616ec.tar.gz |
Merge tag 'v3.13' into next
Linux 3.13
Minor fixup needed in selinux_inet_conn_request()
Conflicts:
security/selinux/hooks.c
Diffstat (limited to 'include/linux/memblock.h')
-rw-r--r-- | include/linux/memblock.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 31e95ac..77c60e5 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -35,6 +35,7 @@ struct memblock_type { }; struct memblock { + bool bottom_up; /* is bottom up direction? */ phys_addr_t current_limit; struct memblock_type memory; struct memblock_type reserved; @@ -148,6 +149,29 @@ phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid) phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); +#ifdef CONFIG_MOVABLE_NODE +/* + * Set the allocation direction to bottom-up or top-down. + */ +static inline void memblock_set_bottom_up(bool enable) +{ + memblock.bottom_up = enable; +} + +/* + * Check if the allocation direction is bottom-up or not. + * if this is true, that said, memblock will allocate memory + * in bottom-up direction. + */ +static inline bool memblock_bottom_up(void) +{ + return memblock.bottom_up; +} +#else +static inline void memblock_set_bottom_up(bool enable) {} +static inline bool memblock_bottom_up(void) { return false; } +#endif + /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) #define MEMBLOCK_ALLOC_ACCESSIBLE 0 |