Skip to content

Commit 02897f5

Browse files
committed
Merge tag 'for-linus-6.16-1' of https://github.com/cminyard/linux-ipmi
Pull IPMI updates from Corey Minyard: "Restructure the IPMI driver. This is a restructure of the IPMI driver, mostly to remove SRCU. The locking had issues, and they were not going to be straightforward to fix. Plus it used tons of memory and was generally a pain. Most of this moves handling of messages out of bh and interrupt context and runs it in thread context. Then getting rid of SRCU is easy. This also has a minor cleanup to remove a warning on newer GCCs and to fix some documentation" * tag 'for-linus-6.16-1' of https://github.com/cminyard/linux-ipmi: (26 commits) docs: ipmi: fix spelling and grammar mistakes ipmi:msghandler: Fix potential memory corruption in ipmi_create_user() ipmi:watchdog: Use the new interface for panic messages ipmi:msghandler: Export and fix panic messaging capability Documentation:ipmi: Remove comments about interrupt level ipmi:ssif: Fix a shutdown race ipmi:msghandler: Don't deliver messages to deleted users ipmi:si: Rework startup of IPMI devices ipmi:msghandler: Add a error return from unhandle LAN cmds ipmi:msghandler: Shut down lower layer first at unregister ipmi:msghandler: Remove proc_fs.h ipmi:msghandler: Don't check for shutdown when returning responses ipmi:msghandler: Don't acquire a user refcount for queued messages ipmi:msghandler: Fix locking around users and interfaces ipmi:msghandler: Remove some user level processing in panic mode ipmi: Add a note about the pretimeout callback ipmi:watchdog: Change lock to mutex ipmi:msghandler: Remove srcu for the ipmi_interfaces list ipmi:msghandler: Remove srcu from the ipmi user structure ipmi:msghandler: Use the system_wq, not system_bh_wq ...
2 parents ae5ec8a + 08effa6 commit 02897f5

File tree

10 files changed

+584
-524
lines changed

10 files changed

+584
-524
lines changed

Documentation/driver-api/ipmi.rst

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ manual), choose the 'IPMI SI handler' option. A driver also exists
4545
for direct I2C access to the IPMI management controller. Some boards
4646
support this, but it is unknown if it will work on every board. For
4747
this, choose 'IPMI SMBus handler', but be ready to try to do some
48-
figuring to see if it will work on your system if the SMBIOS/APCI
48+
figuring to see if it will work on your system if the SMBIOS/ACPI
4949
information is wrong or not present. It is fairly safe to have both
5050
these enabled and let the drivers auto-detect what is present.
5151

@@ -63,7 +63,7 @@ situation, you need to read the section below named 'The SI Driver' or
6363
IPMI defines a standard watchdog timer. You can enable this with the
6464
'IPMI Watchdog Timer' config option. If you compile the driver into
6565
the kernel, then via a kernel command-line option you can have the
66-
watchdog timer start as soon as it initializes. It also have a lot
66+
watchdog timer start as soon as it initializes. It also has a lot
6767
of other options, see the 'Watchdog' section below for more details.
6868
Note that you can also have the watchdog continue to run if it is
6969
closed (by default it is disabled on close). Go into the 'Watchdog
@@ -280,10 +280,8 @@ Creating the User
280280
To use the message handler, you must first create a user using
281281
ipmi_create_user. The interface number specifies which SMI you want
282282
to connect to, and you must supply callback functions to be called
283-
when data comes in. The callback function can run at interrupt level,
284-
so be careful using the callbacks. This also allows to you pass in a
285-
piece of data, the handler_data, that will be passed back to you on
286-
all calls.
283+
when data comes in. This also allows to you pass in a piece of data,
284+
the handler_data, that will be passed back to you on all calls.
287285

288286
Once you are done, call ipmi_destroy_user() to get rid of the user.
289287

@@ -303,8 +301,7 @@ use it for anything you like.
303301

304302
Responses come back in the function pointed to by the ipmi_recv_hndl
305303
field of the "handler" that you passed in to ipmi_create_user().
306-
Remember again, these may be running at interrupt level. Remember to
307-
look at the receive type, too.
304+
Remember to look at the receive type, too.
308305

309306
From userland, you fill out an ipmi_req_t structure and use the
310307
IPMICTL_SEND_COMMAND ioctl. For incoming stuff, you can use select()
@@ -317,13 +314,13 @@ This gives the receiver a place to actually put the message.
317314

318315
If the message cannot fit into the data you provide, you will get an
319316
EMSGSIZE error and the driver will leave the data in the receive
320-
queue. If you want to get it and have it truncate the message, us
317+
queue. If you want to get it and have it truncate the message, use
321318
the IPMICTL_RECEIVE_MSG_TRUNC ioctl.
322319

323320
When you send a command (which is defined by the lowest-order bit of
324321
the netfn per the IPMI spec) on the IPMB bus, the driver will
325322
automatically assign the sequence number to the command and save the
326-
command. If the response is not receive in the IPMI-specified 5
323+
command. If the response is not received in the IPMI-specified 5
327324
seconds, it will generate a response automatically saying the command
328325
timed out. If an unsolicited response comes in (if it was after 5
329326
seconds, for instance), that response will be ignored.
@@ -367,7 +364,7 @@ channel bitmasks do not overlap.
367364

368365
To respond to a received command, set the response bit in the returned
369366
netfn, use the address from the received message, and use the same
370-
msgid that you got in the receive message.
367+
msgid that you got in the received message.
371368

372369
From userland, equivalent IOCTLs are provided to do these functions.
373370

@@ -440,7 +437,7 @@ register would be 0xca6. This defaults to 1.
440437

441438
The regsizes parameter gives the size of a register, in bytes. The
442439
data used by IPMI is 8-bits wide, but it may be inside a larger
443-
register. This parameter allows the read and write type to specified.
440+
register. This parameter allows the read and write type to be specified.
444441
It may be 1, 2, 4, or 8. The default is 1.
445442

446443
Since the register size may be larger than 32 bits, the IPMI data may not
@@ -481,8 +478,8 @@ If your IPMI interface does not support interrupts and is a KCS or
481478
SMIC interface, the IPMI driver will start a kernel thread for the
482479
interface to help speed things up. This is a low-priority kernel
483480
thread that constantly polls the IPMI driver while an IPMI operation
484-
is in progress. The force_kipmid module parameter will all the user to
485-
force this thread on or off. If you force it off and don't have
481+
is in progress. The force_kipmid module parameter will allow the user
482+
to force this thread on or off. If you force it off and don't have
486483
interrupts, the driver will run VERY slowly. Don't blame me,
487484
these interfaces suck.
488485

@@ -583,7 +580,7 @@ kernel command line as::
583580
These are the same options as on the module command line.
584581

585582
The I2C driver does not support non-blocking access or polling, so
586-
this driver cannod to IPMI panic events, extend the watchdog at panic
583+
this driver cannot do IPMI panic events, extend the watchdog at panic
587584
time, or other panic-related IPMI functions without special kernel
588585
patches and driver modifications. You can get those at the openipmi
589586
web page.
@@ -610,7 +607,7 @@ Parameters are::
610607
ipmi_ipmb.retry_time_ms=<Time between retries on IPMB>
611608
ipmi_ipmb.max_retries=<Number of times to retry a message>
612609

613-
Loading the module will not result in the driver automatcially
610+
Loading the module will not result in the driver automatically
614611
starting unless there is device tree information setting it up. If
615612
you want to instantiate one of these by hand, do::
616613

0 commit comments

Comments
 (0)