From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: hdegoede@redhat.com, markgross@kernel.org,
srinivas.pandruvada@intel.com,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/9] platform/x86/intel/sdsi: Support different GUIDs
Date: Wed, 2 Nov 2022 12:44:34 +0200 [thread overview]
Message-ID: <Y2JKEjSridtRubSm@smile.fi.intel.com> (raw)
In-Reply-To: <20221101191023.4150315-4-david.e.box@linux.intel.com>
On Tue, Nov 01, 2022 at 12:10:17PM -0700, David E. Box wrote:
> Newer versions of Intel On Demand hardware may have an expanded list of
> registers to support new features. The register layout is identified by a
> unique GUID that's read during driver probe. Add support for handling
> different GUIDs and add support for current GUIDs [1].
> [1] https://github.com/intel/intel-sdsi/blob/master/os-interface.rst
Link: tag?
...
> #define SDSI_MIN_SIZE_DWORDS 276
> -#define SDSI_SIZE_CONTROL 8
> #define SDSI_SIZE_MAILBOX 1024
> -#define SDSI_SIZE_REGS 72
> +#define SDSI_SIZE_REGS 80
> #define SDSI_SIZE_CMD sizeof(u64)
> +#define SDSI_SIZE_MAILBOX 1024
Why do you need this second time?
...
> +static int sdsi_get_layout(struct sdsi_priv *priv, struct disc_table *table)
> +{
> + switch (table->guid) {
> + case SDSI_GUID_V1:
> + priv->control_size = 8;
> + priv->registers_size = 72;
> + break;
> + case SDSI_GUID_V2:
> + priv->control_size = 16;
> + priv->registers_size = 80;
Maybe it makes sense to use previously defined constants here instead of magics?
> + break;
> + default:
> + dev_err(priv->dev, "Unrecognized GUID 0x%x\n", table->guid);
> + return -EINVAL;
> + }
> + return 0;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-11-02 10:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 19:10 [PATCH 0/9] Extend Intel On Demand (SDSi) support David E. Box
2022-11-01 19:10 ` [PATCH 1/9] platform/x86/intel/sdsi: Add Intel On Demand text David E. Box
2022-11-17 13:17 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 2/9] platform/x86/intel/sdsi: Hide attributes if hardware doesn't support David E. Box
2022-11-17 13:18 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 3/9] platform/x86/intel/sdsi: Support different GUIDs David E. Box
2022-11-02 10:44 ` Andy Shevchenko [this message]
2022-11-03 3:12 ` David E. Box
2022-11-17 13:30 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 4/9] platform/x86/intel/sdsi: Add meter certificate support David E. Box
2022-11-02 10:46 ` Andy Shevchenko
2022-11-03 3:13 ` David E. Box
2022-11-17 13:33 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 5/9] tools/arch/x86: intel_sdsi: Add support for reading state certificates David E. Box
2022-11-17 13:51 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 6/9] tools/arch/x86: intel_sdsi: Add Intel On Demand text David E. Box
2022-11-17 13:52 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 7/9] tools/arch/x86: intel_sdsi: Read more On Demand registers David E. Box
2022-11-17 13:52 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 8/9] tools/arch/x86: intel_sdsi: Add support for new GUID David E. Box
2022-11-17 13:55 ` Hans de Goede
2022-11-01 19:10 ` [PATCH 9/9] tools/arch/x86: intel_sdsi: Add support for reading meter certificates David E. Box
2022-11-17 13:58 ` Hans de Goede
2022-11-07 14:18 ` [PATCH 0/9] Extend Intel On Demand (SDSi) support Hans de Goede
2022-11-17 14:01 ` Hans de Goede
2022-11-17 16:00 ` David E. Box
2022-11-27 20:20 ` Pavel Machek
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=Y2JKEjSridtRubSm@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=david.e.box@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@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).