linux/arch
Serhii Popovych 3073774e63 KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt
Currently the kvm_resize_hpt structure has two fields relevant to the
state of an ongoing resize: 'prepare_done', which indicates whether
the worker thread has completed or not, and 'error' which indicates
whether it was successful or not.

Since the success/failure isn't known until completion, this is
confusingly redundant.  This patch consolidates the information into
just the 'error' value: -EBUSY indicates the worked is still in
progress, other negative values indicate (completed) failure, 0
indicates successful completion.

As a bonus this reduces size of struct kvm_resize_hpt by
__alignof__(struct kvm_hpt_info) and saves few bytes of code.

While there correct comment in struct kvm_resize_hpt which references
a non-existent semaphore (leftover from an early draft).

Assert with WARN_ON() in case of HPT allocation thread work runs more
than once for resize request or resize_hpt_allocate() returns -EBUSY
that is treated specially.

Change comparison against zero to make checkpatch.pl happy.

Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
[dwg: Changed BUG_ON()s to WARN_ON()s and altered commit message for
 clarity]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2017-12-06 13:35:21 +11:00
..
alpha pci-v4.15-changes 2017-11-15 15:01:28 -08:00
arc Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
arm GICv4 Support for KVM/ARM for v4.15 2017-11-17 13:20:01 +01:00
arm64 GICv4 Support for KVM/ARM for v4.15 2017-11-17 13:20:01 +01:00
blackfin This is the bulk of pin control changes for the v4.15 2017-11-16 10:57:11 -08:00
c6x DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
cris pci-v4.15-changes 2017-11-15 15:01:28 -08:00
frv Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
h8300 mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
hexagon A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
ia64 pci-v4.15-changes 2017-11-15 15:01:28 -08:00
m32r m32r: fix endianness constraints 2017-11-15 18:21:00 -08:00
m68k A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
metag DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
microblaze DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
mips KVM: Let KVM_SET_SIGNAL_MASK work as advertised 2017-11-27 17:53:47 +01:00
mn10300 Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
nios2 DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
openrisc kmemcheck: remove annotations 2017-11-15 18:21:04 -08:00
parisc pci-v4.15-changes 2017-11-15 15:01:28 -08:00
powerpc KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt 2017-12-06 13:35:21 +11:00
riscv RISC-V Port for Linux 4.15 v9 2017-11-15 10:49:15 -08:00
s390 KVM: Let KVM_SET_SIGNAL_MASK work as advertised 2017-11-27 17:53:47 +01:00
score
sh Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
sparc Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
tile mm: remove cold parameter from free_hot_cold_page* 2017-11-15 18:21:06 -08:00
um Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
unicore32 kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
x86 KVM: Let KVM_SET_SIGNAL_MASK work as advertised 2017-11-27 17:53:47 +01:00
xtensa pci-v4.15-changes 2017-11-15 15:01:28 -08:00
.gitignore
Kconfig bpf: Revert bpf_overrid_function() helper changes. 2017-11-11 18:24:55 +09:00