aboutsummaryrefslogtreecommitdiff
path: root/hw/bt.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-03lpc/uart: Support routing of selected LPC interrupts to LinuxBenjamin Herrenschmidt1-1/+3
Each LPC interrupt can be routed to one of 4 lines to the PSI bridge which represent 4 different system interrupts. This allows LPC clients to request as specific target (Linux or OPAL) and makes the LPC core pick a route and configure it appropriately. The UART is updated to properly forward interrupts to Linux if necessary Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-11platform: Add BT to Generic platformBenjamin Herrenschmidt1-3/+7
Instantiate if if it's in the device-tree... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-05-03hw/bt: Move BT_QUEUE_DEBUG macro inside print_debug_queue_info fnVipin K Parashar1-64/+58
Move BT_QUEUE_DEBUG macro inside print_debug_queue_info function to avoid two definitions of same function. Also correct comment syntax and macro definition indentation. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-01bt: use the maximum retry count returned by the BMCCédric Le Goater1-6/+6
OpenPower systems using a AMI firmware on the BMC have a BT device configured with a capability of '1' maximum retry. The following code is equivalent to what skiboot currently supports but it will now also handle setups of other BT devices, like in qemu or OpenBMC. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Reviewed-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-08hw/bt: allow BT driver to use different buffer sizeCédric Le Goater1-4/+2
The buffer size used by the BT driver defaults to 64bytes even when the BMC reports a different size. This patch removes the restriction as there is no apparent reason for it. The extra byte added on the input and output buffer size in the test also seems superfluous. The buffer lengths used later in the code are correct as they take into account the extra byte needed for the message size : bt.caps.input_buf_len = msg->data[1] + 1; bt.caps.output_buf_len = msg->data[2] + 1; >From IPMI Specs: 22.10 Get BT Interface Capabilities Command For Bytes 3 and 4 (Input and Output Buffer size), the buffer message size is the largest value allowed in first byte (length field) of any BT request or response message. For a send, this means if Get BT Interface Capabilities returns 255 in byte 3 (input buffer size) the driver can actually write 256 bytes to the input buffer (adding one for the length byte (byte 1) that is sent in with the request.) Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-07ipmi: Log exact NetFn value in OPAL logsVipin K Parashar1-2/+3
As per IPMI message format NetFn value in present in first 6 bits while last 2 bits contain LUN value. This needs to be taken care while printing NetFn value in OPAL logs which is useful while debugging fails. [root@fir01 /]# ipmitool raw 0x0a 0x48 47 b1 d0 56 [root@fir01 /]# >From OPAL Logs --------------- [133969609199,7] BT: seq 0x3d netfn 0x0a cmd 0x48: Message sent to host [133975465455,7] BT: seq 0x3d netfn 0x0a cmd 0x48: IPMI MSG done >From BMC Logs -------------- IPMIMain: [693 WARNING][corecmdselect.c:913] Request: Channel:f; Netfn:a; Cmd:48; IPMIMain: [693 INFO][corecmdselect.c:924] Response: Channel:f; Netfn:a; Cmd:48; Data:0 47 b1 d0 56 Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-02-25hw/bt.c: Fix message timeoutAlistair Popple1-3/+5
Commit fb457c9 (hw/bt: Ask the BMC for its BT interface capabilities) sets the BT message timeout based on the IPMI get capabilities command. This adds a new structure containing a uint8_t to store the message timeout in seconds (msg_timeout). This introduces two problems: 1) The code that checks for timeouts assumes msg_timeout is in units of the timebase (tb_hz). 2) If get_bt_caps() fails msg_timeout is set to BT_MSG_TIMEOUT which is in units of tb_hz and easily overflows a uint8_t. This patch solves the above two problems by changing the definition of BT_MSG_TIMEOUT to seconds and using secs_to_tb() when comparing timebases. It also converts the timebase comparison to use tb_compare(). Signed-off-by: Alistair Popple <alistair@popple.id.au> Cc: Cyril Bur <cyril.bur@au1.ibm.com> Cc: Stewart Smith <stewart@linux.vnet.ibm.com> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Tested-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Reviewed-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-08hw/bt: improve loggingCédric Le Goater1-22/+20
This patch adds a "BT: " prefix to all logs and replaces a forgotten printf. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-06hw/bt: Fixup problems with BT get capabilities codeCyril Bur1-12/+13
Commit fb457c95 had a few issues chief of which being incorrectly accessing IPMI response buffer. IPMI response to Get BT Interface Capabilities Command documented in 22.10 of IPMI spec v2.0 rev 1.1, table 22, page 280 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> [stewart@linux.vnet.ibm.com: add spec to commit message] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Ask the BMC for its BT interface capabilitiesCyril Bur1-3/+83
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Clear the fifo when an unknown response is receivedCyril Bur1-1/+23
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Remove state machine and use only B2H_ATN and H2B_ATN.Cyril Bur1-21/+7
Correct use of B2H_ATN and H2B_ATN means that we don't need to track states. The only caveat is that currently we use states to know if we need to send a message to the BMC, change this to simply seeing if the top message has been sent or not. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Convert retry_count to send_countCyril Bur1-6/+8
It is useful to know if a message has been sent at all, the counter used to retry sending can be used for this. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-17hw/bt: Improve debug printingCyril Bur1-19/+40
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> [stewart@linux.vnet.ibm.com: always have BT_Q_LOG called] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-08hw/bt.c: Timeout messages when bt interface isn't functionalAlistair Popple1-9/+17
During system bring up we may not have a properly functioning ipmi interface. This prevents skiboot completing the boot process as it waits for certain bt messages to complete before continuing. This patch alters the bt message timeouts to ensure messages timeout in the case of a non-responsive bt interface. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-07hw/bt.c: Check for timeout after checking for message responseAlistair Popple1-1/+2
When deciding if a BT message has timed out we should first check for a message response. This will ensure that messages will not time out if there was a delay calling the pollers. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-11timer: Pass current timer to timer callbacksBenjamin Herrenschmidt1-7/+6
The caller usually has it and it avoids additional mftb() which can be expensive. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: fix run-timer unit test] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-10ipmi: Provide a macro for netfn return codeNeelesh Gupta1-1/+2
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Cc: Alistair Popple <alistair@popple.id.au> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-03bt: Check before dequeuing messages with ipmi_dequeue_msgAlistair Popple1-1/+1
We will soon expose the dequeue message function which deletes previously queued messages from the message queue. It could help catch a few bugs by doing some extra checks. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-02hw/bt.c: Fix trivial typosKamalesh Babulal1-3/+3
Fix trivial typos 'messasge' -> 'message' 'resposne' -> 'response' 'intialized' -> 'initialized' One of them, is in the log message. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-19Support for Naples LPC serial interruptsBenjamin Herrenschmidt1-1/+11
This adds support for the HW SerIRQ deserializer of the P8 LPC bridge which is properly wired up on Naples. It also adds support for detecting and reporting LPC error interrupts on all P8s. On most platforms (Rhesus is the exception here due to the way it lets Linux handle the UART interrupts directly), we modify the device-tree to properly represent the LPC controller as a cascaded interrupt-controller and the "interrupts" property of LPC devices to contain the actual LPC interrupt number for the device. We add a mechanism for drivers to register specific LPC interrupts, and a "workaround" for pre-Naples P8 which platforms can use to call all of them for when the external FPGA based deserializer is used. There's also a callback on LPC resets which isn't used yet, we need a bit more work on the general LPC error handling, but it can be done a separate patches. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-19hw/bt: Fix bt_msg_del lockingAlistair Popple1-1/+5
bt_msg_del() calls ipmi_cmd_done() to free the message and process any error callbacks. However it should drop the lock prior to calling ipmi_cmd_done() as some error callbacks may try to queue ipmi messages leading to a dead lock. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-18Merge branch 'stable'Stewart Smith1-4/+5
2015-06-18hw/bt.c: Fix message response searchAlistair Popple1-4/+5
bt_get_resp() uses the sequence number to locate the outstanding message by searching the queue with list_for_each(...). The check to see if a message was found in the queue is: if (!bt_msg || (bt_msg->seq != seq)) However this check is incorrect. list_for_each(...) does not set bt_msg to NULL at the end of the loop, nor does it set it to the last element in the list. Rather it ends up pointing at an offset from the list_head. Therefore bt_msg is never equal to NULL and the first half of this condition is always false. However the second condition is almost always true as sequence numbers are constantly increasing and unlikely to match whatever bt_msg->seq ends up pointing to, but in rare circumstances it is possible for bt_msg->seq to equal seq and hence the overall expression can evaluate to false. This leads to bt_msg being used as a valid message pointer even though it points to an incorrect address, typically causing a xstop due to an invalid address access when ipmi_cmd_done(...) attempts to call the callbacks. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-13bt: Remove B_BUSY stateAlistair Popple1-18/+6
The bt layer used to cache the value of B_BUSY in the state machine, assuming that once B_BUSY was cleared by the BMC that it would never be set by the BMC again unless a message was sent to the bt interface. This was mostly true for the AMI firmware except when the BMC reboots which causes B_BUSY to be set. There may also be additional circumstances which set B_BUSY. Therefore the bt layer must check B_BUSY is clear before sending a message making the B_BUSY state superfluous. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-11hw/bt: Add netfn to BT_ERR messageJeremy Kerr1-2/+3
It's not too useful to print the command without the netfn, so add this into the BT_ERR macro. Reported by: Nick Bofferding <bofferdn@us.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-01Add xscom_ok() and lpc_ok() to check XSCOM and LPC usabilityskiboot-5.0.1Benjamin Herrenschmidt1-2/+9
his primarily checks whether the caller already holds the corresponding locks to avoid re-entrancy in some of the deep error path such as when XSCOM itself triggers an error log. It will be extended in the case of LPC to also handle known HW error states. We use them to avoid queuing/polling in the BT driver and to discard characters in the UART driver. Note: This will not normally involve a loss of log to the UART as the UART driver is also protected by the console suspend mechanism. So this is a safety mechanism only. This fixes issues where the generation of error logs inside the LPC or XSCOM drivers could cause a re-entrancy (via the BT interface) causing deadlocks. Now, the error logs IPMI messages will be queued up and delivered later on the next poll handler. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-04-09bt: Add a temporary workaround for bmc dropping messagesAlistair Popple1-8/+26
There is a bug (most likely on the bmc) that causes some bt messages to be ignored. The message data is still in the bt fifo and the message read pointers still appear to be valid so we can attempt a resend by just setting the appropriate status flag. A single retry seems to fix the problem most of the time, however this should be regarded as a temporary fix. If unlucky we could encounter the same bug resetting the flag so the message could still get dropped. Signed-off-by: Alistair Popple <alistair@popple.id.au> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-05sparse: bt_backend can be staticCédric Le Goater1-1/+1
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-04bt: Make queue length 10Joel Stanley1-2/+2
Now that skiboot supports more IPMI functionality we are queuing more than 5 messages at a time. For example in the astbmc platform.init() adds 6 messages to the queue. Shifting to ten ensures current systems boot without dropping messages, and should give us some breathing room. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-26sparse: state_str is unusedCédric Le Goater1-6/+0
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23bt: Minor locking fix for bt_get_resp()Alistair Popple1-1/+0
bt_get_resp() should return with the bt lock held. Under very rare error conditions bt_get_resp() would drop the lock before returning. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23bt: Improve error messagesAlistair Popple1-5/+10
Most of the error messages in the bt layer don't report enough information to assist with debugging. This patch standardises the information reported when the bt layer encounters an error such as a timeout. It also fixes a problem where expired messages would produce a spurious warning about an incorrect netfn. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-19bt: Cleanup bt state machine and fix SMS_ATN bugAlistair Popple1-88/+88
Currently the SMS_ATN bit is processed by the bt interrupt handler. This means that on systems without a functional bmc interrupt (such as during early bring up) an SMS_ATN will not be noticed, including the watchdog pre-timeout which results in the wdt expiring. This patch moves the check for SMS_ATN into the main bt polling loop, ensuring it is processed even without functional bmc interrupts. It also cleans up the logic in bt_poll() to make it clearer and reduce the number of lpc register reads. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-09ipmi: handle SMS_ATN eventsJeremy Kerr1-0/+6
When the bt interface sets the SMS_ATN flag, we perform a Get Message Flags to determine what messages are available. The only message type currently processed is the Event Message Buffer, which provides SEL messages for indicating OEM specific events such as graceful system shutdown and PNOR access requested. These events will be handled by the IPMI layer in skiboot. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi/bt: Enable adding messages to the start of the queueAlistair Popple1-5/+23
By default new ipmi messages are added to the end of the transmission queue. However sometimes it is necessary to add messages to the start of the queue. This patch adds a new ipmi function that adds messages to the start of the transmission queue. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-12bt: Use new polling timer interface instead of OPAL pollersBenjamin Herrenschmidt1-7/+22
... which I'm trying to deprecate Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-12bt: Reinitialise bt interface correctly after a resetAlistair Popple1-6/+6
Add a call to bt_init_interface() in bt_reset_interface(). This ensures that interrupts are re-enabled after a bt interface reset. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-12bt/ipmi: Quieten logging outputAlistair Popple1-3/+0
Some tools (eg. ipmitool) that use the Linux ipmi stack send potentially invalid commands to probe functionality. Currently skiboot prints an error to the console whenever this happens resulting in excessive noise when using the Linux ipmi stack. This patch just removes and/or lowers the logging level of these errors. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-12bt: Fix message timeoutsAlistair Popple1-7/+14
The initial timeout scheme started a message timeout when it was added to the queue rather than when transmission was started. To avoid timing out messages that just got stuck behind a couple of slow ones we should instead just check that the active message has not timed out. This patch ensures timeout values are only checked for the currently active message. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-12bt: Add locking for bt hardware pollingAlistair Popple1-34/+40
This patch adds some locking to the polling of the bt hardware/state. Prior to having proper interrupts and events working this was not so critical as we would only ever have one call to bt_poll running at a time. However functioning interrupts mean we can have multiple calls to bt_poll so we need to add some locking to ensure consistency between the state machine and the hardware. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-12bt: Add call to bt_poll to kick start message state machineAlistair Popple1-22/+24
The bt interface relies on a fairly simple state machine to send messages to the bmc. Messages are added to a queue for sending and something calls the state machine to start sending messages, usually via opal_poll_events. However under some circumstances this doesn't happen so we need to crank the state machine to start start sending messages. This patch adds a call to bt_poll to make sure we start sending a message which should ensure the bmc generates an irq once the message is sent to continue processing. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-30ipmi: Add an opal interface to the ipmi stackAlistair Popple1-8/+28
This patch adds two opal calls (opal_ipmi_send and opal_ipmi_recv) to allow an operating system to send and receive arbitrary ipmi messages to the BMC. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05ipmi/bt: Rework iBT register accessBenjamin Herrenschmidt1-33/+54
The bits in the control register are mostly write-1-to-clear, so the rmw sequences in bt_setmask() and bt_clearmask() don't work. Additionally, H_BUSY is weird as it's a write-1-to-toggle, so let's write a "safe" function that sets it to the desired state based on its previous state. (We can optimize that further later). Also enable interrupt operations. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01bt: Add message timeoutAlistair Popple1-5/+35
This patch adds message timeouts to the bt layer. When a response to a message is not recieved within a given time we call the error callback with a completion code indicating a timeout. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01bt: Limit the outstanding message queue lengthAlistair Popple1-0/+21
This patch ensures that the number of outstanding messages in the bt interface queue can not grow unchecked. If adding a message to the queue causes it to exceed the maximum size we remove the oldest message from the queue. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01ipmi/bt: Improve message validation and allow out-of-order command responsesAlistair Popple1-27/+32
This patch adds validation of the ipmi cmd and netfn numbers returned by the bmc. It also ensures the sequence number is correct by searching the outstanding message queue for the corresponding sequence number. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01bt/ipmi: Convert to using asynchronous messagingAlistair Popple1-60/+19
Previously we were doing synchronous messaging and cranking the bt state machine from within OPAL. This was not ideal as it could potentially take control away from the OS for long periods of time if the BMC is busy. This patch solves the problem using the opal_poll api to do asynchronous messaging. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01ipmi: Refactored ipmi layer to use generic backendAlistair Popple1-20/+28
The initial implementation of the ipmi stack was still tightly coupled with the backend (in this case bt). This patch refactors the ipmi code to use a generic backend device. The core ipmi messaging functionality and the implementation of specific commands has also been split into different files. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01bt/ipmi: Fixup allocation of bt/ipmi messagesAlistair Popple1-24/+42
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>