summaryrefslogtreecommitdiffstats
path: root/drivers/block/ps3vram.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ps3vram: Replace mutex by spinlock + bio_listGeert Uytterhoeven2009-06-151-15/+36
| | | | | | | | | | | | Remove the mutex serializing access to the cache. Instead, queue up new requests on a bio_list if the driver is busy. This improves sequential write performance by ca. 2%. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ps3fb/vram: Extract common GPU stuff into <asm/ps3gpu.h>Geert Uytterhoeven2009-06-151-14/+7
| | | | | | | | Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: linux-fbdev-devel@lists.sourceforge.net Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ps3vram: GPU memory mapping cleanupGeert Uytterhoeven2009-06-151-5/+14
| | | | | | | | | | | | - Make the IOMMU flags used for mapping main memory into the GPU's I/O space explicit, instead of relying on the default in the hypervisor, - Add missing calls to lv1_gpu_context_iomap(..., CBE_IOPTE_M) to unmap the memory during cleanup. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ps3vram: Correct exchanged gotos in ps3vram_probe() error pathJim Paris2009-06-151-2/+2
| | | | | | | Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ps3vram: Use proc_create_data() instead of proc_create()Geert Uytterhoeven2009-06-151-5/+3
| | | | | | | | | | Use proc_create_data() to avoid race conditions. Reported-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* ps3vram: Fix error path (return -EIO) for short read/writeGeert Uytterhoeven2009-06-151-0/+1
| | | | | | | Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan2009-03-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* ps3/block: Replace mtd/ps3vram by block/ps3vramGeert Uytterhoeven2009-03-131-0/+865
Convert the PS3 Video RAM Storage Driver from an MTD driver to a plain block device driver. The ps3vram driver exposes unused video RAM on the PS3 as a block device suitable for storage or swap. Fast data transfer is achieved using a local cache in system RAM and DMA transfers via the GPU. The new driver is ca. 50% faster for reading, and ca. 10% for writing. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>