linux/drivers/mtd/nand
Huang Shijie df877fb3f5 mtd: gpmi: do not use the local array to do the DMA transfer
The local array feature[] is in the stack. We can see the warning
when we enable the CONFIG_DMA_API_DEBUG:
----------------------------------------------------------
WARNING: at lib/dma-debug.c:950 check_for_stack+0xac/0xf8()
gpmi-nand 112000.gpmi-nand: DMA-API: device driver maps memory fromstack [addr=dc05be34]
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.17-16851-g2414a73 #1324
[<80014cbc>] (unwind_backtrace+0x0/0x138) from [<8001251c>] (show_stack+0x10/0x14)
[<8001251c>] (show_stack+0x10/0x14) from [<8002699c>] (warn_slowpath_common+0x4c/0x68)
[<8002699c>] (warn_slowpath_common+0x4c/0x68) from [<80026a4c>] (warn_slowpath_fmt+0x30/0x40)
[<80026a4c>] (warn_slowpath_fmt+0x30/0x40) from [<8028e2f8>] (check_for_stack+0xac/0xf8)
[<8028e2f8>] (check_for_stack+0xac/0xf8) from [<8028e438>] (debug_dma_map_sg+0xf4/0x188)
[<8028e438>] (debug_dma_map_sg+0xf4/0x188) from [<803968d0>] (prepare_data_dma+0xb8/0x1a8)
[<803968d0>] (prepare_data_dma+0xb8/0x1a8) from [<80397b20>] (gpmi_send_data+0x84/0xfc)
[<80397b20>] (gpmi_send_data+0x84/0xfc) from [<8038c2b4>] (nand_onfi_set_features+0x50/0x74)
[<8038c2b4>] (nand_onfi_set_features+0x50/0x74) from [<80397198>] (gpmi_extra_init+0x90/0x170)
[<80397198>] (gpmi_extra_init+0x90/0x170) from [<8039520c>] (gpmi_nand_probe+0x2f8/0xb3c)
[<8039520c>] (gpmi_nand_probe+0x2f8/0xb3c) from [<8031b974>] (platform_drv_probe+0x18/0x1c)
----------------------------------------------------------

The patch uses the kzalloc to allocate the buffer, and free it when
we do not use it anymore.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2014-01-03 11:22:18 -08:00
..
bcm47xxnflash mtd: bcm47xxnflash: Use devm_kzalloc 2013-11-06 23:32:56 -08:00
gpmi-nand mtd: gpmi: do not use the local array to do the DMA transfer 2014-01-03 11:22:18 -08:00
ams-delta.c mtd: nand: ams-delta: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:30 +01:00
atmel_nand.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
atmel_nand_ecc.h
atmel_nand_nfc.h mtd: atmel_nand: add Nand Flash Controller (NFC) support 2013-08-05 21:07:41 +01:00
au1550nd.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
bf5xx_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
cafe_nand.c mtd: nand: subpage write support for hardware based ECC schemes 2013-04-05 13:22:59 +01:00
cmx270_nand.c
cs553x_nand.c mtd cs553x_nand: use kzalloc() instead of memset 2013-08-30 21:52:48 +01:00
davinci_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
denali.c mtd: nand: add a helper to check the SLC/MLC nand chip 2013-10-27 16:27:04 -07:00
denali.h mtd: denali: add a DT driver 2012-11-15 15:37:46 +02:00
denali_dt.c mtd: denali_dt: Remove redundant use of of_match_ptr 2013-04-05 14:04:34 +01:00
denali_pci.c mtd: denali: remove unnecessary pci_set_drvdata() 2013-11-06 23:32:44 -08:00
diskonchip.c mtd: diskonchip: Fix incorrect placement of __initdata 2013-10-27 16:27:07 -07:00
docg4.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
fsl_elbc_nand.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
fsl_ifc_nand.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
fsl_upm.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
fsmc_nand.c dmaengine: remove DMA unmap flags 2013-11-14 11:04:38 -08:00
gpio.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
jz4740_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
Kconfig mtd: nand: pxa3xx: Make config menu show supported platforms 2014-01-03 11:22:10 -08:00
lpc32xx_mlc.c mtd: nand: lpc32xx_mlc: Remove redundant of_match_ptr 2013-11-06 23:32:45 -08:00
lpc32xx_slc.c mtd: nand: lpc32xx_slc: Remove redundant of_match_ptr 2013-11-06 23:32:45 -08:00
Makefile mtd: remove alauda driver 2013-08-30 21:51:57 +01:00
mpc5121_nfc.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
mxc_nand.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
nand_base.c mtd: nand: use a local variable to simplify the nand_scan_tail 2013-11-07 00:08:56 -08:00
nand_bbt.c mtd: nand_bbt: kill NAND_BBT_SCANALLPAGES 2013-11-06 23:33:14 -08:00
nand_bch.c
nand_ecc.c mtd: nane: print source of error message 2013-02-04 09:27:19 +02:00
nand_ids.c mtd: add the ecc info for some full-id nand chips 2013-08-30 21:34:47 +01:00
nandsim.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
ndfc.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
nuc900_nand.c mtd: nand: nuc900_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:09 +01:00
omap2.c mtd: nand: omap: fix error return code in omap_nand_probe() 2013-11-06 23:33:15 -08:00
orion_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
pasemi_nand.c mtd: pasemi_nand.c: remove superfluous name cast 2014-01-03 11:22:09 -08:00
plat_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
pxa3xx_nand.c mtd: nand: pxa3xx: make ECC configuration checks more explicit 2014-01-03 11:22:18 -08:00
r852.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
r852.h
s3c2410.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sh_flctl.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sharpsl.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sm_common.c mtd: nand: refactor chip->block_markbad interface 2013-08-30 16:47:52 +01:00
sm_common.h
socrates_nand.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
tmio_nand.c mtd: nand: remove deprecated IRQF_DISABLED 2013-11-07 00:08:56 -08:00
txx9ndfmc.c mtd: simplify use of devm_ioremap_resource 2013-08-30 21:36:15 +01:00
xway_nand.c mtd: lantiq: Add NAND support on Lantiq XWAY SoC. 2012-09-29 15:05:18 +01:00