OSDN Git Service

ipmi: Don't initialize anything in the core until something uses it
authorCorey Minyard <cminyard@mvista.com>
Thu, 20 Dec 2018 22:50:23 +0000 (16:50 -0600)
committerCorey Minyard <cminyard@mvista.com>
Wed, 23 Jan 2019 17:09:32 +0000 (11:09 -0600)
commit913a89f009d98c85a902d718cd54bb32ab11d167
tree4583b3d24643397fedac673ab748611a60a87b32
parent77f8269606bf95fcb232ee86f6da80886f1dfae8
ipmi: Don't initialize anything in the core until something uses it

The IPMI driver was recently modified to use SRCU, but it turns out
this uses a chunk of percpu memory, even if IPMI is never used.

So modify thing to on initialize on the first use.  There was already
code to sort of handle this for handling init races, so piggy back
on top of that, and simplify it in the process.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reported-by: Tejun Heo <tj@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 4.18
drivers/char/ipmi/ipmi_msghandler.c