[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-pci
Subject:    Re: [PATCH] x86: PCI config space accessor functions should not
From:       Jesse Barnes <jbarnes () virtuousgeek ! org>
Date:       2011-07-22 15:23:55
Message-ID: 20110722082355.522751ef () jbarnes-desktop
[Download RAW message or body]

On Fri, 22 Jul 2011 08:13:05 +0100
"Jan Beulich" <JBeulich@novell.com> wrote:

> Without this change, the majority of the raw PCI config space access
> functions silently ignore a non-zero segment argument, which is
> certainly wrong.
> 
> Apart from pci_direct_conf1, all other non-MMCFG access methods get
> used only for non-extended accesses (i.e. assigned to raw_pci_ops
> only). Consequently, with the way raw_pci_{read,write}() work, it would
> be a coding error to call these functions with a non-zero segment (with
> the current call flow this cannot happen afaict).
> 
> The access method 1 accessor, as it can be used for extended accesses
> (on AMD systems) instead gets checks added for the passed in segment to
> be zero. This would be the case when on such a system having multiple
> PCI segments (don't know whether any exist in practice) MMCFG for some
> reason is not usable, and method 1 gets selected for doing extended
> accesses. Rather than accessing the wrong device's config space, the
> function will now error out.
> 
> v2: Convert BUG_ON() to WARN_ON(), and extend description as per Ingo's
> request.
> 
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> 

Applied, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic