Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1007139pxb; Tue, 9 Nov 2021 03:43:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyq+LjKF7KtwafmXOoT8RQ5eNre3HsjPwptThjiDcExxslU1IPu1JrxcGzNPQkDL3D+2V/T X-Received: by 2002:a6b:b886:: with SMTP id i128mr4646234iof.151.1636458204432; Tue, 09 Nov 2021 03:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636458204; cv=none; d=google.com; s=arc-20160816; b=m6x9xQXMWmrTbqeLSrfXdseuotIfk4IHoLA+KH+nZA9IWRjJsk7yllDlA/biTMy9ld RbUjjQ5eP1a3Y0FT7MKMPah47zkfU84xrYd9H+XQIIm+KZtEldLlLTVXPea9KRTsw89W MXGYcTS9aqZDh/g0YBnc0cndeva3rQ8R3lXPBkgGcqdGzVsayipzzQqznJO17ZLpVmz+ b+8oFjvItym89UeDLgcK6lI07vkCmFIMeMQlbKZCL5nT3bno0fqNLy0+5o9w8bTpBgyV GZzV+/osBT1h7LhlXfoeIOIkbNgROUn9wDBm03CqVYfu4MRnqtuJE2jbTOr5y3CG1QM0 vEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=mZnoXi+ZjFblymkkEDtIcvCWkMos1RRB5u7b5/Z9MGY=; b=vKSB2iiJPuuMseF0PqIsRSNTNLYxeOaWagrHQrG8f8YOi0e8IZzcDo9XN6jA1kKMES Exn5H76+0cg1Ro6pjuEolwCWR2fF2Dj8GuHY+RWpTyh55CU6LwvEEDOidSDxoXGfRpWb tDzlA6bonHIN0tdks0Wt1oPGYJk9hwTY0IfjCTjMnneC6TQekjlG+GOfXl+XsY6+wz+T CitwAIE79z6EZwnIJF3IHsNhzUEuSgaGXiTbS/EZVzUA5IHU+63VaJcSgqPG5Rb7Vl0Z /vk/Y48qYi2jkbe47JOwPtmyO5VVo8rJAeMGcB8Vvy8Q9MrAXpGPL6/03yRlPr023fu0 Tt9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F6JCqZrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si45619345ila.39.2021.11.09.03.43.11; Tue, 09 Nov 2021 03:43:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F6JCqZrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239029AbhKIBqB (ORCPT + 99 others); Mon, 8 Nov 2021 20:46:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28027 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbhKIBqB (ORCPT ); Mon, 8 Nov 2021 20:46:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636422195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mZnoXi+ZjFblymkkEDtIcvCWkMos1RRB5u7b5/Z9MGY=; b=F6JCqZrg1topBsp4lqkK6/kmXfkiP12qMtPLV+1lRvcomNgDjBXUevlluofK3m8+oELHMS 1RYM+kQ1HAmATemMFS0/Zwqu9ET990oE/XVGifowh464+YHsoCr/WAZoCfWY6x6+1XLkqz 4X2X0jwO8bc1dOBlanVbl6RiA5pVXZU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-oFKyZnhZOM2q1dbJgZ4mKA-1; Mon, 08 Nov 2021 20:43:11 -0500 X-MC-Unique: oFKyZnhZOM2q1dbJgZ4mKA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DA42802C91; Tue, 9 Nov 2021 01:43:09 +0000 (UTC) Received: from [10.22.16.6] (unknown [10.22.16.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93D3E5D9DE; Tue, 9 Nov 2021 01:43:05 +0000 (UTC) Message-ID: Date: Mon, 8 Nov 2021 20:43:04 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] powerpc/pseries/cpuhp: Use alloc_cpumask_var() in pseries_cpu_hotplug_init() Content-Language: en-US To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Daniel Henrique Barboza , Nathan Lynch , "Aneesh Kumar K.V" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Laurent Dufour , Nicholas Piggin , Zhang Xiaoxu References: <20211108164751.65565-1-longman@redhat.com> <87y25ym96i.fsf@mpe.ellerman.id.au> From: Waiman Long In-Reply-To: <87y25ym96i.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/8/21 20:04, Michael Ellerman wrote: > Waiman Long writes: >> It was found that the following warning message could be printed out when >> booting the kernel on PowerPC systems that support LPAR: >> >> [ 0.129584] WARNING: CPU: 0 PID: 1 at mm/memblock.c:1451 memblock_alloc_internal+0x5c/0x104 >> [ 0.129593] Modules linked in: >> [ 0.129598] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0-11.el9.ppc64le+debug #1 >> [ 0.129605] NIP: c000000002040134 LR: c00000000204011c CTR: c0000000020241a8 >> [ 0.129610] REGS: c000000005637760 TRAP: 0700 Not tainted (5.14.0-11.el9.ppc64le+debug) >> [ 0.129616] MSR: 8000000002029033 CR: 48000222 XER: 00000002 >> [ 0.129635] CFAR: c0000000004d1cf4 IRQMASK: 0 >> [ 0.129635] GPR00: c00000000204011c c000000005637a00 c000000002c94d00 0000000000000001 >> [ 0.129635] GPR04: 0000000000000080 0000000000000000 0000000000000000 ffffffffffffffff >> [ 0.129635] GPR08: 0000000000000000 0000000000000003 c00000000205ac64 0000000000080000 >> [ 0.129635] GPR12: 0000000000000000 c0000000049d0000 c000000000013078 0000000000000000 >> [ 0.129635] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 >> [ 0.129635] GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 >> [ 0.129635] GPR24: c000000002003808 c00000000146f7b8 0000000000000000 0000000000000100 >> [ 0.129635] GPR28: c000000002d7cf80 0000000000000000 0000000000000008 0000000000000000 >> [ 0.129710] NIP [c000000002040134] memblock_alloc_internal+0x5c/0x104 >> [ 0.129717] LR [c00000000204011c] memblock_alloc_internal+0x44/0x104 >> [ 0.129723] Call Trace: >> [ 0.129726] [c000000005637a00] [c000000005637a40] 0xc000000005637a40 (unreliable) >> [ 0.129735] [c000000005637a60] [c0000000020404d8] memblock_alloc_try_nid+0x94/0xcc >> [ 0.129743] [c000000005637af0] [c00000000205ac64] alloc_bootmem_cpumask_var+0x4c/0x9c >> [ 0.129751] [c000000005637b60] [c0000000020242e0] __machine_initcall_pseries_pseries_cpu_hotplug_init+0x138/0x1d8 >> [ 0.129760] [c000000005637bf0] [c000000000012404] do_one_initcall+0xa4/0x4f0 >> [ 0.129768] [c000000005637cd0] [c000000002005358] do_initcalls+0x140/0x18c >> [ 0.129776] [c000000005637d80] [c0000000020055b8] kernel_init_freeable+0x178/0x1d0 >> [ 0.129783] [c000000005637db0] [c0000000000130a0] kernel_init+0x30/0x190 >> [ 0.129790] [c000000005637e10] [c00000000000cef4] ret_from_kernel_thread+0x5c/0x64 >> >> The warning is printed in memblock_alloc_internal() because the slab >> has been initialized when the initcalls are being processed. To >> avoid the warning, change alloc_bootmem_cpumask_var() call in >> pseries_cpu_hotplug_init() to alloc_cpumask_var() instead. Also >> change cpumask_or() to cpumask_copy() or we will have to use >> zalloc_cpumask_var(). >> >> Fixes: bd1dd4c5f528 ("powerpc/pseries: Prevent free CPU ids being reused on another node") >> Signed-off-by: Waiman Long >> --- >> arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) > > This looks similar to the patch Nick sent recently: > > https://lore.kernel.org/linuxppc-dev/20211105132923.1582514-1-npiggin@gmail.com/ I was not aware of Nick's patch. Since a fix is pending, I am withdrawing mime. Cheers, Longman