sparc64: Fix overly strict range type matching for PCI devices.
commitc141dab88c2afe8a1d43b64f55db11523cc4ec2d
authorDavid S. Miller <davem@davemloft.net>
Wed, 9 Dec 2009 09:39:09 +0000 (9 01:39 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:11 +0000 (18 14:05 -0800)
treea13a27771f41bf7b06082ab7b2260df371a6f122
parent257abc89a7765c57137811419caac5efca2e7b2d
sparc64: Fix overly strict range type matching for PCI devices.

[ Upstream commit 4230fa3b89ea1c413766bd411a8315a3d05aa6c7 ]

When we are trying to see if a range property entry applies
to a given address, we are overly strict about the type.

We should only allow I/O ranges for I/O addresses, and only allow
CONFIG space ranges for CONFIG space address.

However for MEM ranges, they come in 32-bit and 64-bit flavors.
And a lack of an exact match is OK if the range is 32-bit and
the address is 64-bit.  We can assign a 64-bit address properly
into a 32-bit parent range just fine.

So allow it.

Reported-by: Patrick Finnegan <pat@computer-refuge.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/kernel/of_device_64.c