linux/arch/mips
Gabor Juhos a68ad4d892 MIPS: ath79: allow to use board specific pci_plat_dev_init functions
Th current implementation causes NULL pointer dereference
if 'pci_data' is not set:

pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff 64bit] (PCI
address [0x10000000-0x1000ffff])
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 802daca0, ra == 802e78a4
Oops[#1]:
Cpu 0
$ 0   : 00000000 80420000 00000000 00000000
$ 4   : 00000000 00000000 00000001 00000001
$ 8   : 00000001 0000032c 81c54700 00000001
$12   : 0000032d 0000000f 00000000 ffffffff
$16   : 81c14c00 00000001 802dac74 80195f98
$20   : 802ea050 00000000 00000000 00000000
$24   : 00000003 800617f0
$28   : 81c20000 81c21e70 00000000 802e78a4
Hi    : 00000000
Lo    : 4190ab00
epc   : 802daca0 0x802daca0
    Not tainted
ra    : 802e78a4 0x802e78a4
Status: 1000c003    KERNEL EXL IE
Cause : 00800008
BadVA : 00000000
PrId  : 00019374 (MIPS 24Kc)
Modules linked in:
Process swapper (pid: 1, threadinfo=81c20000, task=81c18000, tls=00000000)
Stack : 00000000 8027d5d8 802e8ae0 00000000 01000000 802e8b5c 81c50600 00000000
        802ff290 00000000 80420000 802ea0bc 00000000 00000000 80420000 802ff290
        80420000 80060930 33390000 00000000 00002308 80140a80 00000028 802d0000
        00000000 800ba024 802ff004 802ff0c8 802ff290 00000000 00000000 00000000
        00000000 802d897c 01234567 7f827068 00000000 0045f798 00460000 00000000

This can be avoided by calling the 'ar724x_pci_add_data'
function from the board specific setup code. However it
makes no sense to use that function for every board,
especially when the board does not needs to set the
platform_data field of any PCI device.

The patch allows the board setup code to specify a board
specific function if that is required.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3499/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-15 17:49:05 +02:00
..
alchemy MIPS: Alchemy: Increase minimum timeout for 32kHz timer. 2012-02-20 18:33:18 +01:00
ar7 Merge branches 'next/ar7', 'next/ath79', 'next/bcm63xx', 'next/bmips', 'next/cavium', 'next/generic', 'next/kprobes', 'next/lantiq', 'next/perf' and 'next/raza' into mips-for-linux-next 2012-01-11 15:42:31 +01:00
ath79 MIPS: ath79: allow to use board specific pci_plat_dev_init functions 2012-05-15 17:49:05 +02:00
bcm47xx MIPS: BCM47XX: provide sprom to bcma bus 2012-03-05 15:20:51 -05:00
bcm63xx mips: Fix typo in bcm63xx/setup.c 2012-02-05 17:14:47 +01:00
boot MIPS: Alchemy: Basic support for the DB1300 board. 2011-12-07 22:02:06 +00:00
cavium-octeon Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
cobalt MIPS: Mark cascade and low level interrupts IRQF_NO_THREAD 2011-09-21 17:52:15 +02:00
configs locking/kconfig: Simplify INLINE_SPIN_UNLOCK usage 2012-03-23 13:18:57 +01:00
dec Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
emma Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
fw Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
include/asm MIPS: ath79: add PCI IRQ handling code for AR724X SoCs 2012-05-15 17:49:04 +02:00
jazz Merge branch 'next/generic' into mips-for-linux-next 2012-01-11 15:41:47 +01:00
jz4740 ASoC: jz4740: Convert qi_lb60 to use snd_soc_register_card() 2012-01-20 13:58:29 +00:00
kernel MIPS: Use set_current_blocked() and block_sigmask() 2012-04-27 00:12:47 +01:00
lantiq Merge branch 'next/generic' into mips-for-linux-next 2012-01-11 15:41:47 +01:00
lasat Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
lib mips: use the the PCI controller's io_map_base 2012-01-31 23:20:30 +02:00
loongson MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
math-emu Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
mipssim Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
mm Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
mti-malta Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
netlogic remove references to cpu_*_map in arch/ 2012-03-29 15:38:30 +10:30
oprofile MIPS: oprofile: Add callgraph support 2011-06-15 14:35:34 +02:00
pci MIPS: ath79: add PCI IRQ handling code for AR724X SoCs 2012-05-15 17:49:04 +02:00
pmc-sierra documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
pnx833x Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
pnx8550 MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
power MIPS: Hibernation: Fixes for PAGE_SIZE >= 64kb 2011-05-10 18:15:26 +01:00
powertv Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
rb532 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sgi-ip22 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sgi-ip27 remove references to cpu_*_map in arch/ 2012-03-29 15:38:30 +10:30
sgi-ip32 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sibyte documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
sni Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
txx9 MIPS: txx9 7segled fix struct device has no member 2012-02-20 18:33:18 +01:00
vr41xx Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
wrppmc
Kbuild
Kbuild.platforms MIPS: XLR, XLS: Move makefile bits to were they belong. 2011-07-20 23:12:11 +01:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-03-29 14:49:45 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile MIPS: BMIPS: Add CFLAGS, Makefile entries for BMIPS 2011-12-07 22:03:17 +00:00