From: Matthew Wilcox <matthew@wil.cx>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz, linux-ia64@vger.kernel.org,
greg@kroah.com
Subject: Re: [PATCH] pci_raw_ops should use unsigned args
Date: Thu, 03 Feb 2005 19:17:30 +0000 [thread overview]
Message-ID: <20050203191730.GG20386@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1107457685.12618.23.camel@eeyore>
On Thu, Feb 03, 2005 at 12:08:05PM -0700, Bjorn Helgaas wrote:
> Convert pci_raw_ops to use unsigned segment (aka domain),
> bus, and devfn. With the previous code, various ia64 config
> accesses fail due to segment sign-extension problems.
>
> ia64:
> - With a signed seg >= 0x8, unwanted sign-extension occurs when
> "seg << 28" is cast to u64 in PCI_SAL_EXT_ADDRESS()
> - PCI_SAL_EXT_ADDRESS(): cast to u64 *before* shifting; otherwise
> "seg << 28" is evaluated as unsigned int (32 bits) and gets
> truncated when seg > 0xf
> - pci_sal_read(): validate "value" ptr as other arches do
I'm not happy about that one -- the PCI access.c guarantees the pointer
is non-NULL. But I'm going to do a sweep to catch all of these, so I'll
just undo it then.
> - pci_sal_{read,write}(): return -EINVAL rather than SAL error status
>
> arch/i386/pci/direct.c | 12 ++++++----
> arch/i386/pci/mmconfig.c | 6 +++--
> arch/i386/pci/numa.c | 6 +++--
> arch/i386/pci/pcbios.c | 6 +++--
> arch/ia64/pci/pci.c | 53 ++++++++++++++++++---------------------------
> arch/x86_64/pci/mmconfig.c | 8 ++++--
> include/linux/pci.h | 6 +++--
> 7 files changed, 51 insertions(+), 46 deletions(-)
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2005-02-03 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-03 19:08 [PATCH] pci_raw_ops should use unsigned args Bjorn Helgaas
2005-02-03 19:17 ` Matthew Wilcox [this message]
2005-02-08 0:20 ` Greg KH
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=20050203191730.GG20386@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=greg@kroah.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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