From patchwork Fri Dec 4 09:10:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 552621 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0172214029C for ; Fri, 4 Dec 2015 20:10:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1a4mNl-0002Ay-43; Fri, 04 Dec 2015 09:10:25 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1a4mNk-0002Ar-At for tpmdd-devel@lists.sourceforge.net; Fri, 04 Dec 2015 09:10:24 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of ts.fujitsu.com designates 80.70.172.49 as permitted sender) client-ip=80.70.172.49; envelope-from=martin.wilck@ts.fujitsu.com; helo=dgate10.ts.fujitsu.com; Received: from dgate10.ts.fujitsu.com ([80.70.172.49]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1a4mNj-00015y-5n for tpmdd-devel@lists.sourceforge.net; Fri, 04 Dec 2015 09:10:24 +0000 X-SBRSScore: None Received: from abgze77e.fsc.net ([172.25.138.143]) by dgate10u.abg.fsc.net with ESMTP/TLS/RC4-MD5; 04 Dec 2015 10:10:16 +0100 Received: from ABGEX74E.FSC.NET ([172.25.138.141]) by abgze77e.FSC.NET ([172.25.138.143]) with mapi; Fri, 4 Dec 2015 10:10:15 +0100 From: "Wilck, Martin" To: Jason Gunthorpe Date: Fri, 4 Dec 2015 10:10:15 +0100 Thread-Topic: [tpmdd-devel] [PATCH v2 0/3] tpm_tis: Clean up force module parameter Thread-Index: AdEuc5bw++1HTqlfT3WxIMCav/fFQg== Message-ID: References: <1448996309-15220-1-git-send-email-jgunthorpe@obsidianresearch.com> <20151201213351.GC5071@intel.com> <20151202182726.GB30972@obsidianresearch.com> <20151202191155.GA2832@obsidianresearch.com> <20151203170041.GA32175@obsidianresearch.com> In-Reply-To: <20151203170041.GA32175@obsidianresearch.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US MIME-Version: 1.0 X-Spam-Score: -1.1 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.5 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1a4mNj-00015y-5n Cc: Kleine-K??nig , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , Uwe Subject: Re: [tpmdd-devel] [PATCH v2 0/3] tpm_tis: Clean up force module parameter X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net > > ACPI defines a mem resource corresponding to the standard TIS memory > > area on my system, and it used to be detected fine with Jarkko's patch. > > Somehow your latest changes broke it, not sure why. > > Are you certain? Based on what you sent me, that output is only > possible if there is no mem resource. > > With the prior arrangement no mem resource means the x86 default > address is used, which is the only way I can see how your system > works. The following simple change fixes the ACPI probing after applying your latest series. The must have been another ACPI resource that you were erroneously using as mem resource. The IS_ERR change() didn't fix it. I think it's not needed, although it probably can't hurt. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index a1898c8..4c65a7d 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -954,7 +954,8 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data) if (acpi_dev_resource_interrupt(ares, 0, &res)) tpm_info->irq = res.start; - acpi_dev_resource_memory(ares, &tpm_info->res); + else if (acpi_dev_resource_memory(ares, &res)) + memcpy(&tpm_info->res, &res, sizeof(res)); return 1; }