summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/lmb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/lmb.h b/include/lmb.h
index fc2daaa7bfc..aee2f9fcdaa 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -111,6 +111,11 @@ struct lmb *lmb_get(void);
int lmb_push(struct lmb *store);
void lmb_pop(struct lmb *store);
+static inline int lmb_read_check(phys_addr_t addr, phys_size_t len)
+{
+ return lmb_alloc_addr(addr, len) == addr ? 0 : -1;
+}
+
#endif /* __KERNEL__ */
#endif /* _LINUX_LMB_H */