Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3816680rdb; Thu, 14 Sep 2023 03:44:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAjY/03sP2rQY/IhZ9at0FGlUFR6zSZmapXNSJ3vu4LTGWLydrglsYNpSP0Jx4u/X0qvYH X-Received: by 2002:a17:902:e743:b0:1b4:5699:aac1 with SMTP id p3-20020a170902e74300b001b45699aac1mr2074418plf.12.1694688242490; Thu, 14 Sep 2023 03:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694688242; cv=none; d=google.com; s=arc-20160816; b=FA+EN1nHOfP7N4Vnsp698eJ5RoS0DCtZJg4EesafZg90yhOlxvH3777zRoLgLd6Cld E0sTlN0F/ABoLzL2bD4hD0lbNSTcTr2FGDY3DLFo4IbcCNZjnXX/qf7yqD1yudRZAxD9 KMyVhy5oPCSFYGyscvjF5mXOYf97DayilA3k5zzUpQWUog9ERswK6a4rZSEpA0NBNuy4 VoTRwy/uSHvwRwXu8nmtWTzeQ1qrj2lDrTO28JkXacZqtBQNYzCLKMeOEMvQY580oUg/ 7VwRjjsmAmH6MugfEZTkQDMH/jUaWEWm3rOjStmOexuam+vD2u6a6c+3BJE3kFLQ82h9 FzpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=iCDaoWU8k3ooY23J3dxgpz/nakxnWktOXLLFupWLTbA=; fh=zy1Co7PYFmuXUg2eZotSjXGb5HebW9Y60njLFSa2hrI=; b=ZWIfbKJKsRFI9CHRyw3wH/LivewEvlIxyOZnY+E91G2XmfIxuZ5541PSsbKWM9Z8au /q0EMQwmWIo3VoGccDDa478ou1x9KTsxexmPfklZa01B2Zct89e21mWIkWR6I7oKERol oW7T+ldM5L1mWo1ZOY0Dg+JhDdXApBerWg421hXwJAPSFnTvLfPqmA0mMcbqzUyt0Iad ZNXKhoCqPhWxuZM12SS+9bdVqh3NqtWoaPcFuEUSjnoMaYNzevXT35iDcqY1JozeaENz 2GwgkzyjW2e1OYlLzdHGQypaSH53eKCmm2zMwfK/c4ozLxcNociXpG5o0MXog2yHNlMj amBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=UFxMHLKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j15-20020a170903024f00b001bbb83a182csi1579111plh.519.2023.09.14.03.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 03:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=UFxMHLKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4E4B58198C5C; Thu, 14 Sep 2023 03:02:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237747AbjINKCX (ORCPT + 99 others); Thu, 14 Sep 2023 06:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237510AbjINKCV (ORCPT ); Thu, 14 Sep 2023 06:02:21 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 704F81BE3; Thu, 14 Sep 2023 03:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iCDaoWU8k3ooY23J3dxgpz/nakxnWktOXLLFupWLTbA=; b=UFxMHLKYzZyY7mHPABi1AP7z4p F7AmKyRukOnpDwOg9tFNL0Xnc8BvqxbeJ5gWYLDAB0f12i4tqB1yED6bC4HOot7xVswBoXyRib6Aa iSn+wGZvBtoJhir6uwiJnRTaM/7cU8y5wsMrbw3HP/eCCNek2OjqkRybrCxVdvMKyz/sppQSQEkK6 wFdabJp7PITuOJ1Td4k5sK3kq3546wtJbxl8C18a81C3aq000dB8G31Th/OUkEmoUTUalM2ujMlpp OJKofz4Sxkd4uxCBEJnDPIQ9IcnAZqOQ+R1r/iKsZ5j7uhdcV3RaDdPlC89leJqGMrKFa+mGaMQj6 Lo+dIqRQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55846) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qgjAs-0003qg-21; Thu, 14 Sep 2023 11:02:14 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qgjAt-0004f2-D7; Thu, 14 Sep 2023 11:02:15 +0100 Date: Thu, 14 Sep 2023 11:02:15 +0100 From: "Russell King (Oracle)" To: James Morse Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev, x86@kernel.org, Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com Subject: Re: [RFC PATCH v2 07/35] x86: intel_epb: Don't rely on link order Message-ID: References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-8-james.morse@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913163823.7880-8-james.morse@arm.com> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 14 Sep 2023 03:02:31 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Wed, Sep 13, 2023 at 04:37:55PM +0000, James Morse wrote: > intel_epb_init() is called as a subsys_initcall() to register cpuhp > callbacks. The callbacks make use of get_cpu_device() which will return > NULL unless register_cpu() has been called. register_cpu() is called > from topology_init(), which is also a subsys_initcall(). > > This is fragile. Moving the register_cpu() to a different > subsys_initcall() leads to a NULL derefernce during boot. > > Make intel_epb_init() a late_initcall(), user-space can't provide a > policy before this point anyway. > > Signed-off-by: James Morse I think someone knowledgeable from x86 land needs to ack/review this. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!