public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Borislav Petkov <bp@suse.de>
Cc: Stephane Eranian <eranian@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andi Kleen <ak@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	"mingo@elte.hu" <mingo@elte.hu>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [bug] mapping multiple BARs
Date: Sat, 2 Apr 2016 02:19:50 +0200	[thread overview]
Message-ID: <20160402001950.GA5169@krava.local> (raw)
In-Reply-To: <20160324133656.GB22759@krava.brq.redhat.com>

ping

On Thu, Mar 24, 2016 at 02:36:56PM +0100, Jiri Olsa wrote:
> On Thu, Mar 24, 2016 at 11:15:06AM +0100, Borislav Petkov wrote:
> > On Thu, Mar 24, 2016 at 10:44:41AM +0100, Jiri Olsa wrote:
> > > hi,
> > > I'm hitting following lines in dmesg:
> > >   resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than reserved [mem 0xfed10000-0xfed13fff]
> > >   caller snb_uncore_imc_init_box+0x7c/0xa0 mapping multiple BARs
> > > 
> > > I'm on IvyBridge model 58
> > >   vendor_id       : GenuineIntel
> > >   cpu family      : 6
> > >   model           : 58
> > >   model name      : Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
> > >   stepping        : 9
> > >   microcode       : 0x1c
> > > 
> > > I've read following threads:
> > >   http://marc.info/?w=2&r=1&s=mapping+multiple+BARs&q=t
> > > 
> > > and it seems this is supposed to be already fixed by:
> > >   cb171f7abb9a PNP: Work around BIOS defects in Intel MCH area reporting
> > 
> > And as we talked on IRC, it looked like the quirk gets applied on my
> > machine and not on yours. I.e., I see:
> > 
> > [    0.669351] pnp 00:01: [Firmware Bug]: PNP resource [mem 0xfed10000-0xfed13fff] covers only part of 0000:00:00.0 Intel MCH; extending to [mem 0xfed10000-0xfed17fff]
> > 
> > and you don't.
> > 
> > Can you add some debug printks to quirk_intel_mch() to find out why?
> 
> seems like this function did not find any quirk
> (patch for the output attached)
> 
> [root@intel-chiefriver-04 ~]# dmesg | grep quirk_intel_mch
> quirk_intel_mch dev WDT0
> quirk_intel_mch   region start ffff880244617778, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 6a4, end 6a4
> quirk_intel_mch   res    start 6a0, end 6a0
> quirk_intel_mch dev LDRC
> quirk_intel_mch   region start ffff880244617378, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 2e, end 2f
> quirk_intel_mch   res    start 4e, end 4f
> quirk_intel_mch   res    start 61, end 61
> quirk_intel_mch   res    start 63, end 63
> quirk_intel_mch   res    start 65, end 65
> quirk_intel_mch   res    start 67, end 67
> quirk_intel_mch   res    start 70, end 70
> quirk_intel_mch   res    start 80, end 80
> quirk_intel_mch   res    start 92, end 92
> quirk_intel_mch   res    start b2, end b3
> quirk_intel_mch   res    start 680, end 69f
> quirk_intel_mch   res    start 1004, end 1013
> quirk_intel_mch   res    start ffff, end ffff
> quirk_intel_mch   res    start ffff, end ffff
> quirk_intel_mch   res    start 400, end 453
> quirk_intel_mch   res    start 458, end 47f
> quirk_intel_mch   res    start 500, end 57f
> quirk_intel_mch   res    start 164e, end 164f
> quirk_intel_mch dev CWDT
> quirk_intel_mch   region start ffff8802446b8b78, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 454, end 457
> quirk_intel_mch dev PDRC
> quirk_intel_mch   region start ffff8802446bcb78, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start fed1c000, end fed1ffff
> quirk_intel_mch   res    start fed10000, end fed17fff
> quirk_intel_mch   res    start fed18000, end fed18fff
> quirk_intel_mch   res    start fed19000, end fed19fff
> quirk_intel_mch   res    start f8000000, end fbffffff
> quirk_intel_mch   res    start fed20000, end fed3ffff
> quirk_intel_mch   res    start fed90000, end fed93fff
> quirk_intel_mch   res    start fed45000, end fed8ffff
> quirk_intel_mch   res    start ff000000, end ffffffff
> quirk_intel_mch   res    start fee00000, end feefffff
> quirk_intel_mch   res    start b15b0000, end b15b0fff
> 
> 
> but AFAICS the following dmesg output:
> 
>   resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than reserved [mem 0xfed10000-0xfed13fff]
>   caller snb_uncore_imc_init_box+0x7c/0xa0 mapping multiple BARs
> 
> is related to checking of iomem_resource, which I haven't
> found connected to the pnp_dev resources from the quirk code
> 
> 
> thanks,
> jirka
> 
> 
> ---
> diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
> index d28e3ab..964ba12 100644
> --- a/drivers/pnp/quirks.c
> +++ b/drivers/pnp/quirks.c
> @@ -397,13 +397,22 @@ static void quirk_intel_mch(struct pnp_dev *dev)
>  	mch.flags = IORESOURCE_MEM;
>  	pcibios_bus_to_resource(host->bus, &mch, &region);
>  
> +printk("quirk_intel_mch dev %s\n", dev->name);
> +printk("quirk_intel_mch   region start %llx, end %llx\n", dev->name, region.start, region.end);
> +printk("quirk_intel_mch   mch    start %llx, end %llx\n", mch.start, mch.end);
> +
>  	list_for_each_entry(pnp_res, &dev->resources, list) {
>  		res = &pnp_res->res;
> +
> +printk("quirk_intel_mch   res    start %llx, end %llx\n", res->start, res->end);
> +
>  		if (res->end < mch.start || res->start > mch.end)
>  			continue;	/* no overlap */
>  		if (res->start == mch.start && res->end == mch.end)
>  			continue;	/* exact match */
>  
> +printk("quirk_intel_mch   GOT IT\n");
> +
>  		dev_info(&dev->dev, FW_BUG "PNP resource %pR covers only part of %s Intel MCH; extending to %pR\n",
>  			 res, pci_name(host), &mch);
>  		res->start = mch.start;

  reply	other threads:[~2016-04-02  0:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  9:44 [bug] mapping multiple BARs Jiri Olsa
2016-03-24 10:15 ` Borislav Petkov
2016-03-24 13:36   ` Jiri Olsa
2016-04-02  0:19     ` Jiri Olsa [this message]
2016-04-05  6:09     ` Borislav Petkov
2016-04-13 19:40 ` Bjorn Helgaas

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=20160402001950.GA5169@krava.local \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@suse.de \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /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