aboutsummaryrefslogtreecommitdiffstats
path: root/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-28blk_end_request: cleanup 'uptodate' related code (take 4)Kiyoshi Ueda1-8/+0
This patch converts 'uptodate' arguments of no longer exported interfaces, end_that_request_first/last, to 'error', and removes internal conversions for it in blk_end_request interfaces. Also, this patch removes no longer needed end_io_error(). Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blk_end_request: remove/unexport end_that_request_* (take 4)Kiyoshi Ueda1-8/+5
This patch removes the following functions: o end_that_request_first() o end_that_request_chunk() and stops exporting the functions below: o end_that_request_last() Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blk_end_request: add bidi completion interface (take 4)Kiyoshi Ueda1-0/+2
This patch adds a variant of the interface, blk_end_bidi_request(), which completes a bidi request. Bidi request must be completed as a whole, both rq and rq->next_rq at once. So the interface has 2 arguments for completion size. As for ->end_io, only rq->end_io is called (rq->next_rq->end_io is not called). So if special completion handling is needed, the handler must be set to rq->end_io. And the handler must take care of freeing next_rq too, since the interface doesn't care of it if rq->end_io is not NULL. Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blk_end_request: add callback feature (take 4)Kiyoshi Ueda1-0/+2
This patch adds a variant of the interface, blk_end_request_callback(), which has driver callback feature. Drivers may need to do special works between end_that_request_first() and end_that_request_last(). For such drivers, blk_end_request_callback() allows it to pass a callback function which is called between end_that_request_first() and end_that_request_last(). This interface is only for fallback of other blk_end_request interfaces. Drivers should avoid their tricky behaviors and use other interfaces as much as possible. Currently, only one driver, ide-cd, needs this interface. So this interface should/will be removed, after the driver removes such tricky behaviors. o ide-cd (cdrom_newpc_intr()) In PIO mode, cdrom_newpc_intr() needs to defer end_that_request_last() until the device clears DRQ_STAT and raises an interrupt after end_that_request_first(). So end_that_request_first() and end_that_request_last() are called separately in cdrom_newpc_intr(). This means blk_end_request_callback() has to return without completing request even if no leftover in the request. To satisfy the requirement, callback function has return value so that drivers can tell blk_end_request_callback() to return without completing request. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blk_end_request: add/export functions to get request size (take 4)Kiyoshi Ueda1-0/+8
This patch adds/exports functions to get the size of request in bytes. They are useful because blk_end_request interfaces take bytes as a completed I/O size instead of sectors. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blk_end_request: add new request completion interface (take 4)Kiyoshi Ueda1-0/+4
This patch adds 2 new interfaces for request completion: o blk_end_request() : called without queue lock o __blk_end_request() : called with queue lock held blk_end_request takes 'error' as an argument instead of 'uptodate', which current end_that_request_* take. The meanings of values are below and the value is used when bio is completed. 0 : success < 0 : error Some device drivers call some generic functions below between end_that_request_{first/chunk} and end_that_request_last(). o add_disk_randomness() o blk_queue_end_tag() o blkdev_dequeue_request() These are called in the blk_end_request interfaces as a part of generic request completion. So all device drivers become to call above functions. To decide whether to call blkdev_dequeue_request(), blk_end_request uses list_empty(&rq->queuelist) (blk_queued_rq() macro is added for it). So drivers must re-initialize it using list_init() or so before calling blk_end_request if drivers use it for its specific purpose. (Currently, there is no driver which completes request without re-initializing the queuelist after used it. So rq->queuelist can be used for the purpose above.) "Normal" drivers can be converted to use blk_end_request() in a standard way shown below. a) end_that_request_{chunk/first} spin_lock_irqsave() (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request()) end_that_request_last() spin_unlock_irqrestore() => blk_end_request() b) spin_lock_irqsave() end_that_request_{chunk/first} (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request()) end_that_request_last() spin_unlock_irqrestore() => spin_lock_irqsave() __blk_end_request() spin_unlock_irqsave() c) spin_lock_irqsave() (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request()) end_that_request_last() spin_unlock_irqrestore() => blk_end_request() or spin_lock_irqsave() __blk_end_request() spin_unlock_irqrestore() Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28SG: Convert SCSI to use scatterlist helpers for sg chainingJens Axboe1-4/+3
Also change scsi_alloc_sgtable() to just return 0/failure, since it maps to the command passed in. ->request_buffer is now no longer needed, once drivers are adapted to use scsi_sglist() it can be killed. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28SG: Move functions to lib/scatterlist.c and add sg chaining allocator helpersJens Axboe1-100/+25
Manually doing chained sg lists is not trivial, so add some helpers to make sure that drivers get it right. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28block: allow queue dma_alignment of zeroPete Wyckoff1-6/+1
Let queue_dma_alignment return 0 if it was specifically set to 0. This permits devices with no particular alignment restrictions to use arbitrary user space buffers without copying. Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28blktrace: Add blktrace ioctls to SCSI generic devicesChristof Schmitt1-2/+10
Since the SCSI layer uses the request queues from the block layer, blktrace can also be used to trace the requests to all SCSI devices (like SCSI tape drives), not only disks. The only missing part is the ioctl interface to start and stop tracing. This patch adds the SETUP, START, STOP and TEARDOWN ioctls from blktrace to the sg device files. With this change, blktrace can be used for SCSI devices like for disks, e.g.: blktrace -d /dev/sg1 -o - | blkparse -i - Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28sh: add spi header and r2d platform data V3Magnus Damm1-0/+13
This patch adds the header file asm/spi.h and board specific code for the r2d board. The header file contains a structure that should be used to point out a single spi bus. The board specific code for r2d is updated with such a structure for the new spi_sh_sci driver. The structure contains a chip select callback plus information about the R9701 rtc chip which is attached to the spi bus. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: update r7780rp interrupt codeMagnus Damm1-19/+0
This patch updates the board specific irq code for r7780rp. The new code is very similar to the other highlander implementations, with the exception that the r7780rp handles pci interrupts using IRL. To simplify the pci code and use the same interrupt numbers as r7780mp and r7785rp we hook in to the cpu specific pci vectors. The pci interrupts and the push switch all work well with and without this patch. CF and AX88796 are not ok though and the source of the problem is unknown at this point. The AX88796 does for not detect it's proper mac address (IPL gets it right) and the kernel hangs on CF access. As a workaround this patch removes the CF and the AX88796 from the platform datain case of r7780rp. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: remove consistent alloc stuff from the machine vectorMagnus Damm1-3/+0
Now with the voyagergx cruft gone and the dreamcast using declared coherent memory for pci there are no users of the consistent alloc and free functions pointers in the machine vector. So this little patch simply removes these function pointers from the macvec. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: declared coherent memory support V2Magnus Damm1-36/+20
This patch adds declared coherent memory support to the sh architecture. All functions are based on the x86 implementation. Header files are adjusted to use the new functions instead of the former consistent_alloc() code. This version includes the few changes what were included in the fix patch together with modifications based on feedback from Paul. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add support for SDK7780 board.Nicholas Beck1-0/+81
Add support for Renesas Technology Europe SDK7780 board. Signed-off-by: Nicholas Beck <nbeck@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Kill off dead HS771RVoIP board support.Paul Mundt1-54/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: r7785rp: Hook up the rest of the HL7785 FPGA IRQ vectors.Paul Mundt1-2/+12
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: remove voyagergxMagnus Damm1-341/+0
This patch removes redundant irq handling code together with unused consistent alloc code. R2D uart setup code is changed to use sm501-regs.h and unused header files are removed. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: intc - remove default interrupt priority tablesMagnus Damm1-11/+1
This patch removes interrupt priority tables from the intc code. Optimal priority assignment varies with embedded application anyway, so keeping the interrupt priority tables together with cpu-specific code doesn't make sense. The function intc_set_priority() should be used instead to set the desired interrupt priority level. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Fix posix_types.h userspace breakage from sh64 merge.Paul Mundt4-122/+265
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: sh7712 clock supportAndrew Murray1-0/+5
This patch provides specific clock support for the SH7712. Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add support for SH7763 CPU subtype.Yoshihiro Shimoda3-3/+4
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Fix get_user()/put_user() build error.Paul Mundt1-36/+28
Fixes the build error caused by -Werror on gcc 3.x compilers: arch/sh/kernel/signal_32.c: In function `sys_sigaction': arch/sh/kernel/signal_32.c:66: warning: initialization discards qualifiers from pointer target type arch/sh/kernel/signal_32.c:67: warning: initialization discards qualifiers from pointer target type arch/sh/kernel/signal_32.c:69: warning: initialization discards qualifiers from pointer target type arch/sh/kernel/signal_32.c:70: warning: initialization discards qualifiers from pointer target type The mismatch in question was introduced by commit-id 9c5a4eec79b3eb8876d2e7fddfa1e040a7650e55. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add support for SH7721 CPU subtype.Yoshihiro Shimoda7-9/+16
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Always use CONFIG_HZ for HZ.Paul Mundt1-5/+1
Currently the wdt forces HZ=1000 and sidesteps CONFIG_HZ completely. This is a remnant from when HZ was hardcoded and before CONFIG_HZ was introduced. Additionally, not all of the timers have this requirement these days, so it's also an artificial limitation. Just kill it off and use CONFIG_HZ directly. Reported-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: include/asm-sh/: Spelling fixes.Joe Perches3-17/+17
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Fix up binfmt_flat compile warnings.Paul Mundt1-1/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Kill off pgtable.h from scatterlist.h.Paul Mundt1-1/+0
Fixes up the mmc build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Fix up switch_to() type casts.Paul Mundt1-47/+47
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Stub in page_table_range_init() on nommu.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Kill off superfluous __KERNEL__ check in asm/elf.h.Paul Mundt1-3/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Provide the FPSCR init through AT_FPUCW.Paul Mundt3-2/+17
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Use utsname()->machine for ELF_PLATFORM.Paul Mundt1-6/+8
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Encode L1/L2 cache shape in auxvt.Paul Mundt3-4/+29
This adds in the L1I/L1D/L2 cache shape support to their respective entries in the ELF auxvt, based on the Alpha implementation. We use this on the userspace libc side for calculating a tightly packed SHMLBA amongst other things. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Support denormalization on SH-4 FPU.Stuart Menefy1-0/+32
Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: get_user fixes and nommu consolidation.Stuart Menefy1-155/+98
When a get_user(to, from++) is called the pointer increment is performed after its first usage, in the specific after the __add_ok invokation. This causes a wrong get_user return value, putting a wrong character in the destination variable. This patch solves the problem using a new temporary pointer. Additionally this reworks the use of the register banks, allowing for consolidation between the MMU and nommu implementations. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Document PTEL 31:29 use on PTEA-wielding parts.Stuart Menefy1-2/+3
Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Clean up places that make 29-bit physical assumptions.Stuart Menefy7-33/+60
Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Preparation for uncached jumps through PMB.Stuart Menefy5-20/+27
Presently most of the 29-bit physical parts do P1/P2 segmentation with a 1:1 cached/uncached mapping, jumping between the two to control the caching behaviour. This provides the basic infrastructure to maintain this behaviour on 32-bit physical parts that don't map P1/P2 at all, using a shiny new linker section and corresponding fixmap entry. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: GUSA atomic rollback support.Stuart Menefy8-123/+557
This implements kernel-level atomic rollback built on top of gUSA, as an alternative non-IRQ based atomicity method. This is generally a faster method for platforms that are lacking the LL/SC pairs that SH-4A and later use, and is only supportable on legacy cores. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: comment tidying for sh64->sh migration.Paul Mundt9-76/+63
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28rtc: rtc-sh: Split out the CPU defs to asm/cpu/.Paul Mundt6-0/+42
With all of the different CPU types this was getting a but unwieldly. Since sh64 is now integrated, we don't have to worry about multiple architectures caring about the header definitions. Split out the defs for each asm/cpu/ to make rtc-sh slightly less visually offensive. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: CCR1->CCR renaming for SH-2 parts.Paul Mundt2-7/+2
Avoid namespace collision with a CCR1 definition. The general SH code always expects CCR anyways, so there's no point in keeping the CCR1 naming around. Fixes up synclink collisions: drivers/char/pcmcia/synclink_cs.c:283:1: warning: "CCR1" redefined In file included from include/asm/cache.h:13, from include/asm/processor_32.h:15, from include/asm/processor.h:60, from include/linux/prefetch.h:14, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/char/pcmcia/synclink_cs.c:38: include/asm/cpu/cache.h:21:1: warning: this is the location of the previous definition Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Bump up ARCH_KMALLOC_MINALIGN for DMA cases.Paul Mundt1-13/+9
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Invalidate the TLB after applying PMB mappings.Stuart Menefy1-0/+2
Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: SH-2A FPU support.Paul Mundt3-1/+6
Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add SH7263 CPU support.Paul Mundt2-2/+2
This adds support for the SH7263 (SH-2A) CPU. This particular CPU is a superset of SH7203, adding some additional peripheral blocks and hooking up additional (reserved on SH7203) vectors in the INTC block. No visibly nasty surprises, yet.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add SH7203 CPU support.Paul Mundt3-4/+2
This adds support for the SH7203 (SH-2A) CPU. Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: syscall audit support.Yuichi Nakamura1-0/+2
Support syscall auditing.. Signed-off-by: Yuichi Nakamura <ynakam@hitachisoft.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Fix up bug trap handler build for sh32.Paul Mundt1-1/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>