Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 380B7C0650F for ; Thu, 8 Aug 2019 12:20:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07924214C6 for ; Thu, 8 Aug 2019 12:20:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ejvYGuRb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="Oaw7yNE6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07924214C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ae/KE3gHsfY5ifY52JNm6WMONPThqLUJOiaAL99zOZM=; b=ejvYGuRbwEleTEYL1mabcB6/t JMkWYNnq1koQdm6E/zVsVShdZ7jY2J8rORRhgBodxT20PZ5wRUdv517Gm/DmDqvCk+XXOVa7EXf2u tdZ+ch7cROz7x1yYq674uJXfXCFQ7aypMDGFC7tIZLXQcznKpqyFehAFIHpifHsD8rXuYCiP7jMfj 5cI+faKYF2V6qzSSFq4og4Tiz2MaU2nVB3VVH3//HgXFTrV3VFy4EpIzIx9Q0FSHSu5pDuX3jBz3s 5cDHwuKGqtShbZs72wCeazkkyL0dws7WPkrTsJYS+Y8KvMSjDdH7n5sr2JryMRU2DrHWYhwhVXJq7 CvUqbICEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvhOp-0007nE-Hm; Thu, 08 Aug 2019 12:20:07 +0000 Received: from heliosphere.sirena.org.uk ([2a01:7e01::f03c:91ff:fed4:a3b6]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvhOl-0006gs-Rs for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 12:20:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ADy5Xml/Z3WR2u/kW86//n29ZVBeE46HrrARga4hAo0=; b=Oaw7yNE6zzRP0QX+OTd7C33Jx DLN7PT8PgsvaNV52qx3olskdH8hYFF62R9sbolWhwEOpo4GI1xyfHgcWacG/5D3Jse/jJM0JrfQE6 OJQ1Xkm9RaNmRXU4g8MqXhMSzcZ0LiVUMoUnOH+66VyXwre7gosxbHfjKc5nQj2A5I6BU=; Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hvhOg-0002oH-Gt; Thu, 08 Aug 2019 12:19:58 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 44CD82742BDD; Thu, 8 Aug 2019 13:19:56 +0100 (BST) Date: Thu, 8 Aug 2019 13:19:56 +0100 From: Mark Brown To: Suzuki K Poulose Subject: Re: [PATCH] arm64: Clarify when cpu_enable() is called Message-ID: <20190808121956.GA3795@sirena.co.uk> References: <20190806170043.35588-1-broonie@kernel.org> <20190807160107.fpanxo4iimhg743c@willie-the-truck> <20190807165143.GI4048@sirena.co.uk> <0508fc5a-ab61-f507-507f-3002e49f2d27@arm.com> MIME-Version: 1.0 In-Reply-To: <0508fc5a-ab61-f507-507f-3002e49f2d27@arm.com> X-Cookie: I think we're in trouble. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_052003_932060_073BDE14 X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============5599970658251055580==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5599970658251055580== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 08, 2019 at 12:05:02PM +0100, Suzuki K Poulose wrote: > On 07/08/2019 17:51, Mark Brown wrote: > > On Wed, Aug 07, 2019 at 05:01:08PM +0100, Will Deacon wrote: > > > On Tue, Aug 06, 2019 at 06:00:43PM +0100, Mark Brown wrote: > > I guess you're thinking of the ARM64_CPUCAP_SYSTEM_FEATURE case where we > > match the feature on all CPUs so we could see the feature on some CPUs > > but not detect it as we're requiring a match on all? > We don't run the "match" check (i.e, detect) on all CPUs for SYSTEM scoped > features. Instead, we use sanitised feature set to detect the system features. Right, but the sanitised feature set involves merging the capabilities of all the CPUs. > > If this is called for any CPU in the system then it will be > > called for all of them. > > might cover it? > * current CPU. If this capability is detected by the kernel, this will > * called on all the CPUs in the system, including the hotplugged > * CPUs. > */ How about adding ", regardless of if the capability was detected on that specific CPU" at the end? The above is *accurate* but it's still easy to insert an "on that CPU" in there when reading especially with the awkward phrasing. Or possibly just drop the first comma. The reason I said "If this is called" rather than "if this is detected" is to make it as clear as possible that the calls don't depend on detection without being overly verbose. If this capability is detected by the kernel this will called on all the CPUs in the system, including the hotplugged CPUs, regardless of if the capability was detected on that specific CPU. > > I don't see where we limit where cpu_enable() is called after we start > > calling it. When we're looping through in cpu_enable_non_boot_scope() > > we skip SCOPE_BOOT_CPU but those get cpu_enable() called in > > enable_cpu_capabilites() or verify_local_cpu_capabilities() depending on > > if it's the boot CPU or not. It's possible I'm missing something > > though. ... > Does this help ? I think you just confirmed that when I said we don't limit where we call cpu_enable() that's accurate? --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1ME2kACgkQJNaLcl1U h9AbqAf/QDPEOXxvzV+sMx90JM1qsEXlB9BipfFPYhIFikGM2v+WHL5E1DDVrLCD 2CME+sviWF8r0Y9Vv49MDvFiyr0/yoAKgMeTQ9IWGQMBRaTYQUNH0+ig7m8AqKZU u55H2Os5Fy9xJqyZ/5fU9nrTedYmvkGJibadqqwCt2nl37VLz8yBSeeA6oc85VSd wgperdvXPxkFdxTdxbq4IMzJvDlMOGywvqVZd6vzi6+R2OATDB0ZelDpQ0jMvklc D1xlZ6DYiluHr4SPGXVxqKXnrV+r1hBOG9U+qqZkIfCFlkbxER/agQzm0/xpHkBw TmylyJTASutkHN41NBBhmTcRaf7aHw== =cJwk -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- --===============5599970658251055580== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5599970658251055580==--