Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1121816lqt; Sat, 20 Apr 2024 01:25:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUp0KbRsbEqx36ELI2Eg5dxH6t/djPGa5xCcZTvI723EJTJsifoKQn/k6BRJUvsMEl/PlTNfnap+p/6XIgHeL1Ek2Q8wJr1cGA/4R5Hmw== X-Google-Smtp-Source: AGHT+IEXPjhAFluM1HJZDP9uGGNWql3HVzHkQi7mTMOGZuZ4z+m/dY7tSVYHmKWGV85iV2ZT+4jT X-Received: by 2002:a2e:8785:0:b0:2d7:7bb2:7afc with SMTP id n5-20020a2e8785000000b002d77bb27afcmr2747466lji.3.1713601506216; Sat, 20 Apr 2024 01:25:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713601506; cv=pass; d=google.com; s=arc-20160816; b=qrD6HPv5bCwsaRAEWmkgJzpx+PLJAYoFpM41KvWBCVj5atz1XaqbFzWnLdzx8xALx1 vhF0qP49hvT9RaTDLnGd0RKlx3h/NiZUdK8ohQlNWAKK0/ZDelwvKp6XtM6hsWxKlOAo HrLr4pNeunhKLqDULhRhgwPrcJTw9DXxdtb7EFqB8BNdlmjwtjosC57lBbdVBPHlj+j7 48GsCLo9R4hh+ySigr+Bs8oeEp8ZgNtAjw1t3Mke2peGMYM79b9wWD55sABD2/kM6AKX eRWS8OAzx0qYfefM5FlEh4t0YKoyFuBthkMzwVOmzfdiX1V3ODs0GnmdSDftNmQmkTL6 04yA== 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=+r8emxDSoScNCbTF0m4d/E0SQAbAdMld3Wax9V46eSw=; fh=1jjd/CvD+Z2W8HLWXZN5YIYg9x9kG7zaJgJi1INjUWA=; b=ySeeQydTEMpxNi2XyPB+oI/O06107VbjQKd+zzp68okA9ZLHVq9eVFL1UNW8uB9RPJ v86QD9jTr1wXBhOs6+QAen+pVzcJa/jEHlLvQP4/Uqzm7lEWruredfA/BUi1PRiH35rZ q27zQDJ0rXr7MisKqmv3IYooIEwTxgPFh6QstBDuAnaO/tg75+1WHDVqVFa8p4BlL77E vZTRdIIFdPc9PlynrybWihlm8g5gQhHwOxXuqb1cKchSK0QdBJQuxS0VI4ozA42yOAi2 EUxPyIubza3SRCV0xczaaPCIxzEAtqUMU8NWgmIOaynCsai1MNPO7oR96lZohDHp03ud JBiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=Bh1xpN2G; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1 header.b=kzwmgfIa; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-152175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152175-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 if18-20020a0564025d9200b00571cdc733a5si2097757edb.190.2024.04.20.01.25.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 01:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152175-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=Bh1xpN2G; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1 header.b=kzwmgfIa; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-152175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152175-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 D44CB1F21CCE for ; Sat, 20 Apr 2024 08:25:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA1DA13FE7; Sat, 20 Apr 2024 08:24:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="Bh1xpN2G"; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="kzwmgfIa" Received: from mailrelay3-1.pub.mailoutpod3-cph3.one.com (mailrelay3-1.pub.mailoutpod3-cph3.one.com [46.30.211.242]) (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 22E9714005 for ; Sat, 20 Apr 2024 08:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.30.211.242 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713601498; cv=none; b=ticIS/vM9QylKieKnJtuU/iZbB1MM+OrFODplI1lt8Q0epY3es8ppbU2SKDcuee3zSDpAIMbcDvlGAo+qGTFeL6aeTV4Xk+NrrJ/H5yR+5GIKDELDTBiVByuD6ZIuMvTBOwF2zCdXxWOIoGisrq8KCZzwTB/PwxSV0nMD/6yugg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713601498; c=relaxed/simple; bh=Rf/2X1F+tjt21y4m/23DQ2XX+1pfGqLqyJwI9KkjUTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lGmJzAhK5zZziCyufSvx681cUNVJ4iDjSx/Rei3SS+k16jGciwR+5KJS9JriPc82ZOGsNQoSTdL76AIU79F/RycHC0KxrKU+cAbCKxHL8JB9VM1xIuau1Z+KcNNjL7iqFebBB4xsWeJqzduIyAP8Ldh8KWJtxBOUk13oOA9A3ZU= 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=Bh1xpN2G; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=kzwmgfIa; arc=none smtp.client-ip=46.30.211.242 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=+r8emxDSoScNCbTF0m4d/E0SQAbAdMld3Wax9V46eSw=; b=Bh1xpN2GjrGqjxQx/YANnMNAcPj2VpXzWwasc07sOu+2bJiR5N7/QJYmrvYidtS/NXyRa8A9lWEHr AJ7xFKfx16muFEp1bA6d3tIxToYFOCA6z0AevLrSFyl7kkOj3EqijTl+AW9hQMxW0plRI9PB42ZFcb hPtQGLDsrTGNfZ/EdjZ8AzjV1TKez3rfcG5D7izZG5e2J2ZWoYch6w63w7An98SYvk1KWHLyfNu9Qi 2oVrzWfOBI1HmNQKzNQSeK/XqZ0R/9wzE8AY6VTDxNsFD9vp4CDz6Uw0h+0QrQIBUVeVgM+bJuZOIZ ypGn6zEEnCIp1kyg7gdgdBrhM3dHrTA== 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=+r8emxDSoScNCbTF0m4d/E0SQAbAdMld3Wax9V46eSw=; b=kzwmgfIar7f+YAUGKp0IkFB8UiGu3BQqKRftBZfQE5aZ+DLOii5Ff9NyDHUwamhM31d2nVNHiL8ql 1xFvFO8AQ== X-HalOne-ID: 4dc453fc-feef-11ee-856a-5166eb5bc2d3 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay3.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id 4dc453fc-feef-11ee-856a-5166eb5bc2d3; Sat, 20 Apr 2024 08:23:46 +0000 (UTC) Date: Sat, 20 Apr 2024 10:23:45 +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 4/7] sparc/pci_msi: Remove on-stack cpumask var Message-ID: <20240420082345.GD614130@ravnborg.org> References: <20240420051547.3681642-1-dawei.li@shingroup.cn> <20240420051547.3681642-5-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-5-dawei.li@shingroup.cn> On Sat, Apr 20, 2024 at 01:15:44PM +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/pci_msi.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c > index fc7402948b7b..acb2f83a1d5c 100644 > --- a/arch/sparc/kernel/pci_msi.c > +++ b/arch/sparc/kernel/pci_msi.c > @@ -287,10 +287,7 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm, > > nid = pbm->numa_node; > 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)); > } > err = request_irq(irq, sparc64_msiq_interrupt, 0, > "MSIQ", > -- > 2.27.0