Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1550063
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() |
| Date | 2017-01-03 19:30 +0100 |
| Message-ID | <sVC0p-1Og-3@gated-at.bofh.it> (permalink) |
| References | <sPXKh-2Tw-7@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
On Sun, Dec 18, 2016 at 10:20:53PM -0600, Jiandi An wrote:
> crb_check_resource() in TPM CRB driver calls
> acpi_dev_resource_memory() which only handles 32-bit resources.
> Adding a call to acpi_dev_resource_address_space() in TPM CRB
> driver which handles 64-bit resources.
>
> Signed-off-by: Jiandi An <anjiandi@codeaurora.org>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
> ---
> drivers/char/tpm/tpm_crb.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index 717b6b4..86f355b 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -264,10 +264,12 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status)
> static int crb_check_resource(struct acpi_resource *ares, void *data)
> {
> struct resource *io_res = data;
> - struct resource res;
> + struct resource_win win;
> + struct resource *res = &(win.res);
>
> - if (acpi_dev_resource_memory(ares, &res)) {
> - *io_res = res;
> + if (acpi_dev_resource_memory(ares, res) ||
> + acpi_dev_resource_address_space(ares, &win)) {
> + *io_res = *res;
> io_res->name = NULL;
> }
>
> --
> Jiandi An
> Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
> Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jiandi An <anjiandi@codeaurora.org> - 2016-12-19 05:30 +0100
Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-19 15:00 +0100
Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-12-19 17:30 +0100
Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jiandi An <anjiandi@codeaurora.org> - 2016-12-20 07:20 +0100
Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-03 18:20 +0100
Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-03 19:30 +0100
Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-09 19:50 +0100
csiph-web