linux/arch/sh
Hideo Saito bb68660943 sh: Fix PCI BAR address-space wraparound.
When a SH7751R system includes a card that has wide range space
like a graphics card, the pci-pci bridge controller can't set the
correct address range.

For example, when *lower_limit is 0xfd000000 and bar_size is
0x4000000, in the following code at arch/sh/drivers/pci/pci-auto.c,
0x0 is set in bar_value.

pciauto_setup_bars()
{
...
                bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size;
...
                *lower_limit = bar_value + bar_size;
}

As a result, 0x4000000 is set in *lower_limit, but this value is wrong.

The following patch avoids this problem by checking the range of the
value and refusing to update the BAR if the calculated value ends up
being bogus.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 14:50:49 +09:00
..
boards sh: Kill off I/O cruft for R7780RP. 2007-03-05 20:19:57 +09:00
boot sh: Fix .empty_zero_page alignment for PAGE_SIZE > 4096. 2006-12-12 08:53:29 +09:00
cchips sh: rts7751r2d board updates. 2007-02-15 18:20:52 +09:00
configs sh: Enable SM501 support for RTS7751R2D. 2007-03-05 14:13:26 +09:00
drivers sh: Fix PCI BAR address-space wraparound. 2007-03-12 14:50:49 +09:00
kernel sh: Revert lazy dcache writeback changes. 2007-03-05 19:46:47 +09:00
lib sh: Fix memcpy() build error on sh4eb. 2006-09-27 17:50:03 +09:00
math-emu sh: Kill off remaining config.h references. 2006-10-03 13:19:02 +09:00
mm sh: Revert lazy dcache writeback changes. 2007-03-05 19:46:47 +09:00
oprofile sh: Fixup cpu_data references for the non-boot CPUs. 2007-02-13 10:54:45 +09:00
tools sh: Kill off dead bigsur and ec3104 boards. 2007-02-14 15:06:09 +09:00
Kconfig sh: Kill off dead bigsur and ec3104 boards. 2007-02-14 15:06:09 +09:00
Kconfig.debug sh: Trivial build fixes for SH-2 support. 2006-12-12 08:42:07 +09:00
Makefile sh: Kill off dead bigsur and ec3104 boards. 2007-02-14 15:06:09 +09:00