Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp185750pxu; Thu, 10 Dec 2020 23:00:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvG3c4M9Cf3l5Hfe7a2OMlMKBLPfeemLmRyioawKI2c5HlCemJY1VwH61KF/X13kKDCDE8 X-Received: by 2002:aa7:dbca:: with SMTP id v10mr10497710edt.219.1607670015462; Thu, 10 Dec 2020 23:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607670015; cv=none; d=google.com; s=arc-20160816; b=XSgqOPc7BTOtIgswf11sebJ9FRadef33q1srjTg7DV7jvvLfpcIEE3S4JeaUGK5XZw umnnV6VX92s3N33pLRd2Lkg6jgbEIxeuxwz+6B6q1cazAuYIrtwUXr7ikpRaar7FsP9z +kana2cZ7zB5dWQlsbXF110azDJE/BwXuf9Tr/HtF1miupLrMVa7qs87PPr/jSx0CKuo oa5uJAnFSiG0MdU1qeepRxqgLnkLfX8X5+toekCLrnCzg/+65CXWJXDecaKIMudak2Uy P4H/NmuMd96kQsvvKqyOinOg0gSSTM/krvvBK8unhNrZNXdBMiM7KnyK0oEhpVrRHsaz 5BSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=itpmwPrqTrzSPjPBBFAjLv1S9RoiKhYef/+NiayvjBc=; b=HEkK7GVoyEWA03SmsIbbpFnmpN8omznhNrhYnT9gBCC7gdVpPdD6OFUQEdbs3FBmJU ThqbDIFu5SlVYdJDVVP+kfK2bzIBQLNZsedS1tBDClrZThDfbRQRWG447hhfMZ8UptIi kEE+GTaOAmTcEb9v/4v4/mFJYjKzcTGx0lHpw3vR1BlcYg+j4RbIbO6MHcvuVRiGsqUk aFfsIkYof8z3dDuAVOeZXfaNk7VZAHyd+twq82lUMsoDSue+8PBv9Mbe5bRdzHUM2ymi P65dcYWhiLwftq0NDbOLhliEa8ewK00W0n6B08MdosPL0v77ZLHg2/CDKARYXbEAdLQQ vAmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si4187420edb.419.2020.12.10.22.59.50; Thu, 10 Dec 2020 23:00:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389538AbgLJPDm (ORCPT + 99 others); Thu, 10 Dec 2020 10:03:42 -0500 Received: from foss.arm.com ([217.140.110.172]:47064 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389430AbgLJPDM (ORCPT ); Thu, 10 Dec 2020 10:03:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BCD191FB; Thu, 10 Dec 2020 07:02:25 -0800 (PST) Received: from localhost (unknown [10.1.198.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F4363F68F; Thu, 10 Dec 2020 07:02:25 -0800 (PST) Date: Thu, 10 Dec 2020 15:02:23 +0000 From: Ionela Voinescu To: "Rafael J. Wysocki" Cc: Mian Yousaf Kaukab , "Rafael J. Wysocki" , Len Brown , Viresh Kumar , ACPI Devel Maling List , Linux Kernel Mailing List , Linux PM , Mian Yousaf Kaukab , Petr Cervinka Subject: Re: [PATCH 1/2] acpi: cppc: add cpufreq device Message-ID: <20201210150223.GA28824@arm.com> References: <20201210142139.20490-1-yousaf.kaukab@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, On Thursday 10 Dec 2020 at 15:32:09 (+0100), Rafael J. Wysocki wrote: > On Thu, Dec 10, 2020 at 3:23 PM Mian Yousaf Kaukab > wrote: > > > > From: Mian Yousaf Kaukab > > > > Since commit 28f06f770454 ("cppc_cpufreq: replace per-cpu structures with > > lists"), cppc-cpufreq driver doesn't check availability of PSD data before > > registering with cpufreq core. As a result on a ThunderX2 platform when > > CPPC is disabled from BIOS, kernel log is spammed with following messages: > > > > [ 180.974166] CPPC Cpufreq: Error in acquiring _CPC/_PSD data for CPUxx > > > > acpi_cppc_processor_probe() never succeed in this case because > > acpi_evaluate_object_typed("_CPC") always returns AE_NOT_FOUND. When > > cpufreq core calls cppc_cpufreq_cpu_init(), driver fails to obtain PSD data > > and print error messages. > > > > Convert cppc-cpufreq driver to a platform driver (done in a separate patch) > > and add cppc-cpufreq device when acpi_cppc_processor_probe() succeeds. > > Honestly, I prefer to drop 28f06f770454 (along with its follower) > instead of making this change. > > > Fixes: 28f06f770454 ("cppc_cpufreq: replace per-cpu structures with lists") > Sorry for introducing this, I though it was enough to bail out of cpu init if _CPC entries are not present. I'll defer to Rafael to decide whether to drop the patches or accept alternative fixes, but I believe the rework of the data structures and initialisation is useful. As alternative fix, would it be okay to introduce a check function to verify for !cpc_ptr, to be called in cppc_cpufreq_init()? In that case the driver would not be registered if this check fails. Thanks, Ionela. > Thanks!