Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp344431rbb; Sat, 24 Feb 2024 03:10:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmkjTtMGN3fpDBGo7mhFyBWqjCMPPv6lHJbJsB91Lp4d/WQIlzTjsFfZF7lg+ew1Fx6kHfKaZAvM62WkUG2A/rgXFayrBB21beHytvlQ== X-Google-Smtp-Source: AGHT+IEwxa1ES2ZiBTUdRmSOssCSS/qaSVxW+TZJeeWFJP+YxKCoa9Rbmrm4ASWlVZChCz8kiHr9 X-Received: by 2002:a17:906:4c53:b0:a3f:a6c6:25b5 with SMTP id d19-20020a1709064c5300b00a3fa6c625b5mr1494429ejw.69.1708773031706; Sat, 24 Feb 2024 03:10:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708773031; cv=pass; d=google.com; s=arc-20160816; b=arAnnX9bHzr8FPNwUR14Xb/VYac3Xd883ijTaJUb61yoMeq0hQwjSs8YiVc1YIXo0m QV0FmhN4aBCzRzhnuiX39o2ev+wPsOI5Y6TXV8iw6XnTe/MI9gsYNnoU4xLSwfpRVESS OynfkpTqfd9hif/I+JBE2Cpf3dny/i40ZX69wqzumx0RGBAEu5cvLYEZR7A9fC9d5sFv VwrnR8zauwOGOQkbIIyVrL2JNFn6BY5qRabhC5nEQNw+M2TA9AwY+AR15lLlDsB0ry4C mg6Oyc1JfqZ1ThgxZT/55cNBNEUu1blKWPa5wH1micdtNxTphA9++oC0xQ996FfCzdVy +9GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=dLymm2T2FA5G/DqDDXEh4EAUjFizM3wVM9K64JAYh34=; fh=dQXs0JPyEGmDvoejdwrM02hyCH/9ccLc5zzjeSl+udU=; b=eE2sUQKbRqUL1yIHD84QtI/okKcSYekRntW7FJvoECwyyzZpgK4pl1WZiIc7o0h2RW SmurGN0U5vAjTSxBQYAAj75qfrmbJVZFu9RZTXiFmTjwwmLNX72EAfB1LR4TjEghrY6Q G675L7SeCWH+PFKdHw2CADqmtZVAb4CgUY/Ss6GxaeSc5b/QR2QNjLm2MS7TBlycsxZX EFOTaR5NqemELefQvveGg8cCJd3CMHLxCiQ2DKry7lhikZcdArpkc4sWwkUA1LWn88pR OJWsv6KpW3pmRNs/9gCVM/Pmim2cJebuzscMkIDsGZ+NVE/I/SoGgvyGJ0QKUVXKfNdH m9kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ir74/rFK"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jr13-20020a170906a98d00b00a400ea99a83si416420ejb.349.2024.02.24.03.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 03:10:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ir74/rFK"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 790EF1F2217D for ; Sat, 24 Feb 2024 11:10:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F772250EA; Sat, 24 Feb 2024 11:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ir74/rFK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 387312260B; Sat, 24 Feb 2024 11:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708773025; cv=none; b=a502LBAUQLj1jEDoqxnh1STfZ/oOAX+5yjcXxa4VyoREkYCbe9GRX70lYRbe5Q1unyGFK6DjHs7njplcEL24kROwfwLzJ7coGYusmdZjn6mLFVFIYLQZQZePg6yGq0pp+gXc9tBMDufZS11vElVKX7QVATDrEnR5wahejw6ACB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708773025; c=relaxed/simple; bh=m49QT+idwaeh0In0nycFo1IXbGgzrKJZswe/n72NjQ0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=JhPCbpU2hyEvSR7hWMQVakj3PlvchX/oFpisFiD87OcK6q+uTGgujz8kMwhFCPn4j08siOKsCdao6FidGPtauzAKsyFUhYuBsqkB5XTEKQ8Y4OrimB7xs1BaFxpxmPwxNoxdroHqyc1nhDadNu2dE/PLsHUpCEQxE/LnNHjwa+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ir74/rFK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A83E2C433C7; Sat, 24 Feb 2024 11:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708773024; bh=m49QT+idwaeh0In0nycFo1IXbGgzrKJZswe/n72NjQ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ir74/rFKX8LjcfnIudalqZ1q8xK5ha8zdz5j+QLlCC8o6JgVifNggcG1W94cbzOVu aJlVZyGxmLQvvBvTT5seofDYJ9pGay8h9ByZ1XehfNL/Vy/n03E2FhmOL0EAGNTMbs O8HA2DxYhETMakF6o/DmbB7i+qywv0VScrOOUJHOihvyZvqMu9jvEgKH/h7ww6IQNR f96Ha9M8h2vdm01olw1R6sILnsYPSzWvF6pqhXG16F54P9gdZq/Ni/x7XPreIGqFAA +Tp5yboP34eASil67VQIlW8yUt0u9lxXyc3C7uCJPxBdKb9IQh91IRip29etG1Gpdw nXnpmK73ld0CA== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rdpvC-006Lvp-JE; Sat, 24 Feb 2024 11:10:22 +0000 Date: Sat, 24 Feb 2024 11:10:21 +0000 Message-ID: <87a5nq9kyq.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Thomas Gleixner , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, Jing Zhang Subject: Re: [PATCH 2/3] irqchip/gic-v3-its: Spin off GICv4 init into a separate function In-Reply-To: References: <20240219185809.286724-1-oliver.upton@linux.dev> <20240219185809.286724-3-oliver.upton@linux.dev> <87cysm9mtv.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, tglx@linutronix.de, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, jingzhangos@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sat, 24 Feb 2024 11:02:40 +0000, Oliver Upton wrote: > > On Sat, Feb 24, 2024 at 10:30:04AM +0000, Marc Zyngier wrote: > > On Mon, 19 Feb 2024 18:58:07 +0000, Oliver Upton wrote: > > > @@ -3193,7 +3210,8 @@ static void its_cpu_init_lpis(void) > > > * ancient programming gets left in and has possibility of > > > * corrupting memory. > > > */ > > > - val = its_clear_vpend_valid(vlpi_base, 0, 0); > > > + its_clear_vpend_valid(vlpi_base, 0, 0); > > > + return; > > > > I'm not sure about the necessity of this return statement. > > allocate_vpe_l1_table() checks for rvpeid already, so it should be > > fine to carry on. > > Yup, definitely not necessary. My aim was to have the control flow make > it a bit more obvious to the reader what's going on. > > Having what reads as an allocation helper do a feature check isn't > entirely obvious. > > I have no opinion either way though. You could move the if (allocate_vpe_l1_table()) as an 'else' branch, as the two are mutually exclusive. Thanks, M. -- Without deviation from the norm, progress is not possible.