linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Douthit <stephend@silicom-usa.com>
To: "Luck, Tony" <tony.luck@intel.com>,
	Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	James Morse <james.morse@arm.com>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC, pnd2: Fix ioremap() size in dnv_rd_reg() from 64K -> 32K
Date: Fri, 9 Aug 2019 14:13:31 +0000	[thread overview]
Message-ID: <57c16c37-c81c-a935-6b8f-efd41657aaad@silicom-usa.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7F416946@ORSMSX115.amr.corp.intel.com>

On 8/8/19 5:05 PM, Luck, Tony wrote:
> -		base = ioremap((resource_size_t)addr, 0x10000);
> +		base = ioremap((resource_size_t)addr, 0x8000);
> 
> Changing one magic value for another.  :-(

Ok, I'll give it a name.

> Do different BIOS do different things?  I don't recall seeing this error
> (but perhaps I missed it, or perhaps the kernel has added better checks).

Sure, depending on where a BIOS locates MMIO resources the reported
reserved ranges will vary.  Normally those resources are packed by size
so any changes in the installed/enabled device list can change the
layout of the MMIO reserved regions as well.

The BIOS could also choose to report adjacent MMIO resources as one
larger reserved region.

> If this number is at the whim of the BIOS, is there some way to
> figure out what is the right value on a specific implementation?
Digging back though the EDS (Intel Doc #558579) I found that there are
two sizes we need to handle.  If we're reading via the memory controller
hub that BAR is 32KB per section 44.2.7 of the EDS.

All sideband ports are 64KB, I'll resubmit taking that into account.

  reply	other threads:[~2019-08-09 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 20:52 [PATCH] EDAC, pnd2: Fix ioremap() size in dnv_rd_reg() from 64K -> 32K Stephen Douthit
2019-08-08 21:05 ` Luck, Tony
2019-08-09 14:13   ` Stephen Douthit [this message]
2019-08-09  7:07 ` Zhuo, Qiuxu

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=57c16c37-c81c-a935-6b8f-efd41657aaad@silicom-usa.com \
    --to=stephend@silicom-usa.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tony.luck@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;
as well as URLs for NNTP newsgroup(s).