linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	"Borislav Petkov" <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Myron Stowe" <myron.stowe@redhat.com>,
	"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
	"Benoit Grégoire" <benoitg@coeus.ca>,
	"Hui Wang" <hui.wang@canonical.com>,
	"Kai-Heng Feng" <kai.heng.feng@canonical.com>,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	wse@tuxedocomputers.com
Subject: Re: [PATCH 3/3] x86/PCI: Preserve host bridge windows completely covered by E820
Date: Fri, 11 Mar 2022 08:52:31 +0100	[thread overview]
Message-ID: <03675c75-ee6f-5da3-099c-2b82a1865455@redhat.com> (raw)
In-Reply-To: <b41cfd4d-3f55-168a-e96c-cf2d11d50f28@redhat.com>

Hi Bjorn,

On 3/10/22 13:28, Hans de Goede wrote:
> Hi Bjorn,
> 
> On 3/9/22 19:15, Bjorn Helgaas wrote:
>> On Sat, Mar 05, 2022 at 11:37:23AM +0100, Hans de Goede wrote:
>>> On 3/4/22 16:46, Hans de Goede wrote:
>>>> On 3/4/22 16:32, Bjorn Helgaas wrote:
>>>>> On Fri, Mar 04, 2022 at 03:16:42PM +0100, Hans de Goede wrote:
>>>>>> On 3/4/22 04:51, Bjorn Helgaas wrote:
>>>>>>> From: Bjorn Helgaas <bhelgaas@google.com>
>>>>>>>
>>>>>>> Many folks have reported PCI devices not working.  It could affect any
>>>>>>> device, but most reports are for Thunderbolt controllers on Lenovo Yoga and
>>>>>>> Clevo Barebone laptops and the touchpad on Lenovo IdeaPads.
>>>>>>> ...
>>
>>>>>>> diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c
>>>>>>> index 7378ea146976..405f0af53e3d 100644
>>>>>>> --- a/arch/x86/kernel/resource.c
>>>>>>> +++ b/arch/x86/kernel/resource.c
>>>>>>> @@ -39,6 +39,17 @@ void remove_e820_regions(struct device *dev, struct resource *avail)
>>>>>>>  		e820_start = entry->addr;
>>>>>>>  		e820_end = entry->addr + entry->size - 1;
>>>>>>>  
>>>>>>> +		/*
>>>>>>> +		 * If an E820 entry covers just part of the resource, we
>>>>>>> +		 * assume E820 is telling us about something like host
>>>>>>> +		 * bridge register space that is unavailable for PCI
>>>>>>> +		 * devices.  But if it covers the *entire* resource, it's
>>>>>>> +		 * more likely just telling us that this is MMIO space, and
>>>>>>> +		 * that doesn't need to be removed.
>>>>>>> +		 */
>>>>>>> +		if (e820_start <= avail->start && avail->end <= e820_end)
>>>>>>> +			continue;
>>>>>>> +
>>>>>>
>>>>>> IMHO it would be good to add some logging here, since hitting this is
>>>>>> somewhat of a special case. For the Fedora test kernels I did I changed
>>>>>> this to:
>>>>>>
>>>>>> 		if (e820_start <= avail->start && avail->end <= e820_end) {
>>>>>> 			dev_info(dev, "resource %pR fully covered by e820 entry [mem %#010Lx-%#010Lx]\n",
>>>>>> 				 avail, e820_start, e820_end);
>>>>>> 			continue;
>>>>>> 		}
>>>>>>
>>>>>> And I expect/hope to see this new info message on the ideapad with the
>>>>>> touchpad issue.
>>
>> I added this logging.
>>
>>> So I just got the first report back from the Fedora test 5.16.12 kernel
>>> with this series added. Good news on the ideapad this wotks fine to
>>> fix the touchpad issue (as expected).
>>
>> Any "Tested-by" I could add?  If we can, I'd really like to give some
>> credit to the folks who suffered through this and helped resolve it.
> 
> Good point, the reporter of:
> https://bugzilla.redhat.com/show_bug.cgi?id=1868899
> 
> has done most of the ideapad with touchpad issues testing for me
> and has been very helpful. I agree he deserves credit for this.
> 
> I've asked him if he is ok with adding a Tested-by tag and if yes,
> which email we should use.

If you can add the following tag that would be great:

Tested-by: Matt Hansen <2lprbe78@duck.com>

Regards,

Hans


  reply	other threads:[~2022-03-11  7:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04  3:51 [PATCH 0/3] x86/PCI: Clip only partial E820 overlaps Bjorn Helgaas
2022-03-04  3:51 ` [PATCH 1/3] x86/PCI: Eliminate remove_e820_regions() common subexpressions Bjorn Helgaas
2022-03-04  3:51 ` [PATCH 2/3] x86/PCI: Log host bridge window clipping for E820 regions Bjorn Helgaas
2022-03-04  3:51 ` [PATCH 3/3] x86/PCI: Preserve host bridge windows completely covered by E820 Bjorn Helgaas
2022-03-04 14:16   ` Hans de Goede
2022-03-04 15:32     ` Bjorn Helgaas
2022-03-04 15:46       ` Hans de Goede
2022-03-04 18:34         ` Bjorn Helgaas
2022-03-05 10:37         ` Hans de Goede
2022-03-07 10:02           ` Hans de Goede
2022-03-08 14:52             ` Rafael J. Wysocki
2022-03-09 18:15           ` Bjorn Helgaas
2022-03-10 12:28             ` Hans de Goede
2022-03-11  7:52               ` Hans de Goede [this message]
2022-03-11 16:24                 ` Bjorn Helgaas
2022-03-11 15:13         ` Hans de Goede
2022-03-04 14:15 ` [PATCH 0/3] x86/PCI: Clip only partial E820 overlaps Hans de Goede
2022-03-04 15:21   ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03675c75-ee6f-5da3-099c-2b82a1865455@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benoitg@coeus.ca \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=helgaas@kernel.org \
    --cc=hpa@zytor.com \
    --cc=hui.wang@canonical.com \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=kw@linux.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=myron.stowe@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=wse@tuxedocomputers.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).