From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750985AbdEaED1 (ORCPT ); Wed, 31 May 2017 00:03:27 -0400 Received: from ozlabs.org ([103.22.144.67]:60927 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750778AbdEaED0 (ORCPT ); Wed, 31 May 2017 00:03:26 -0400 From: Michael Ellerman To: Nathan Fontenot , Michael Bringmann , paulus@samba.org, sahilmehta17@gmail.com, jallen@linux.vnet.ibm.com, alastair@d-silva.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/hotplug-mem: Fix aa_index match bug for hotplug In-Reply-To: References: <87tw424lmh.fsf@concordia.ellerman.id.au> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 31 May 2017 14:03:21 +1000 Message-ID: <87r2z54qra.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 Nathan Fontenot writes: > On 05/30/2017 06:41 AM, Michael Ellerman wrote: >> Michael Bringmann writes: >>> When adding or removing memory, the aa_index (affinity value) for the >>> memblock must also be converted to match the endianness of the rest >>> of the 'ibm,dynamic-memory' property. Otherwise, subsequent retrieval >>> of the attribute will likely lead to non-existent nodes, followed by >>> using the default node in the code inappropriately. >>> >>> Signed-off-by: Michael Bringmann >>> >>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c >>> index e104c71..1fb162b 100644 >>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c >>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c >>> @@ -124,6 +124,7 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn) >>> for (i = 0; i < num_lmbs; i++) { >>> lmbs[i].base_addr = be64_to_cpu(lmbs[i].base_addr); >>> lmbs[i].drc_index = be32_to_cpu(lmbs[i].drc_index); >>> + lmbs[i].aa_index = be32_to_cpu(lmbs[i].aa_index); >>> lmbs[i].flags = be32_to_cpu(lmbs[i].flags); >>> } >>> >> >> AFAICS this code was added in commit 5f97b2a0d176 ("powerpc/pseries: >> Implement memory hotplug add in the kernel"). >> >> So this should probably be marked: >> >> Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel") >> >> And it seems like a bug we'd want fixed in stable, so: >> >> Cc: stable@vger.kernel.org # v4.1+ >> >> Am I right? > > Yes, that is correct. Thanks. cheers