Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755921AbbLDJKk (ORCPT ); Fri, 4 Dec 2015 04:10:40 -0500 Received: from dgate10.ts.fujitsu.com ([80.70.172.49]:51010 "EHLO dgate10.ts.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755607AbbLDJKU (ORCPT ); Fri, 4 Dec 2015 04:10:20 -0500 DomainKey-Signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:Received:Received:From:To:CC:Date:Subject: Thread-Topic:Thread-Index:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:acceptlanguage: Content-Type:Content-Transfer-Encoding:MIME-Version; b=ef3oyEFWC61UNANlOipE4Oq0pJpgrO9fvI7g9RIfmVJRJimD7KE+VSjd 5BMWzy1MRJO7YYJo3x66XkD8lnMrHuIoQpJNBsx8RKc8G6EB4pW6/NliB sglfxcO0CDNSf1GyET/HOMmteepyHkf1BEUZwR6WNLy4QgctOXiue6mpo b+GGn83xj3hCbOQZq5CMrgkdvwpjnqGoJTgfPd2iOgV/2LDMrtUlX4+Sg 20qJ3ZaR2Nzfpr/nnXQsXtTJnX4Xj; X-SBRSScore: None From: "Wilck, Martin" To: Jason Gunthorpe CC: Jarkko Sakkinen , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , Uwe Kleine-K??nig Date: Fri, 4 Dec 2015 10:10:15 +0100 Subject: Re: [tpmdd-devel] [PATCH v2 0/3] tpm_tis: Clean up force module parameter 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 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tB49Ak10020760 Content-Length: 1393 Lines: 34 > > 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. 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; } ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?