This simplifies the locking and lets us remove some weird event
handling code. deliver_response() and friends can now be called
from an atomic context.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 41 ++---
1 file changed, 25 insertions(+), 16 d
The lower level interface shouldn't attempt to unregister if it has a
callback in the pending queue.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 34 ++---
1 file changed, 12 insertions(+), 22 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msg
It's available, remove all the duplicate code.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_watchdog.c | 72 ---
1 file changed, 17 insertions(+), 55 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_watchdog.c
b/drivers/char/ipmi/ipmi_watchdog.c
index 01c
Don't have the other users that do things at panic time (the watchdog)
do all this themselves, provide a function to do it.
Also, with the new design where most stuff happens at thread context,
a few things needed to be fixed to avoid doing locking in a panic
context.
Signed-off-by: Corey Minyard
Callbacks no longer run at interrupt level or bh, so remove those
comments.
Signed-off-by: Corey Minyard
---
Documentation/driver-api/ipmi.rst | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/driver-api/ipmi.rst
b/Documentation/driver-api/ipmi.rst
index
It was possible for the SSIF thread to stop and quit before the
kthread_stop() call because ssif->stopping was set before the
stop. So only exit the SSIF thread is kthread_should_stop()
returns true.
There is no need to wake the thread, as the wait will be interrupted
by kthread_stop().
Signed-o
It is possible in some situations that IPMI devices won't get started up
properly. This change makes it so all non-duplicate devices will get
started up.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_si_intf.c | 82
1 file changed, 62 insertions(+), 20
This makes sure any outstanding messages are returned to the user before
the interface is cleaned up.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/driver
You can't do IPMI calls from the callback, it's called with locks
held.
Signed-off-by: Corey Minyard
---
include/linux/ipmi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 2f74dd90c271..27cd5980bb27 100644
--- a/include/li
Messages already have a refcount for the user, so there's no need to
account for a new one.
As part of this, grab a refcount to the interface when processing
received messages. The messages can be freed there, cause the user
then the interface to be freed.
Signed-off-by: Corey Minyard
---
driv
If we get a command from a LAN channel, return an error instead of just
throwing it away.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/d
It's no longer used.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msghandler.c
index 74a84d9c..927556ca469d 100644
--- a/drivers/char/ipmi/ipmi_msghandler.
Everything can be run in thread context now, don't use the bh one.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msghandler.c
index
Check to see if they have been destroyed before trying to deliver a
message.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 28 ++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/
With reworks srcu is no longer necessary, this simplifies locking a lot.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 194 +++-
1 file changed, 102 insertions(+), 92 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/i
Now that SRCU is gone from IPMI, it can no longer be sloppy about
locking. Use the users mutex now when sending a message, not the big
ipmi_interfaces mutex, because it can result in a recursive lock. The
users mutex will work because the interface destroy code claims it after
setting the interfa
When run to completion is set, don't call things that will claim
mutexes or call user callbacks.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msghandler.c
Now that the msghandler does all callbacks in user threads, there is
no need to have a lock any more, a mutex will work fine.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_watchdog.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/char/
With the restructures done, srcu is no longer required, and it's fairly
onerous.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 310
1 file changed, 133 insertions(+), 177 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drive
Get all operations that manipulate the interface list into thread
context.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msgha
It can only be called from thread context now.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msghandler.c
index fc939b5bb7f8..09
It handles both receive and transmit functions, make the name generic.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msg
It needs to be read only once because it's used in lock/unlock
scenarios.
Signed-off-by: Corey Minyard
---
drivers/char/ipmi/ipmi_msghandler.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c
b/drivers/char/ipmi/ipmi_msgha
This patch set switches from SRCU to using normal locks. This required
pulling most of the IPMI message handler up to run in kernel threads,
which was a good thing, anyway. It also handles some fallout from
that change.
I didn't have a way to thoroughly test the IPMI driver, most of the
work for
24 matches
Mail list logo