]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Use lmb_is_removable() to check removability
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Mon, 28 Nov 2016 16:50:45 +0000 (11:50 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 1 Dec 2016 09:49:42 +0000 (20:49 +1100)
commit2fd7d68293f6f2eaefcdd33a60aadbe73961a8fb
tree7e8b603c82c338072a0aad929465b1b3e8c17826
parentfa7c926e7087134080fa14e7ece364876f075300
powerpc/pseries: Use lmb_is_removable() to check removability

We should be using lmb_is_removable() to validate that enough LMBs
are available to remove when doing a remove by count. This will check
that the LMB is owned by the system and it is considered removable.
This patch also adds a pr_info() notification to report the LMB count
to remove was not satisfied.

What we do now is just check that there are enough LMBs owned by the
system when validating there are enough LMBs to remove. This can
lead to situations where there are enough LMBs owned by the system
but not enough that are considered removable. This results in having
to bail out of the remove operation instead of just failing the request
that we should have known wouldn't succeed.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/hotplug-memory.c