[patch 02/13] jffs2 summary allocation: don't use vmalloc()

David Brownell david-b at pacbell.net
Wed Jul 30 18:39:24 EDT 2008


> This patch will probably break all sorts of things because that buffer is
> &*large*: up to half a meg.
>
> So this patch isn't mergeable.  I'll hang onto it to bug dmwm2 with when he
> reincarnates.

I'm still asking whether MTD folk have any plans to make that stack DMA-safe...
more than just the SPI flash drivers (mtd_dataflash, m25p80) could benefit
from DMA support, so I'd hope it's at least being considered.

If the answer is "no" then (a) the MTD interface specs need to finally say
they pass DMA-unsafe addresses, and (b) those SPI flash drivers are going
to need updates.

- Dae


> @@ -30,7 +29,7 @@ int jffs2_sum_init(struct jffs2_sb_info 
>  		return -ENOMEM;
>  	}
>  
> -	c->summary->sum_buf = vmalloc(c->sector_size);
> +	c->summary->sum_buf = kmalloc(c->sector_size, GFP_KERNEL);
>  
>  	if (!c->summary->sum_buf) {
>  		JFFS2_WARNING("Can't allocate buffer for writing out summary information!\n");



More information about the linux-mtd mailing list