* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing [not found] ` <1394289877.31006.2.camel@x41> @ 2014-03-10 18:24 ` Bjorn Helgaas 2014-03-10 23:45 ` Paul Bolle 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2014-03-10 18:24 UTC (permalink / raw) To: Paul Bolle Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci [+cc linux-pci] On Sat, Mar 08, 2014 at 03:44:37PM +0100, Paul Bolle wrote: > Bjorn Helgaas schreef op za 08-03-2014 om 07:12 [-0700]: > > I assume you have CONFIG_PHYS_ADDR_T_64BIT=n (which is perfectly > > legal); let me know if otherwise. > > $ grep CONFIG_PHYS_ADDR_T_64BIT /boot/config-3.14.0-0.rc5.1.local2.fc20.i686 > # CONFIG_PHYS_ADDR_T_64BIT is not set > > So, yes, CONFIG_PHYS_ADDR_T_64BIT=n here. Thanks. Can you try the patch below? I think it should fix the problem. PCI: Don't check resource_size() in pci_bus_alloc_resource() From: Bjorn Helgaas <bhelgaas@google.com> When resource_size_t is 32 bits wide, e.g., when CONFIG_PHYS_ADDR_T_64BIT is not defined, resource_size() on [mem 0x00000000-0xffffffff] returns 0 because (r->end - r->start + 1) overflows. Therefore, we can't use "resource_size() == 0" to decide that allocation from this resource will fail. allocate_resource() should fail anyway if it can't satisfy the address constraints, so we should just depend on that. A [mem 0x00000000-0xffffffff] bus resource is obviously not really valid, but we do fall back to it as a default when we don't have information about host bridge apertures. Link: https://bugzilla.kernel.org/show_bug.cgi?id=71611 Fixes: f75b99d5a77d PCI: Enforce bus address limits in resource allocation Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> --- drivers/pci/bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 00660cc502c5..38901665c770 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -162,8 +162,6 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res, avail = *r; pci_clip_resource_to_region(bus, &avail, region); - if (!resource_size(&avail)) - continue; /* * "min" is typically PCIBIOS_MIN_IO or PCIBIOS_MIN_MEM to ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 2014-03-10 18:24 ` [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing Bjorn Helgaas @ 2014-03-10 23:45 ` Paul Bolle 2014-03-11 0:07 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Paul Bolle @ 2014-03-10 23:45 UTC (permalink / raw) To: Bjorn Helgaas Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci Bjorn Helgaas schreef op ma 10-03-2014 om 12:24 [-0600]: > Thanks. Can you try the patch below? I think it should fix the problem. > > > PCI: Don't check resource_size() in pci_bus_alloc_resource() > > From: Bjorn Helgaas <bhelgaas@google.com> > > When resource_size_t is 32 bits wide, e.g., when CONFIG_PHYS_ADDR_T_64BIT > is not defined, resource_size() on [mem 0x00000000-0xffffffff] returns 0 > because (r->end - r->start + 1) overflows. > > Therefore, we can't use "resource_size() == 0" to decide that allocation > from this resource will fail. allocate_resource() should fail anyway if it > can't satisfy the address constraints, so we should just depend on that. > > A [mem 0x00000000-0xffffffff] bus resource is obviously not really valid, > but we do fall back to it as a default when we don't have information about > host bridge apertures. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=71611 > Fixes: f75b99d5a77d PCI: Enforce bus address limits in resource allocation > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > --- > drivers/pci/bus.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > index 00660cc502c5..38901665c770 100644 > --- a/drivers/pci/bus.c > +++ b/drivers/pci/bus.c > @@ -162,8 +162,6 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res, > > avail = *r; > pci_clip_resource_to_region(bus, &avail, region); > - if (!resource_size(&avail)) > - continue; > > /* > * "min" is typically PCIBIOS_MIN_IO or PCIBIOS_MIN_MEM to I've applied your patch on top of v3.14-rc6. The boot warning is gone. And /proc/iomem once again has the lines: [...] 80000000-801fffff : PCI Bus 0000:02 80200000-8027ffff : 0000:00:02.1 80280000-80280fff : Intel Flush Page [...] Which is what we want, don't we? A bit of doubt is caused by two new boot time messages: pnp 00:00: unknown resource type 10 in _CRS pnp 00:00: can't evaluate _CRS: 1 But I haven't yet tried v3.14-rc6 without your patch, so these might be unrelated. They're unclear to me, anyway. Thanks, Paul Bolle ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 2014-03-10 23:45 ` Paul Bolle @ 2014-03-11 0:07 ` Bjorn Helgaas 2014-03-11 0:15 ` Paul Bolle 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2014-03-11 0:07 UTC (permalink / raw) To: Paul Bolle Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci@vger.kernel.org, Rafael J. Wysocki [+cc Rafael] On Mon, Mar 10, 2014 at 5:45 PM, Paul Bolle <pebolle@tiscali.nl> wrote: > Bjorn Helgaas schreef op ma 10-03-2014 om 12:24 [-0600]: >> Thanks. Can you try the patch below? I think it should fix the problem. >> >> >> PCI: Don't check resource_size() in pci_bus_alloc_resource() >> >> From: Bjorn Helgaas <bhelgaas@google.com> >> >> When resource_size_t is 32 bits wide, e.g., when CONFIG_PHYS_ADDR_T_64BIT >> is not defined, resource_size() on [mem 0x00000000-0xffffffff] returns 0 >> because (r->end - r->start + 1) overflows. >> >> Therefore, we can't use "resource_size() == 0" to decide that allocation >> from this resource will fail. allocate_resource() should fail anyway if it >> can't satisfy the address constraints, so we should just depend on that. >> >> A [mem 0x00000000-0xffffffff] bus resource is obviously not really valid, >> but we do fall back to it as a default when we don't have information about >> host bridge apertures. >> >> Link: https://bugzilla.kernel.org/show_bug.cgi?id=71611 >> Fixes: f75b99d5a77d PCI: Enforce bus address limits in resource allocation >> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> >> --- >> drivers/pci/bus.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c >> index 00660cc502c5..38901665c770 100644 >> --- a/drivers/pci/bus.c >> +++ b/drivers/pci/bus.c >> @@ -162,8 +162,6 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res, >> >> avail = *r; >> pci_clip_resource_to_region(bus, &avail, region); >> - if (!resource_size(&avail)) >> - continue; >> >> /* >> * "min" is typically PCIBIOS_MIN_IO or PCIBIOS_MIN_MEM to > > I've applied your patch on top of v3.14-rc6. The boot warning is gone. > And /proc/iomem once again has the lines: > [...] > 80000000-801fffff : PCI Bus 0000:02 > 80200000-8027ffff : 0000:00:02.1 > 80280000-80280fff : Intel Flush Page > [...] > > Which is what we want, don't we? Yep, that part looks good. > A bit of doubt is caused by two new boot time messages: > pnp 00:00: unknown resource type 10 in _CRS > pnp 00:00: can't evaluate _CRS: 1 > > But I haven't yet tried v3.14-rc6 without your patch, so these might be > unrelated. They're unclear to me, anyway. Hmm, this is definitely concerning. Resource type 10 is ACPI_RESOURCE_TYPE_FIXED_MEMORY32, which we do handle (unless it's length 0). And your previous dmesg logs (at https://bugzilla.kernel.org/show_bug.cgi?id=71611) don't show anything like that. Can you attach an acpidump and the dmesg log with my patch to the bugzilla? Bjorn ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 2014-03-11 0:07 ` Bjorn Helgaas @ 2014-03-11 0:15 ` Paul Bolle 2014-03-11 2:07 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Paul Bolle @ 2014-03-11 0:15 UTC (permalink / raw) To: Bjorn Helgaas Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci@vger.kernel.org, Rafael J. Wysocki On Mon, 2014-03-10 at 18:07 -0600, Bjorn Helgaas wrote: > On Mon, Mar 10, 2014 at 5:45 PM, Paul Bolle <pebolle@tiscali.nl> wrote: > > A bit of doubt is caused by two new boot time messages: > > pnp 00:00: unknown resource type 10 in _CRS > > pnp 00:00: can't evaluate _CRS: 1 > > > > But I haven't yet tried v3.14-rc6 without your patch, so these might be > > unrelated. They're unclear to me, anyway. > > Hmm, this is definitely concerning. Resource type 10 is > ACPI_RESOURCE_TYPE_FIXED_MEMORY32, which we do handle (unless it's > length 0). And your previous dmesg logs (at > https://bugzilla.kernel.org/show_bug.cgi?id=71611) don't show anything > like that. > > Can you attach an acpidump and the dmesg log with my patch to the bugzilla? It's getting rather late over here. So I'll try (quite) a few hours later. But acpidump doesn't ring any bells right now. Any hints? Thanks, Paul Bolle ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 2014-03-11 0:15 ` Paul Bolle @ 2014-03-11 2:07 ` Bjorn Helgaas 2014-03-11 9:20 ` Paul Bolle 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2014-03-11 2:07 UTC (permalink / raw) To: Paul Bolle Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci@vger.kernel.org, Rafael J. Wysocki On Mon, Mar 10, 2014 at 6:15 PM, Paul Bolle <pebolle@tiscali.nl> wrote: > On Mon, 2014-03-10 at 18:07 -0600, Bjorn Helgaas wrote: >> On Mon, Mar 10, 2014 at 5:45 PM, Paul Bolle <pebolle@tiscali.nl> wrote: >> > A bit of doubt is caused by two new boot time messages: >> > pnp 00:00: unknown resource type 10 in _CRS >> > pnp 00:00: can't evaluate _CRS: 1 >> > >> > But I haven't yet tried v3.14-rc6 without your patch, so these might be >> > unrelated. They're unclear to me, anyway. >> >> Hmm, this is definitely concerning. Resource type 10 is >> ACPI_RESOURCE_TYPE_FIXED_MEMORY32, which we do handle (unless it's >> length 0). And your previous dmesg logs (at >> https://bugzilla.kernel.org/show_bug.cgi?id=71611) don't show anything >> like that. >> >> Can you attach an acpidump and the dmesg log with my patch to the bugzilla? > > It's getting rather late over here. So I'll try (quite) a few hours > later. But acpidump doesn't ring any bells right now. Any hints? There's acpidump info here: https://01.org/linux-acpi/utilities . You don't need to extract the binary tables or anything; just attach the text dump to the bugzilla. It would be very interesting to try v3.14-rc6 without my patch. I hope it has the same "unknown resource type" messages, because I don't see how my patch could be related to them. There were no recent PNP-related changes, so then I start to worry about some sort of memory corruption from an unrelated patch. But I hope that's not the case. Bjorn ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 2014-03-11 2:07 ` Bjorn Helgaas @ 2014-03-11 9:20 ` Paul Bolle 0 siblings, 0 replies; 6+ messages in thread From: Paul Bolle @ 2014-03-11 9:20 UTC (permalink / raw) To: Bjorn Helgaas Cc: Steven Newbury, Daniel Vetter, David Airlie, intel-gfx, Linux Kernel Mailing List, Yinghai Lu, linux-pci@vger.kernel.org, Rafael J. Wysocki Bjorn Helgaas schreef op ma 10-03-2014 om 20:07 [-0600]: > On Mon, Mar 10, 2014 at 6:15 PM, Paul Bolle <pebolle@tiscali.nl> wrote: > > On Mon, 2014-03-10 at 18:07 -0600, Bjorn Helgaas wrote: > >> On Mon, Mar 10, 2014 at 5:45 PM, Paul Bolle <pebolle@tiscali.nl> wrote: > >> > A bit of doubt is caused by two new boot time messages: > >> > pnp 00:00: unknown resource type 10 in _CRS > >> > pnp 00:00: can't evaluate _CRS: 1 > >> > > >> > But I haven't yet tried v3.14-rc6 without your patch, so these might be > >> > unrelated. They're unclear to me, anyway. > >> > >> Hmm, this is definitely concerning. Resource type 10 is > >> ACPI_RESOURCE_TYPE_FIXED_MEMORY32, which we do handle (unless it's > >> length 0). And your previous dmesg logs (at > >> https://bugzilla.kernel.org/show_bug.cgi?id=71611) don't show anything > >> like that. > >> > >> Can you attach an acpidump and the dmesg log with my patch to the bugzilla? > > > > It's getting rather late over here. So I'll try (quite) a few hours > > later. But acpidump doesn't ring any bells right now. Any hints? > > There's acpidump info here: https://01.org/linux-acpi/utilities . You > don't need to extract the binary tables or anything; just attach the > text dump to the bugzilla. (On Fedora it's shipped in acpica-tools. But since acpidump is a symlink to /usr/bin/acpidump-acpica that is created at install time it won't show up when one does "repoquery -f "*/acpidump". Add to this that "yum list pmtools" returns an error, and one is guaranteed roughly 30 minutes of sheer fun. Unsurprisingly, stubbornly trying "yum install pmtools" will actually install acpica-tools.) At least this all is written down somewhere now.) > It would be very interesting to try v3.14-rc6 without my patch. I > hope it has the same "unknown resource type" messages, because I don't > see how my patch could be related to them. There were no recent > PNP-related changes, so then I start to worry about some sort of > memory corruption from an unrelated patch. But I hope that's not the > case. lkml.org is returning some error page, but Markus Trippelsdorf just reported seeing this message too. Markus is unlikely to be also trying this patch. I've just added you to the CC's of my reply to Markus. I won't update the bugzilla report for now, because those messages appear unrelated to your patch. Thanks, Paul Bolle ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-11 9:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAKMK7uFx2kksGgnuy9e0xiQRKpt=_+44O1V4wbX5yNBocvjBkg@mail.gmail.com> [not found] ` <1391951759.6036.7.camel@artifact> [not found] ` <1391952344.25424.4.camel@x220> [not found] ` <CAErSpo6uj_Kuk0_F97nRsnM1Pss4C7=HeEaVu6D-NwFFK=1cvA@mail.gmail.com> [not found] ` <1394185698.5608.5.camel@x41> [not found] ` <CAErSpo4jiq38P3TNuGLGS--nbV9NtUAmiuK=cwWyFAneY-=eOA@mail.gmail.com> [not found] ` <1394212609.1987.6.camel@x41> [not found] ` <20140307204021.GA9822@google.com> [not found] ` <CAErSpo7Np8oju1ENQA5EgEpN4=Vv7f3s4E823ecbyp6FCWPL_Q@mail.gmail.com> [not found] ` <1394289877.31006.2.camel@x41> 2014-03-10 18:24 ` [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing Bjorn Helgaas 2014-03-10 23:45 ` Paul Bolle 2014-03-11 0:07 ` Bjorn Helgaas 2014-03-11 0:15 ` Paul Bolle 2014-03-11 2:07 ` Bjorn Helgaas 2014-03-11 9:20 ` Paul Bolle
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).