* [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available
@ 2017-03-17 1:11 David Gibson
2017-03-17 5:02 ` Michael Ellerman
2018-01-22 3:34 ` Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: David Gibson @ 2017-03-17 1:11 UTC (permalink / raw)
To: michael; +Cc: paulus, linuxppc-dev, linux-kernel, David Gibson
As of 438cc81a41 "powerpc/pseries: Automatically resize HPT for memory hot
add/remove" when running on the pseries platform, we always attempt to
use the PAPR extension to resize the hashed page table (HPT) when we add
or remove memory.
This is fine, but when the extension is available we'll give a harmless,
but scary warning. This patch suppresses the warning in this case. It
will still warn if the feature is supposed to be available, but didn't
work.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Kind of cosmetic, but getting an error message on every memory hot
plug/unplug attempt if your host doesn't support HPT resizing is
pretty ugly. So I think this is a candidate for quick inclusion.
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index c554768..cc16e4f 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -771,7 +771,7 @@ void resize_hpt_for_hotplug(unsigned long new_mem_size)
int rc;
rc = mmu_hash_ops.resize_hpt(target_hpt_shift);
- if (rc)
+ if (rc && (rc != -ENODEV))
printk(KERN_WARNING
"Unable to resize hash page table to target order %d: %d\n",
target_hpt_shift, rc);
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available
2017-03-17 1:11 [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available David Gibson
@ 2017-03-17 5:02 ` Michael Ellerman
2017-03-20 9:56 ` Michael Ellerman
2018-01-22 3:34 ` Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2017-03-17 5:02 UTC (permalink / raw)
To: David Gibson; +Cc: paulus, linuxppc-dev, linux-kernel, David Gibson
David Gibson <david@gibson.dropbear.id.au> writes:
> As of 438cc81a41 "powerpc/pseries: Automatically resize HPT for memory hot
> add/remove" when running on the pseries platform, we always attempt to
> use the PAPR extension to resize the hashed page table (HPT) when we add
> or remove memory.
>
> This is fine, but when the extension is available we'll give a harmless,
> but scary warning. This patch suppresses the warning in this case. It
> will still warn if the feature is supposed to be available, but didn't
> work.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/mm/hash_utils_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Kind of cosmetic, but getting an error message on every memory hot
> plug/unplug attempt if your host doesn't support HPT resizing is
> pretty ugly. So I think this is a candidate for quick inclusion.
Yeah thanks, I forgot I was going to send a patch for it.
I was thinking of doing the following instead, or maybe we can do both?
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 251060cf1713..8b1fe895daa3 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -751,7 +751,9 @@ void __init hpte_init_pseries(void)
mmu_hash_ops.flush_hash_range = pSeries_lpar_flush_hash_range;
mmu_hash_ops.hpte_clear_all = pseries_hpte_clear_all;
mmu_hash_ops.hugepage_invalidate = pSeries_lpar_hugepage_invalidate;
- mmu_hash_ops.resize_hpt = pseries_lpar_resize_hpt;
+
+ if (firmware_has_feature(FW_FEATURE_HPT_RESIZE))
+ mmu_hash_ops.resize_hpt = pseries_lpar_resize_hpt;
}
void radix_init_pseries(void)
cheers
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available
2017-03-17 5:02 ` Michael Ellerman
@ 2017-03-20 9:56 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-03-20 9:56 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, paulus, linux-kernel, David Gibson
Michael Ellerman <michael@ellerman.id.au> writes:
> David Gibson <david@gibson.dropbear.id.au> writes:
>
>> As of 438cc81a41 "powerpc/pseries: Automatically resize HPT for memory hot
>> add/remove" when running on the pseries platform, we always attempt to
>> use the PAPR extension to resize the hashed page table (HPT) when we add
>> or remove memory.
>>
>> This is fine, but when the extension is available we'll give a harmless,
>> but scary warning. This patch suppresses the warning in this case. It
>> will still warn if the feature is supposed to be available, but didn't
>> work.
>>
>> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>> ---
>> arch/powerpc/mm/hash_utils_64.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Kind of cosmetic, but getting an error message on every memory hot
>> plug/unplug attempt if your host doesn't support HPT resizing is
>> pretty ugly. So I think this is a candidate for quick inclusion.
>
> Yeah thanks, I forgot I was going to send a patch for it.
>
> I was thinking of doing the following instead, or maybe we can do both?
>
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index 251060cf1713..8b1fe895daa3 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -751,7 +751,9 @@ void __init hpte_init_pseries(void)
> mmu_hash_ops.flush_hash_range = pSeries_lpar_flush_hash_range;
> mmu_hash_ops.hpte_clear_all = pseries_hpte_clear_all;
> mmu_hash_ops.hugepage_invalidate = pSeries_lpar_hugepage_invalidate;
> - mmu_hash_ops.resize_hpt = pseries_lpar_resize_hpt;
> +
> + if (firmware_has_feature(FW_FEATURE_HPT_RESIZE))
> + mmu_hash_ops.resize_hpt = pseries_lpar_resize_hpt;
> }
>
> void radix_init_pseries(void)
Applied to powerpc fixes.
https://git.kernel.org/powerpc/c/8971e1c79d3f6c9a5e6f7a65c50c41
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/pseries: Don't give a warning when HPT resizing isn't available
2017-03-17 1:11 [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available David Gibson
2017-03-17 5:02 ` Michael Ellerman
@ 2018-01-22 3:34 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-01-22 3:34 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, paulus, linux-kernel, David Gibson
On Fri, 2017-03-17 at 01:11:19 UTC, David Gibson wrote:
> As of 438cc81a41 "powerpc/pseries: Automatically resize HPT for memory hot
> add/remove" when running on the pseries platform, we always attempt to
> use the PAPR extension to resize the hashed page table (HPT) when we add
> or remove memory.
>
> This is fine, but when the extension is available we'll give a harmless,
> but scary warning. This patch suppresses the warning in this case. It
> will still warn if the feature is supposed to be available, but didn't
> work.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7339390d772ddee0447886d72c3aeb
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-22 3:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17 1:11 [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available David Gibson
2017-03-17 5:02 ` Michael Ellerman
2017-03-20 9:56 ` Michael Ellerman
2018-01-22 3:34 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox