public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: linux-acpi@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>, Len Brown <lenb@kernel.org>,
	Ashok Raj <ashok.raj@intel.com>, Mike Rapoport <rppt@kernel.org>,
	Aubrey Li <aubrey.li@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver
Date: Mon, 1 Nov 2021 21:14:34 +0800	[thread overview]
Message-ID: <20211101131434.GA32880@chenyu5-mobl1> (raw)
In-Reply-To: <YX/NwEdw26wzKFvQ@smile.fi.intel.com>

On Mon, Nov 01, 2021 at 01:21:36PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 01, 2021 at 05:33:20PM +0800, Chen Yu wrote:
> > On Wed, Oct 27, 2021 at 01:20:33PM +0300, Andy Shevchenko wrote:
> > > On Wed, Oct 27, 2021 at 03:07:51PM +0800, Chen Yu wrote:
> 
> ...
> 
> > > > +	guid_t *image_type_id = &img_hdr->image_type_id;
> > > 
> > > efi_guid_t ?
> > >
> > efi_guid_t is a 32-bit aligned guid_t, which is for the case when
> > efi_guid_t* arguments are 32-bit aligned. And it is for 32-bit ARM.
> > Since this code injection is only for 64-bit, the guid is not required
> > to be strictly 32-bit aligned I suppose?
> 
> But the type of that member may not be guid_t. So, I expect not to see guid_t
> at all here or as a internal member with the export/import GUID API in place.
>
> See, for example
> d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers")
>
8b03aa0e0e5a ("libnvdimm/labels: Add type-guid helpers") I suppose. Do you
mean, since the label is not delcared as uuid type, then need to treat the
data region as a uuid. But it is actually not a formal 'uuid' type, so uuid_t
is not applicable here. And this also applys to the case in this patch?
> ...
> 
> > > > +	ret = guid_parse(PFRU_UUID, &pfru_dev->uuid);
> 
> > > > +	ret = guid_parse(PFRU_CODE_INJ_UUID, &pfru_dev->code_uuid);
> 
> > > > +	ret = guid_parse(PFRU_DRV_UPDATE_UUID, &pfru_dev->drv_uuid);
> 
> > > Why do you need to keep zillions of copies of the data which seems
> > > is not going to be changed? Three global variables should be enough,
> > > no?
> > >
> > The guid information is embedded in each pfru_dev and only calculated
> > once during probe. I thought people try to avoid using global variables
> > if possible?
> 
> Use your common sense. You might have a lot of data duplication,
> and this data is definitely not something that needs any kind of
> serialization / personification / etc.
> 
Ok, I'll switch to global variables in next version.

thanks,
Chenyu
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

  reply	other threads:[~2021-11-01 13:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  7:06 [PATCH v7 0/4] Introduce Platform Firmware Runtime Update and Telemetry drivers Chen Yu
2021-10-27  7:07 ` [PATCH v7 1/4] efi: Introduce EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER and corresponding structures Chen Yu
2021-10-27 10:00   ` Andy Shevchenko
2021-11-01 11:01     ` Chen Yu
2021-10-27  7:07 ` [PATCH v7 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Chen Yu
2021-10-27  7:22   ` Greg Kroah-Hartman
2021-11-01  7:54     ` Chen Yu
2021-10-27 10:20   ` Andy Shevchenko
2021-11-01  9:33     ` Chen Yu
2021-11-01 11:21       ` Andy Shevchenko
2021-11-01 13:14         ` Chen Yu [this message]
2021-11-01 13:16           ` Greg Kroah-Hartman
2021-11-01 14:08             ` Andy Shevchenko
2021-11-01 14:57               ` Chen Yu
2021-11-01 15:02                 ` Andy Shevchenko
2021-10-27  7:08 ` [PATCH v7 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry Chen Yu
2021-10-27 10:45   ` Andy Shevchenko
2021-11-01 10:16     ` Chen Yu
2021-11-01 11:23       ` Andy Shevchenko
2021-10-27  7:08 ` [PATCH v7 4/4] tools: Introduce power/acpi/pfru/pfru Chen Yu

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=20211101131434.GA32880@chenyu5-mobl1 \
    --to=yu.c.chen@intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=ardb@kernel.org \
    --cc=ashok.raj@intel.com \
    --cc=aubrey.li@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    /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