Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538Ab0GARUl (ORCPT ); Thu, 1 Jul 2010 13:20:41 -0400 Received: from mga01.intel.com ([192.55.52.88]:14727 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422Ab0GARUk (ORCPT ); Thu, 1 Jul 2010 13:20:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,520,1272870000"; d="scan'208";a="581911154" Message-ID: <4C2CCE67.6070600@intel.com> Date: Thu, 01 Jul 2010 10:20:39 -0700 From: Dan Williams User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: "Woodhouse, David" CC: Chris Li , linux-kernel Subject: Re: BUG in drivers/dma/ioat/dma_v2.c:314 References: <4C29420D.2010406@intel.com> <4C2A8879.8010000@intel.com> <4C2AC55E.3040303@intel.com> <1277923422.16256.8.camel@localhost> <4C2B9DAC.1030806@intel.com> <1277928125.18854.0.camel@localhost> <4C2BBACF.3080405@intel.com> <1277965264.18854.16.camel@localhost> <4C2C3B07.7050200@intel.com> <1277968336.4945.3.camel@localhost> <4C2C4319.6090906@intel.com> <1277972137.12558.2.camel@localhost> In-Reply-To: <1277972137.12558.2.camel@localhost> Content-Type: multipart/mixed; boundary="------------060401010202070209030600" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7269 Lines: 124 This is a multi-part message in MIME format. --------------060401010202070209030600 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/1/2010 1:15 AM, Woodhouse, David wrote: > On Thu, 2010-07-01 at 08:26 +0100, Williams, Dan J wrote: >> On 7/1/2010 12:12 AM, Woodhouse, David wrote: >>> On Thu, 2010-07-01 at 07:51 +0100, Williams, Dan J wrote: >>>> This version of the device only exists on the 5400 chipset and always >>>> has its own iommu, but since other platforms get the DMAR entry right I >>>> think this hammer is too big? Wouldn't this break VT-d operation on >>>> non-busted platforms? >>> >>> That just means we have to get the quirk right. Does 'this version' of >>> the device have its own PCI ID? We can always fall back to checking the >>> ID of the device at 0000:00:00.0 to check which chipset we're on. >>> >> >> PCI_DEVICE_ID_INTEL_IOAT_SNB only exists on this chipset > > Something like this, then? > Thanks David! Chris, attached is a combined patch with David's catch for the VT-d misconfiguration, and some code to more gracefully handle this init failure in the driver. Can you see if this resolves the problem? (remove the prior patches I have sent). Thanks, Dan --------------060401010202070209030600 Content-Type: text/plain; name="ioat-catch-broken-vtd.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ioat-catch-broken-vtd.patch" ZGlmZiAtLWdpdCBhL2RyaXZlcnMvZG1hL2lvYXQvZG1hLmggYi9kcml2ZXJzL2RtYS9pb2F0 L2RtYS5oCmluZGV4IDZkM2E3M2IuLjUyMTZjOGEgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvZG1h L2lvYXQvZG1hLmgKKysrIGIvZHJpdmVycy9kbWEvaW9hdC9kbWEuaApAQCAtOTcsNiArOTcs NyBAQCBzdHJ1Y3QgaW9hdF9jaGFuX2NvbW1vbiB7CiAJI2RlZmluZSBJT0FUX1JFU0VUX1BF TkRJTkcgMgogCSNkZWZpbmUgSU9BVF9LT0JKX0lOSVRfRkFJTCAzCiAJI2RlZmluZSBJT0FU X1JFU0hBUEVfUEVORElORyA0CisJI2RlZmluZSBJT0FUX1JVTiA1CiAJc3RydWN0IHRpbWVy X2xpc3QgdGltZXI7CiAJI2RlZmluZSBDT01QTEVUSU9OX1RJTUVPVVQgbXNlY3NfdG9famlm ZmllcygxMDApCiAJI2RlZmluZSBJRExFX1RJTUVPVVQgbXNlY3NfdG9famlmZmllcygyMDAw KQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9kbWEvaW9hdC9kbWFfdjIuYyBiL2RyaXZlcnMvZG1h L2lvYXQvZG1hX3YyLmMKaW5k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l0IG5lZWRzIG5vCisJCQkgICB0cmFuc2xh dGlvbi4uLiAqLworCQkJaWYgKGRldi0+dmVuZG9yID09IFBDSV9WRU5ET1JfSURfSU5URUwg JiYKKwkJCSAgICBkZXYtPmRldmljZSA9PSBQQ0lfREVWSUNFX0lEX0lOVEVMX0lPQVRfU05C KSB7CisJCQkJV0FSTl9UQUlOVF9PTkNFKDEsIFRBSU5UX0ZJUk1XQVJFX1dPUktBUk9VTkQs CisJCQkJCQkiQklPUyB3cm9uZ2x5IGluY2x1ZGVkIEkvT0FUIGRldmljZSB1bmRlciBjYXRj aC1hbGwgVlQtZCB1bml0XG4iKTsKKwkJCQlyZXR1cm4gTlVMTDsKKwkJCX0KIAkJCXJldHVy biBkbWFydTsKKwkJfQogCiAJCWlmIChkbWFyX3BjaV9kZXZpY2VfbWF0Y2goZG1hcnUtPmRl dmljZXMsCiAJCQkJCSAgZG1hcnUtPmRldmljZXNfY250LCBkZXYpKQo= --------------060401010202070209030600-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/