diff options
author | Alistair Popple <alistair@popple.id.au> | 2014-09-09 15:57:26 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-10-01 14:23:06 +1000 |
commit | 69a833b6e2fc1636e25539ce58bde6e72f1c3bec (patch) | |
tree | b658b3a433f1ade3494fd8de85709691f9f60997 /include/bt.h | |
parent | befc5fdb30604a24cdcd7c3c1d0f2b4e60af453e (diff) | |
download | skiboot-69a833b6e2fc1636e25539ce58bde6e72f1c3bec.zip skiboot-69a833b6e2fc1636e25539ce58bde6e72f1c3bec.tar.gz skiboot-69a833b6e2fc1636e25539ce58bde6e72f1c3bec.tar.bz2 |
bt/ipmi: Fixup allocation of bt/ipmi messages
The original implementation of the bt and ipmi layers required the bt,
ipmi and message data to be allocated separately. This is sub-optimal
as it could cause excessive memory fragmentation. This patch fixes the
problem by adding a function to the bt layer to allocate space for
both the required data and bt/ipmi message.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/bt.h')
-rw-r--r-- | include/bt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bt.h b/include/bt.h index 4eac355..5f8a91e 100644 --- a/include/bt.h +++ b/include/bt.h @@ -22,6 +22,12 @@ /* Initialise the BT interface */ void bt_init(void (*ipmi_cmd_done)(struct ipmi_msg *)); +/* Allocate an BT-IPMI message */ +struct ipmi_msg *bt_alloc_ipmi_msg(size_t request_size, size_t response_size); + +/* Free a BT-IPMI message */ +void bt_free_ipmi_msg(struct ipmi_msg *ipmi_msg); + /* Add an IPMI message to the BT queue and wait for a resposne */ int bt_add_ipmi_msg_wait(struct ipmi_msg *msg); |