summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/iommu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 06:38:33 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 06:38:33 (GMT)
commitf5f6cbb61610b7bf9d9d96db9c3979d62a424bab (patch)
treef13eb8f4179e68a7f9539d085ff860f043ff3408 /arch/powerpc/kernel/iommu.c
parent28e61cc466d8daace4b0f04ba2b83e0bd68f5832 (diff)
downloadlinux-fsl-qoriq-f5f6cbb61610b7bf9d9d96db9c3979d62a424bab.tar.xz
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 'arch/powerpc/kernel/iommu.c')
0 files changed, 0 insertions, 0 deletions