Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284679

Re: [PATCH] tpm_crb: Use the common ACPI definition of struct acpi_tpm2

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tpm_crb: Use the common ACPI definition of struct acpi_tpm2
Date 2015-12-06 02:30 +0100
Message-ID <qCwjf-dD-1@gated-at.bofh.it> (permalink)
References <qBl6y-2Xu-7@gated-at.bofh.it> <qBxr3-2rt-3@gated-at.bofh.it> <qBFyi-80z-21@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Thu, Dec 03, 2015 at 10:02:17AM -0700, Jason Gunthorpe wrote:
> On Thu, Dec 03, 2015 at 10:27:53AM +0200, Jarkko Sakkinen wrote:
> > On Wed, Dec 02, 2015 at 12:19:00PM -0700, Jason Gunthorpe wrote:
> > > include/acpi/actbl2.h is the proper place for these definitions
> > > and the needed TPM2 ones have been there since
> > > commit 413d4a6defe0 ("ACPICA: Update TPM2 ACPI table")
> > > 
> > > This also drops the le32_to_cpu for members of this table,
> > > consistent with other ACPI stuff.
> > 
> > Why le32_to_cpu() is not needed?
> 
> Why is it needed?
> 
> None of the fields are marked le32 in the struct and no other ACPI
> thing I could find swaps.
> 
> If swapping is needed then the struct fields must be declared as 'le'

I'm just puzzling with three things:

1. Does it do conversion to the CPU format internally if you use the
   tables in a big-endian environment?
2. Isn't that code import from ACPICA? That would explains why it does
   not have tagged fields.
3. Could the reason be for such conversions not widely applied in the
   kernel that ACPI has been previously mostly used only in the PC/x86
   ecosystem?

AFAIK ACPI exist also for ARM64 servers, which can be a big-endian
environment.

> Jason

/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] tpm_crb: Use the common ACPI definition of struct acpi_tpm2 Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-12-02 20:20 +0100
  Re: [PATCH] tpm_crb: Use the common ACPI definition of struct  acpi_tpm2 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-12-03 09:30 +0100
    Re: [PATCH] tpm_crb: Use the common ACPI definition of struct  acpi_tpm2 Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-12-03 18:10 +0100
      Re: [PATCH] tpm_crb: Use the common ACPI definition of struct  acpi_tpm2 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-12-06 02:30 +0100

csiph-web