Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp701261ybv; Sat, 22 Feb 2020 12:49:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxPvTnNkfdhewou4aGcenOCmcuXNdXVLjC9bn9hFdxCQ0qxKat+DfNL0Bk2ABhTj/Wgs7fP X-Received: by 2002:aca:52d0:: with SMTP id g199mr6969781oib.153.1582404577584; Sat, 22 Feb 2020 12:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582404577; cv=none; d=google.com; s=arc-20160816; b=o8QG5UWk+No4inDP65q+9ynE8gG/YeQBKY/dYA4xOpoootQpo6Ft0dCZx2SOln+WXw FeVHDtTYG2qtc6Lk+SC4AtrcNHei9YXRc1sqO4yzM4MSmMUbq8xBTgY2WfQ+v4jpFBQi 3ysHBsHzfbHn9/uj+7u4J3AC2jXW/PqSKfVx5YGd0/VaGV4B67NOcHm6ipB3EKKT5OTp vk96re6UE9dlc4wuffZV0QrmO/wjtoCbfj+dAVFfeFtSGsdUg1XvyaUEymNnS+966PmI vcibJSxlK+bB6sxjPDEr6DpJIhz1zvo8Q30YUmT1utAssYjci8QvEx8RC6TIABPUngTg 48lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Tyttl7wAFzUY9uhKyioctY+cw2c/9OPGZ4FJT7jjtXU=; b=MlKNeMsMLLy+d630Hg3VvpRvNPE2hZW1pc6oa1nJAadFoZYfkLRyP/ilMnj9uVoWtg GLzj0rrt61+4utHB7pzq7/o42eVOER8HNhI+Yuc/bfgxqgH9fHb4mTkElnx3tVhInkXK aTq8Wp+UXJ2NNOHUQD7sxVI6vmVCFm3iLMAfuo5izMeC41F2wa3ef6pEHzNM1ViA4hEA crpDeH9cA7dyAQtsxfiXTI5IpGPbGIW6qIYSZXrpswOGQMutsZ0C/I8N6jHexrN6LehV QI/pkaTSFx7/cPAWEHFDSFewo8IQCmiZCcXNHJ9YzS8SVuF//2RmmO0iclwFjSUZuNou uGZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dT5BMyzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si2553225oij.175.2020.02.22.12.49.24; Sat, 22 Feb 2020 12:49:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dT5BMyzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgBVUtV (ORCPT + 99 others); Sat, 22 Feb 2020 15:49:21 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:45071 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgBVUtV (ORCPT ); Sat, 22 Feb 2020 15:49:21 -0500 Received: by mail-io1-f65.google.com with SMTP id i11so6193712ioi.12; Sat, 22 Feb 2020 12:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Tyttl7wAFzUY9uhKyioctY+cw2c/9OPGZ4FJT7jjtXU=; b=dT5BMyzCTyJJp+nvhdoFwyoGOluAnmLzaeCodeI+VdJln29TcnaayygUaf+h0pkBl7 JZfFCRFxzH7ApVzgz1n/a2cIDwWSvkSVoLq+HhQt2+eSxm4xatSiGflSKVFGaXyXBGH8 XtIUyiHgAZXfAJnN3OPIAEhPD4sRNoS7/3Kg+75q7KjLSQMZUz2jUuXzd9P1bGNXmg6r 9k5YKA2OkKx2buLFUqyzwwSYrULTYuZ/N9VSxpb3Kt6Dbj1DHNSvHWI1PlprZUU5p1Uv dLJftJv17Yoz0Vdl4PYo/wBIHn07rnGPtr+ZGA0Tl4pcYIpv8Luju0N7ulfYrcwIfHWa 8VHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Tyttl7wAFzUY9uhKyioctY+cw2c/9OPGZ4FJT7jjtXU=; b=SQ2HovfrsfQnbnbS0+oJ6mvg2HPBjQYGqVJ+uDX9EJpmbRRW/3oeWHVcAftbzuEVsE 7AlNZJYyCjSggj0s+ROZUUJyxaHwWcE/xMxQRpLHQMRe2q1msVwgmWR6/B12wPJgT994 hLkR+6Xe1RipfaTl0vcx86wAfeccYjnDv5g/c3gzAVBSu3Amc2Wj6xuN2MeAFiWxnJr4 KYf6nv/31jJtoVXgmbJHKhzQqmW44EXCTkjENUHULqcr8KY3U0EhxLbE3Q7miLhsZ7l8 IJpDLv4h6N8vEcs0tqNYFY62hv/4oYPD6FEh36KW5xKi7fbltQbwutDtulZXxbQBbdAp vftA== X-Gm-Message-State: APjAAAVBLqlitTjai47hGp9Y/uhmRhKSUooEkSuJptp3moVykNuMVeaF tREa/f4v/Ul6p1m3nHFv1QeeF5g0bkyLez2LMPA= X-Received: by 2002:a05:6638:1e6:: with SMTP id t6mr40033964jaq.118.1582404560631; Sat, 22 Feb 2020 12:49:20 -0800 (PST) MIME-Version: 1.0 References: <1bdbac08-86f8-2a57-2b0d-8cd2beb2a1c0@roeck-us.net> <85356d1a-f90d-e94d-16eb-1071d4e94753@roeck-us.net> In-Reply-To: <85356d1a-f90d-e94d-16eb-1071d4e94753@roeck-us.net> From: Martin Volf Date: Sat, 22 Feb 2020 21:49:09 +0100 Message-ID: Subject: Re: [regression] nct6775 does not load in 5.4 and 5.5, bisected to b84398d6d7f90080 To: Guenter Roeck Cc: Mika Westerberg , Jean Delvare , Wolfram Sang , linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Sat, Feb 22, 2020 at 8:05 PM Guenter Roeck wrote: > On 2/22/20 9:55 AM, Martin Volf wrote: > > On Sat, Feb 22, 2020 at 4:41 PM Guenter Roeck wrote: > >> On 2/22/20 3:13 AM, Martin Volf wrote: > >>> hardware monitoring sensors NCT6796D on my Asus PRIME Z390M-PLUS > >>> motherboard with Intel i7-9700 CPU don't work with 5.4 and newer linux > >>> kernels, the driver nct6775 does not load. > >>> > >>> It is working OK in version 5.3. I have used almost all released stable > >>> versions from 5.3.8 to 5.3.16; I didn't try older kernels. > > ... > >> My wild guess would be that the i801 driver is a bit aggressive with > >> reserving memory spaces, but I don't immediately see what it does > >> differently in that regard after the offending patch. Does it work > >> if you unload the i2c_i801 driver first ? > > > > Yes, after unloading i2c_i801, the nct6775 works. ... > > This is diff of /proc/ioports in 5.3.18 with loaded nct6775 and in > > 5.4.21 without: > > > > --- ioports-5.3.18 > > +++ ioports-5.4.21 > > @@ -2,6 +2,7 @@ > > 0000-001f : dma1 > > 0020-0021 : pic1 > > 002e-0031 : iTCO_wdt > > + 002e-0031 : iTCO_wdt > > 0040-0043 : timer0 > > 0050-0053 : timer1 ... > > So 0x2e is the resource the two drivers are fighting for. ... > Yes, and it should not do that, since the range can be used to access > different segments of the same chip from multiple drivers. This region > should only be reserved temporarily, using request_muxed_region() when > needed and release_region() after the access is complete. Either case, > I don't immediately see why that region would be interesting for the > iTCO watchdog driver. > > Can you add some debugging into the i801 driver to see what memory regions > it reserves, and how it gets to reserve 0x2e..0x31 ? That range really > doesn't make any sense to me. in the function i801_add_tco() in drivers/i2c/busses/i2c-i801.c (line 1601 in 5.4.21), there is this code: /* * Power Management registers. */ devfn = PCI_DEVFN(PCI_SLOT(pci_dev->devfn), 2); pci_bus_read_config_dword(pci_dev->bus, devfn, ACPIBASE, &base_addr); res = &tco_res[ICH_RES_IO_SMI]; res->start = (base_addr & ~1) + ACPIBASE_SMI_OFF; res->end = res->start + 3; res->flags = IORESOURCE_IO; base_addr is 0xffffffff after pci_bus_read_config_dword() call. ACPIBASE_SMI_OFF is 0x030, therefore res->start is 0x2e. Not that I understand even a bit of this... Martin