Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1121730lqt; Sat, 20 Apr 2024 01:24:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7agkPBnGrzOEw0RLd7psOLAWmHFcV+7Racrq6t7coof17w7+qu+IF/MAoS1sWOk+nqr7gAknvLB7cO98cN+plDSt/a8F7nyFk35/rdQ== X-Google-Smtp-Source: AGHT+IEpJjz9aNCJt0hdvlP+AS/ypeYklpjveZB5MJ1rBYpuA2iQNSBnmNrC5ehF/yvEoLbM5G91 X-Received: by 2002:a17:906:c141:b0:a55:7614:fa44 with SMTP id dp1-20020a170906c14100b00a557614fa44mr7448606ejc.3.1713601485185; Sat, 20 Apr 2024 01:24:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713601485; cv=pass; d=google.com; s=arc-20160816; b=LgahtiaAWSnD8uair7oAeuVCPYzPDNA4sMZE7FFcC3ZiLhqr1YyVcvo1Rkl18xRxfr PxW26wQOJyblHCDn6qUwFzfeNRzBrMVniEGvDsIfwmFvieg4fSJ5T4+FmguxzClEWKMm HzmL8hWh0Q6kAJyxLhhoS6WXuRT8EyOFDe86xrK+5eCk6kE0vJjJv1ENSBuhOKhMx0F+ /2mjBWDp+vTSS/oz7bF74OuXzlWNtBhnUKmyK6JxaQzxJbO2Hu7fD9prRnbq1vKDaIFA V5bPmntfSWccU2tYc+9rhwOf07+kngF8LNv/2JXC/VYB5eVZXIEErkjjvOEGxDEyHMMn C4pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=7YP2kOUgvAO9nmgByalozkQAbZID4F1+sT3c89bqYzc=; fh=1jjd/CvD+Z2W8HLWXZN5YIYg9x9kG7zaJgJi1INjUWA=; b=Tql56ZINK+MrXck4unOpuLlr6sxfZu08nwgTOEJcPe8LBuDrMo/mR3nP3t65RgV2YL Jt/q9zLcB1nYsdedQB+GZgn7pcayQEoLE/w0WhcypOnCl298FFYKD+2hW+AYqssvVZIQ hKGZITtfttDb5JW2o6EHV19qFVVxeSx6aoYoZY9Sz84It5ETvvt8ncISAyVbA4dQ64pv l2k4GAPJKBcV+XKhmehOZLWMUc5pVsZPmMNGXSz99NZRv8BIw2qc4rQEyVzEw4mIZNKO khq4RHAwr7rBGcXYtbBIqosAji/Zta1LMBp0lsQL5/1Lf4ULO1HCGaUxGC3uCSHolsJ+ Nx4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=ViIUtWba; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-152174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152174-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kb4-20020a1709070f8400b00a51a253c29dsi3130328ejc.463.2024.04.20.01.24.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 01:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=ViIUtWba; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-152174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152174-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E50E21F218B7 for ; Sat, 20 Apr 2024 08:24:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A18681401B; Sat, 20 Apr 2024 08:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="ViIUtWba"; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="cteacejL" Received: from mailrelay2-1.pub.mailoutpod2-cph3.one.com (mailrelay2-1.pub.mailoutpod2-cph3.one.com [46.30.211.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657C413ADC for ; Sat, 20 Apr 2024 08:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.30.211.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713601476; cv=none; b=uQahVDkEkmIgR03dXYHuCXtJdszv0NUmmvSpEddjopLRCJquCfiMMw8uNchdKT9AtB7B09AEf1zK2Dh+sDCNSPah7ntaQ657yhAJ3DMyyug9I8JVJ2si96vqEalq4H33dC3P9AFnr26MQT4/uo3uEltlSIlnjVlvCtQOPTz0WfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713601476; c=relaxed/simple; bh=Il63Q2m0L9+hqPHPjqyTajErfjfgMlXo727fIwhZOso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MbMqjcRELSOyu0OmlC34EEAh78CH5WLxVpKv4GziSk9dx81vRm6Uuyw1r3Bf24ZnCHNVzJ7iWfqoQ2QDkeesP+ldUWiY8E7etMfwUrq2B8COZ5l2e/9poqNifnCZEGmHokjNjlhYtvhP2babzZ4H/Best0fkez0LufN2AXF9hXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org; spf=none smtp.mailfrom=ravnborg.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=ViIUtWba; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=cteacejL; arc=none smtp.client-ip=46.30.211.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ravnborg.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=7YP2kOUgvAO9nmgByalozkQAbZID4F1+sT3c89bqYzc=; b=ViIUtWbax5AOyGg8Ye8xGr07hfvyWNvoBAQeuDy14BCyh7dtyi7IJn0MDGaOOHam6if7gS4BvwzJC rLHS7UTQmd4rE10gbZAhgZXUFFh4ioMKvexxOzT3IftDUqJITIFKjTr+ouBePCYRSYxLlIyOQYhCWb vcNw4u9w01AyqmNGlH06CdS8p+rv/foqj4pSqGE6uPpjUSD2TucHRe+BkHCxWqjx63Ty80O79pI6Xp ZFRgKgskENL+qNYaCWKGZOGfv+vTA9RX9trc9fW3w3akupiQbWDM9aHE0WIgGty6P3R1BKfBchZCdV xAMkLBwnJ7aX/8UF/MwJM54oclAIjzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=7YP2kOUgvAO9nmgByalozkQAbZID4F1+sT3c89bqYzc=; b=cteacejLg5FuxogO4h+ojabJsg/GaluN8Oa7/EUsza4fkTrlz6K0rSZLvQVIwxIVr7vAyImuCF2Px Vq3xD5RBw== X-HalOne-ID: 413a2b34-feef-11ee-bf3b-2778176e2c98 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay2.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id 413a2b34-feef-11ee-bf3b-2778176e2c98; Sat, 20 Apr 2024 08:23:25 +0000 (UTC) Date: Sat, 20 Apr 2024 10:23:23 +0200 From: Sam Ravnborg To: Dawei Li Cc: davem@davemloft.net, andreas@gaisler.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] sparc/of: Remove on-stack cpumask var Message-ID: <20240420082323.GC614130@ravnborg.org> References: <20240420051547.3681642-1-dawei.li@shingroup.cn> <20240420051547.3681642-4-dawei.li@shingroup.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240420051547.3681642-4-dawei.li@shingroup.cn> On Sat, Apr 20, 2024 at 01:15:43PM +0800, Dawei Li wrote: > In general it's preferable to avoid placing cpumasks on the stack, as > for large values of NR_CPUS these can consume significant amounts of > stack space and make stack overflows more likely. > > @cpumask of irq_set_affinity() is read-only and free of change, drop > unneeded cpumask var. > > Signed-off-by: Dawei Li Reviewed-by: Sam Ravnborg > --- > arch/sparc/kernel/of_device_64.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c > index c350c58c7f69..f98c2901f335 100644 > --- a/arch/sparc/kernel/of_device_64.c > +++ b/arch/sparc/kernel/of_device_64.c > @@ -624,10 +624,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op, > out: > nid = of_node_to_nid(dp); > if (nid != -1) { > - cpumask_t numa_mask; > - > - cpumask_copy(&numa_mask, cpumask_of_node(nid)); > - irq_set_affinity(irq, &numa_mask); > + irq_set_affinity(irq, cpumask_of_node(nid)); > } > > return irq; > -- > 2.27.0