All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	markgross@kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] platform/x86: ISST : Check major minor version
Date: Fri, 29 Sep 2023 17:33:01 +0300 (EEST)	[thread overview]
Message-ID: <9d9d1c7e-482b-8817-a09b-9ce364a74cf@linux.intel.com> (raw)
In-Reply-To: <f82fcfc9-eb41-56cb-93e1-abf9cf7413@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2684 bytes --]

Also the shortlog could be improved, IMO. E.g., Ignore minor version 
mismatch.

-- 
 i.

On Fri, 29 Sep 2023, Ilpo Järvinen wrote:

> On Mon, 25 Sep 2023, Srinivas Pandruvada wrote:
> 
> > Parse major and minor version number from the version field. If there
> > is a mismatch for major version, exit from further processing for that
> > domain.
> > 
> > If there is mismatch in minor version, driver continue to process with
> > an error message.
> 
> This sentence sounds odd.
> 
> > Minor version change doesn't change offsets and bit
> > structures of TPMI fields.
> > 
> > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > ---
> >  .../x86/intel/speed_select_if/isst_tpmi_core.c   | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> > index 63faa2ea8327..37f17e229419 100644
> > --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> > +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> > @@ -30,7 +30,8 @@
> >  #include "isst_if_common.h"
> >  
> >  /* Supported SST hardware version by this driver */
> > -#define ISST_HEADER_VERSION		1
> > +#define ISST_MAJOR_VERSION	0
> > +#define ISST_MINOR_VERSION	1
> >  
> >  /*
> >   * Used to indicate if value read from MMIO needs to get multiplied
> > @@ -352,12 +353,19 @@ static int sst_main(struct auxiliary_device *auxdev, struct tpmi_per_power_domai
> >  	pd_info->sst_header.cp_offset *= 8;
> >  	pd_info->sst_header.pp_offset *= 8;
> >  
> > -	if (pd_info->sst_header.interface_version != ISST_HEADER_VERSION) {
> > -		dev_err(&auxdev->dev, "SST: Unsupported version:%x\n",
> > -			pd_info->sst_header.interface_version);
> > +	if (pd_info->sst_header.interface_version == TPMI_VERSION_INVALID)
> > +		return -ENODEV;
> > +
> > +	if (TPMI_MAJOR_VERSION(pd_info->sst_header.interface_version) != ISST_MAJOR_VERSION) {
> > +		dev_err(&auxdev->dev, "SST: Unsupported major version:%lx\n",
> > +			TPMI_MAJOR_VERSION(pd_info->sst_header.interface_version));
> >  		return -ENODEV;
> >  	}
> >  
> > +	if (TPMI_MINOR_VERSION(pd_info->sst_header.interface_version) != ISST_MINOR_VERSION)
> > +		dev_err(&auxdev->dev, "SST: Ignore: Unsupported minor version:%lx\n",
> > +			TPMI_MINOR_VERSION(pd_info->sst_header.interface_version));
> 
> Why is this dev_err(), wouldn't dev_info() be more appropriate since 
> after this patch it's no longer an error?
> 
> > +
> >  	/* Read SST CP Header */
> >  	*((u64 *)&pd_info->cp_header) = readq(pd_info->sst_base + pd_info->sst_header.cp_offset);
> >  
> > 
> 
> 

  reply	other threads:[~2023-09-29 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25 19:43 [PATCH 0/3] TPMI feature major/minor version check Srinivas Pandruvada
2023-09-25 19:43 ` [PATCH 1/3] platform/x86/intel/tpmi: Add defines to get version information Srinivas Pandruvada
2023-09-25 19:43 ` [PATCH 2/3] platform/x86: ISST : Check major minor version Srinivas Pandruvada
2023-09-29 14:28   ` Ilpo Järvinen
2023-09-29 14:33     ` Ilpo Järvinen [this message]
2023-09-30 12:45       ` srinivas pandruvada
2023-09-30 12:42     ` srinivas pandruvada
2023-10-02 13:49       ` Ilpo Järvinen
2023-10-02 13:54         ` srinivas pandruvada
2023-10-02 14:24           ` Ilpo Järvinen
2023-10-02 14:56             ` srinivas pandruvada
2023-09-25 19:43 ` [PATCH 3/3] platform/x86/intel-uncore-freq: " Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d9d1c7e-482b-8817-a09b-9ce364a74cf@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.