Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755161AbcLSQWN (ORCPT ); Mon, 19 Dec 2016 11:22:13 -0500 Received: from quartz.orcorp.ca ([184.70.90.242]:58959 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755459AbcLSQWM (ORCPT ); Mon, 19 Dec 2016 11:22:12 -0500 Date: Mon, 19 Dec 2016 09:22:01 -0700 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: Jiandi An , peterhuewe@gmx.de, tpmdd@selhorst.net, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() Message-ID: <20161219162201.GA10988@obsidianresearch.com> References: <1482121253-924-1-git-send-email-anjiandi@codeaurora.org> <20161219135624.2e7okpswnbqbvic7@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161219135624.2e7okpswnbqbvic7@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.156 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 23 On Mon, Dec 19, 2016 at 03:56:24PM +0200, Jarkko Sakkinen wrote: > 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 > > 1. Is there a platform in existence where this change fixes a problem? > 2. What is difference between "memory" and "address space" conceptually? > Just wondering why 32-bit stuff is "memory" and 64-bit stuff is > "address space". Could there be a one function that would work both > for 32-bit and 64-bit cases? > > Yeah, I do not know this API too well. That's why I'm asking. If this is the right thing it also needs to be done in tpm_tis. I will point out that this driver only works with memory, so using a generic decoder without checking for IO maps may not be correct.. Jason