diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-27 16:38:33 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-27 16:38:33 +1000 |
commit | f5f6cbb61610b7bf9d9d96db9c3979d62a424bab (patch) | |
tree | f13eb8f4179e68a7f9539d085ff860f043ff3408 /Documentation/misc-devices | |
parent | 28e61cc466d8daace4b0f04ba2b83e0bd68f5832 (diff) |
powerpc: Don't Oops when accessing /proc/powerpc/lparcfg without hypervisor
/proc/powerpc/lparcfg is an ancient facility (though still actively used)
which allows access to some informations relative to the partition when
running underneath a PAPR compliant hypervisor.
It makes no sense on non-pseries machines. However, currently, not only
can it be created on these if the kernel has pseries support, but accessing
it on such a machine will crash due to trying to do hypervisor calls.
In fact, it should also not do HV calls on older pseries that didn't have
an hypervisor either.
Finally, it has the plumbing to be a module but is a "bool" Kconfig option.
This fixes the whole lot by turning it into a machine_device_initcall
that is only created on pseries, and adding the necessary hypervisor
check before calling the H_GET_EM_PARMS hypercall
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'Documentation/misc-devices')
0 files changed, 0 insertions, 0 deletions