1
0
Fork 0
alistair23-linux/arch
Finn Thain 20e07af71f powerpc: Adopt nvram module for PPC64
Adopt nvram module to reduce code duplication. This means CONFIG_NVRAM
becomes available to PPC64 builds. Previously it was only available to
PPC32 builds because it depended on CONFIG_GENERIC_NVRAM.

The IOC_NVRAM_GET_OFFSET ioctl as implemented on PPC64 validates the
offset returned by pmac_get_partition(). Do the same in the nvram module.

Note that the old PPC32 generic_nvram module lacked this test.
So when CONFIG_PPC32 && CONFIG_PPC_PMAC, the IOC_NVRAM_GET_OFFSET ioctl
would have returned 0 (always). But when CONFIG_PPC64 && CONFIG_PPC_PMAC,
the IOC_NVRAM_GET_OFFSET ioctl would have returned -1 (which is -EPERM)
when the requested partition was not found.

With this patch, the result is now -EINVAL on both PPC32 and PPC64 when
the requested PowerMac NVRAM partition is not found. This is a userspace-
visible change, in the non-existent partition case, which would be in
an error path for an IOC_NVRAM_GET_OFFSET ioctl syscall.

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-22 10:21:45 +01:00
..
alpha Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
arc arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
arm Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
arm64 Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
c6x arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
csky arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
h8300 arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
hexagon arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
ia64 arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
m68k m68k: Dispatch nvram_ops calls to Atari or Mac functions 2019-01-22 10:21:45 +01:00
microblaze arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
mips arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
nds32 arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
nios2 arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
openrisc arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
parisc arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
powerpc powerpc: Adopt nvram module for PPC64 2019-01-22 10:21:45 +01:00
riscv arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
s390 Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
sh Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
sparc arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
um Merge branch 'akpm' (patches from Andrew) 2019-01-05 09:16:18 -08:00
unicore32 arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
x86 Kbuild late updates for v4.21 2019-01-06 16:33:10 -08:00
xtensa arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
.gitignore
Kconfig m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS 2019-01-22 10:21:44 +01:00