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: 7766931 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5427D9F7B5 for ; Fri, 4 Dec 2015 09:10:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86D6A2053C for ; Fri, 4 Dec 2015 09:10:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 84E1D20511 for ; Fri, 4 Dec 2015 09:10:26 +0000 (UTC) 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-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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, HK_RANDOM_ENVFROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > > 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; }