Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp881974pxb; Wed, 27 Oct 2021 14:23:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfNlcM4m7VuzmK22iNtoJkX4Vl98wWo9EUEgAtxIQWEgDuvSuDIjcabL9Vjv1NcIXUh3u8 X-Received: by 2002:a17:906:2887:: with SMTP id o7mr26830ejd.425.1635369830987; Wed, 27 Oct 2021 14:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369830; cv=none; d=google.com; s=arc-20160816; b=TwCwoE67R/c6w1LOYMNPtshChhlh+Bir32mQYKI5EGit7i89Nk4jcfdbCQ5J2Lku22 /u02BTEWJVuxnMEHjxKRxkOfcPfhiIrh0w5pzRqLTMHtmJOfHSxQAPSxb0SLJ52VxcJi VGPQe4Q5C81p0RltapTuGPNNpRcMRq5XSPS1klx2RQQdKgDwZhMB62Wv/gTmtJv4sWZF cm5xSi0uWh89EB9m/ngNIRbZCPKaI3p7POcKAAz5e2B8gNt6KdRNoHEkTbWRNxegjhTk B/Nv8Z4oL9Kb6DkK9LwYwezeOk6w/qNMvUIfv0ouZGlJ97xdCR3hwzLsZZLUx5RxoXAA or3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HjThH1ZldjNjaJQ/4bXknTWmjMnLD9uhB9gCmJ8WJ4o=; b=0ADQt4GK3rgTePQPhEzg9M0p8ml3zK0Z9z9k2orXQnwotnQ5Jy9XP7SLKdpeMlmq2q 2gVZ1KJ8vB9f6mo/Kevn6S6kZjkX0EbdaR0hgpC21FXM8VAXkIAPtDgmwlMT+9ruzzvJ XB/yqFfXMcx63lL3Ni/8A2Vl2qY0RFJAQhbrbiSHhVmJVJo81XDCEceWwNdQ73NRUXhx p5dYKE8c1NUA4D+vP2ZEPr5YOOgKLDWOhSoRCRuo3QdTPV43oExgqv0jqXtzO8bozGM9 VWi8wP5TxhyrC3X+oBd9LrAt9cCU52UbNeZa5M8Y7E/es5+3zuOV9fBjRgbSnpWqN7Hv w9Bg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq5si1316976edb.617.2021.10.27.14.23.25; Wed, 27 Oct 2021 14:23:50 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241534AbhJ0KsF (ORCPT + 97 others); Wed, 27 Oct 2021 06:48:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:19097 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241535AbhJ0KsA (ORCPT ); Wed, 27 Oct 2021 06:48:00 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="230079956" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="230079956" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 03:45:26 -0700 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="597316964" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 03:45:20 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mfgQW-001RFx-N2; Wed, 27 Oct 2021 13:45:00 +0300 Date: Wed, 27 Oct 2021 13:45:00 +0300 From: Andy Shevchenko To: Chen Yu Cc: linux-acpi@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Ard Biesheuvel , Len Brown , Ashok Raj , Mike Rapoport , Aubrey Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2021 at 03:08:05PM +0800, Chen Yu wrote: > Platform Firmware Runtime Update(PFRU) Telemetry Service is part of RoT > (Root of Trust), which allows PFRU handler and other PFRU drivers to > produce telemetry data to upper layer OS consumer at runtime. > > The linux provides interfaces for the user to query the parameters of Linux kernel > telemetry data, and the user could read out the telemetry data > accordingly. > > The corresponding userspace tool and man page will be introduced at > tools/power/acpi/pfru. ... > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include + blank line? > +#include ... > +static DEFINE_IDA(pfru_log_ida); Do you need any mutex against operations on IDA? (I don't remember if it incorporates any synchronization primitives). ... Looking into the code I have feelings of d?j?-vu. Has it really had nothing in common with the previous patch? ... > +static int valid_log_level(int level) > +{ > + return level == LOG_ERR || level == LOG_WARN || > + level == LOG_INFO || level == LOG_VERB; Indentation. > +} ... This ordering in ->probe() is not okay: devm_*() non-devm_*() devm_*() non-devm_*() One mustn't interleave these. The allowed are: Case 1: non-devm_*() Case 2: devm_*() Case 3: devm_*() non-devm_*() Otherwise in ->remove() you have wrong release ordering which may hide subtle bugs. Above comment is applicable to the other patch as well as some comments from there are applicable here. -- With Best Regards, Andy Shevchenko