linux-kernel-test/arch/arm/mach-tegra
Stephen Warren ccac05152e ARM: Tegra: DMA: Fail safe if initialization fails
tegra_dma_init currently simply bails out early if any initialization fails.
This skips various data-structure initialization. In turn, this means that
tegra_dma_allocate_channel can still hand out channels. In this case, when
tegra_dma_free_channel is called, which calls tegra_dma_cancel, the walking
on ch->list will OOPS since the list's next/prev pointers may still be
NULL.

To solve this, add an explicit "initialized" flag, only set this once _init
has fully completed successfully, and have _allocate_channel refuse to hand
out channels if this is not set.

While at it, simplify _init:
* Remove redundant memsets
* Use bitmap_fill to mark all channels as in-use up-front, and remove
  some now-redundant bitmap initialization loops.
* Only mark a channel as free once all channel-related initialization has
  completed.

Finally, the successful exit path from _init always has ret==0, so just
hard-code that return. The error path still returns ret.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-23 14:06:03 -08:00
..
include/mach ARM: tegra: add tegra_gpio_table and tegra_gpio_config 2011-02-22 17:27:11 -08:00
board-harmony-pcie.c tegra: harmony: enable PCI Express 2010-10-21 18:13:10 -07:00
board-harmony-pinmux.c ARM: tegra: harmony: fix pinmux for MMC slot 2011-02-22 17:28:13 -08:00
board-harmony.c ARM: tegra: harmony: register sdhci devices 2011-02-22 17:28:12 -08:00
board-harmony.h [ARM] tegra: harmony: Add harmony board file 2010-08-05 14:57:02 -07:00
board-seaboard-pinmux.c ARM: tegra: add seaboard, wario and kaen boards 2011-02-22 17:28:14 -08:00
board-seaboard.c ARM: tegra: add seaboard, wario and kaen boards 2011-02-22 17:28:14 -08:00
board-seaboard.h ARM: tegra: add seaboard, wario and kaen boards 2011-02-22 17:28:14 -08:00
board-trimslice-pinmux.c ARM: tegra: add TrimSlice board 2011-02-10 18:36:51 -08:00
board-trimslice.c ARM: tegra: Move tegra_common_init to tegra_init_early 2011-02-22 11:25:12 -08:00
board-trimslice.h ARM: tegra: add TrimSlice board 2011-02-10 18:36:51 -08:00
board.h ARM: tegra: Move tegra_common_init to tegra_init_early 2011-02-22 11:25:12 -08:00
clock.c ARM: tegra: clock: Round rate before setting rate 2011-02-22 11:22:34 -08:00
clock.h ARM: tegra: clock: Add function to set SDMMC tap delay 2011-02-21 00:16:47 -08:00
common.c ARM: Tegra: Make tegra_dma_init a postcore_initcall 2011-02-23 14:00:11 -08:00
cpu-tegra.c ARM: tegra: cpufreq: Adjust memory frequency with cpu frequency 2011-02-21 00:16:46 -08:00
devices.c ARM: tegra: common device resources 2011-02-22 17:28:11 -08:00
devices.h ARM: tegra: common device resources 2011-02-22 17:28:11 -08:00
dma.c ARM: Tegra: DMA: Fail safe if initialization fails 2011-02-23 14:06:03 -08:00
fuse.c [ARM] tegra: Add support for reading fuses 2010-10-21 18:12:09 -07:00
fuse.h [ARM] tegra: Add support for reading fuses 2010-10-21 18:12:09 -07:00
gpio-names.h [ARM] tegra: add GPIO support 2010-08-05 14:57:02 -07:00
gpio.c ARM: tegra: add tegra_gpio_table and tegra_gpio_config 2011-02-22 17:27:11 -08:00
headsmp.S [ARM] tegra: SMP support 2010-08-05 14:57:01 -07:00
hotplug.c ARM: fix wrongly patched constants 2011-01-14 12:06:26 +00:00
io.c [ARM] tegra: update iomap 2010-10-21 18:11:24 -07:00
irq.c ARM: tegra: irq: Implement retrigger 2011-02-09 22:18:30 -08:00
Kconfig ARM: tegra: add seaboard, wario and kaen boards 2011-02-22 17:28:14 -08:00
legacy_irq.c ARM: tegra: irq: Add support for suspend wake sources 2011-02-09 22:18:21 -08:00
localtimer.c [ARM] tegra: SMP support 2010-08-05 14:57:01 -07:00
Makefile ARM: tegra: add seaboard, wario and kaen boards 2011-02-22 17:28:14 -08:00
Makefile.boot
pcie.c tegra: add PCI Express support 2010-10-21 18:13:02 -07:00
pinmux-t2-tables.c ARM: tegra: pinmux: Add missing drive pingroups and fix suspend 2011-02-09 21:57:02 -08:00
pinmux.c [ARM] tegra: pinmux: add safe values, move tegra2, add suspend 2010-10-21 18:11:41 -07:00
platsmp.c Merge branch 'misc' into devel 2011-01-06 22:32:52 +00:00
powergate.c ARM: tegra: Add api to control internal powergating 2011-02-09 21:57:00 -08:00
tegra2_clocks.c ARM: Tegra: Rename clk_dev1/2 to cdev1/2 2011-02-23 14:00:11 -08:00
tegra2_emc.c ARM: tegra: Add external memory controller driver 2011-02-21 00:16:45 -08:00
tegra2_emc.h ARM: tegra: Add external memory controller driver 2011-02-21 00:16:45 -08:00
timer.c ARM: tegra: timer: Enable timer and rtc clocks 2011-02-22 14:48:27 -08:00