From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 792E2EDE99C for ; Thu, 14 Sep 2023 10:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237624AbjINKCW (ORCPT ); Thu, 14 Sep 2023 06:02:22 -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-arch@vger.kernel.org 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!