Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753692AbdCTJ5V (ORCPT ); Mon, 20 Mar 2017 05:57:21 -0400 Received: from ozlabs.org ([103.22.144.67]:35771 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753417AbdCTJ4o (ORCPT ); Mon, 20 Mar 2017 05:56:44 -0400 From: Michael Ellerman To: David Gibson Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org, linux-kernel@vger.kernel.org, David Gibson Subject: Re: [PATCH] powerpc/pseries: Don't give a warning when HPT resizing isn't available In-Reply-To: <87tw6sbims.fsf@concordia.ellerman.id.au> References: <20170317011119.31091-1-david@gibson.dropbear.id.au> <87tw6sbims.fsf@concordia.ellerman.id.au> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 20 Mar 2017 20:56:39 +1100 Message-ID: <87fui846g8.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1907 Lines: 48 Michael Ellerman writes: > David Gibson 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 >> --- >> 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