aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-10-23[SCSI] sym53c8xx: Remove pci_dev pointer from sym_shcbMatthew Wilcox
This structure is accessed by the device; the fewer Linux things in it, the better. Using the pci_dev pointer from the hostdata requires a lot of changes: - Pass Scsi_Host to a lot of routines which currently take a sym_hcb. - Set the Scsi_Host as the pci drvdata (instead of the sym_hcb) Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONEMatthew Wilcox
Make sym_interrupt return an irqreturn_t instead of void, and take a Scsi_Host instead of a sym_hcb. Pass the Scsi_Host to the interrupt handler instead of the sym_hcb. Rename the host_data to sym_data. Keep a pci_dev pointer in the sym_data. Rename the Scsi_Host from instance to shost. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Get rid of IRQ_FMT and IRQ_PRMMatthew Wilcox
These macros aren't needed any more. They used to be used for SPARC. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Use scmd_printk where appropriateMatthew Wilcox
If we have a scsi_cmnd, it gives the user more information than the sym_name, and maybe the target. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Simplify DAC DMA handlingMatthew Wilcox
By introducing the use_dac(), set_dac() and DMA_DAC_MASK macros, we can eliminate a lot of ifdefs from the code. We now rely on the compiler to optimise away a few things that we'd formerly relied on the preprocessor to do. This makes sym_setup_bus_dma_mask() small enough to inline into its only caller. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Remove tag_ctrl module parameterMatthew Wilcox
With sysfs making these options tunable at runtime, there's no justification for keeping this horrendously complex specification string around. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Remove io_ws, mmio_ws and ram_ws elementsMatthew Wilcox
These struct elements record info that is never needed Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Remove ->device_idMatthew Wilcox
Following the same path as ->revision_id, remove ->device_id Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Use pdev->revisionMatthew Wilcox
Auke missed the sym2 driver in his initial sweep. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: PCI Error Recovery supportLinas Vepstas
This patch adds the PCI error recovery callbacks to the Symbios SCSI device driver. It includes support for First Failure Data Capture. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Assorted changes to initial patches, including returning IRQ_NONE from the interrupt handler if the device is offline and re-using the eh_done completion in the scsi error handler. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Stop overriding scsi_doneMatthew Wilcox
Instead of telling the reset routine that the command completed from sym_eh_done, do it from sym_xpt_done. The 'to_do' element of the ucmd is redundant -- it serves only to tell whether eh_done is valid or not, and we can tell this by checking to see if it's NULL. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Don't disable interrupts in the interrupt handlerMatthew Wilcox
Interrupts can't be re-entered, so it's sufficient to call spin_lock, not spin_lock_irqsave(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Remove unnecessary check in queuecommandMatthew Wilcox
The midlayer won't scan the host ID, so we don't need to check. This is the only caller of sym_xpt_done2, so remove that too. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Remove data_mapping and data_mappedMatthew Wilcox
Before all commands used sg, data_mapping and data_mapped were used to distinguish whether the command had used map_single or map_sg. Now all commands are sg, so we can delete data_mapping, data_mapped and the wrapper functions __unmap_scsi_data, __map_scsi_sg_data, unmap_scsi_data and map_scsi_sg_data. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Use pci_dev irq numberMatthew Wilcox
Don't cache a private copy of the interrupt number Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[SCSI] sym53c8xx: Work around 53c896 erratumKai Makisara
Prevent DMA transfers from crossing the 16MB limit for early 53c896 chips. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23[PATCH] Fix breakage after SG cleanupsRalf Baechle
Commits 58b053e4ce9d2fc3023645c1b96e537c72aa8d9a ("Update arch/ to use sg helpers") 45711f1af6eff1a6d010703b4862e0d2b9afd056 ("[SG] Update drivers to use sg helpers") fa05f1286be25a8ce915c5dd492aea61126b3f33 ("Update net/ to use sg helpers") converted many files to use the scatter gather helpers without ensuring that the necessary headerfile <linux/scatterlist> is included. This happened to work for ia64, powerpc, sparc64 and x86 because they happened to drag in that file via their <asm/dma-mapping.h>. On most of the others this probably broke. Instead of increasing the header file spider web I choose to include <linux/scatterlist.h> directly into the affectes files. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23mmc: fix sg->page falloutEmil Medve
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: mlx4_core: Increase command timeout for INIT_HCA to 10 seconds IPoIB/cm: Use common CQ for CM send completions IB/uverbs: Fix checking of userspace object ownership IB/mlx4: Sanity check userspace send queue sizes IPoIB: Rewrite "if (!likely(...))" as "if (unlikely(!(...)))" IB/ehca: Enable large page MRs by default IB/ehca: Change meaning of hca_cap_mr_pgsize IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr() IB/ehca: Fix masking error in {,re}reg_phys_mr() IB/ehca: Supply QP token for SRQ base QPs IPoIB: Use round_jiffies() for ah_reap_task RDMA/cma: Fix deadlock destroying listen requests RDMA/cma: Add locking around QP accesses IB/mthca: Avoid alignment traps when writing doorbells mlx4_core: Kill mlx4_write64_raw()
2007-10-23[SCSI] qla1280: eliminate wasted space in request and response ringJohannes Dickgreber
i think there is wasted space in allocated pages for request and response rings. The allocations are made with REQUEST_ENTRY_CNT + 1 and RESPONSE_ENTRY_CNT + 1, but they are set with 256 and 16. So we got more pages, which we dont use very much so eliminate them. Signed-off-by: Johannes Dickgreber <tanzy@gmx.de> Acked-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguestLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: (45 commits) Use "struct boot_params" in example launcher Loading bzImage directly. Revert lguest magic and use hook in head.S Update lguest documentation to reflect the new virtual block device name. generalize lgread_u32/lgwrite_u32. Example launcher handle guests not being ready for input Update example launcher for virtio Lguest support for Virtio Remove old lguest I/O infrrasructure. Remove old lguest bus and drivers. Virtio helper routines for a descriptor ringbuffer implementation Module autoprobing support for virtio drivers. Virtio console driver Block driver using virtio. Net driver using virtio Virtio interface Boot with virtual == physical to get closer to native Linux. Allow guest to specify syscall vector to use. Rename "cr3" to "gpgdir" to avoid x86-specific naming. Pagetables to use normal kernel types ...
2007-10-23Merge git://git.infradead.org/mtd-2.6Linus Torvalds
* git://git.infradead.org/mtd-2.6: [MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursion [JFFS2] Fix return value from jffs2_write_end() [MTD] [OneNAND] Fix wrong free the static address in onenand_sim [MTD] [NAND] Replace -1 with -EBADMSG in nand error correction code [RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16() [MTD] [NAND] treat any negative return value from correct() as an error [MTD] [NAND] nandsim: bugfix in initialization [MTD] Fix typo in Alauda config option help text. [MTD] [NAND] add s3c2440-specific read_buf/write_buf [MTD] [OneNAND] onenand-sim: fix kernel-doc and typos [JFFS2] Tidy up fix for ACL/permissions problem.
2007-10-23Merge branch 'sg' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'sg' of git://git.kernel.dk/linux-2.6-block: sparc64: zero out dma_length fvr32: fixup dma-mapping for new sg layout sh/sh64: fixup dma-mapping for new sg layout Fix sctp compile m68knommu: remove sg_address() frv: update comment in scatterlist to reflect new setup blackfin: remove sg_address() arm: sg fallout mips: sg_page() fallout alpha: sg_virt() fallout intel-iommu: fix sg_page() parisc: fix sg_page() fallout ide: build fix net: fix xfrm build - missing scatterlist.h include [BLOCK] blk_rq_map_sg: force clear termination bit [BLOCK] Don't clear sg_dma_len/addr() in blk_rq_map_sg() s390 zfcp: sg fixups powerpc: Fix fallout from sg_page() changes IB/ehca: Fix sg_page() fallout arm: build fix
2007-10-23m68knommu: new style ColdFire UART driverGreg Ungerer
A new style serial driver for the Freescale ColdFire UART to replace the old style one currently in the tree (drivers/serial/mcfserial.c). Currently this UART is only found in the ColdFire CPU family of parts (thus I prefixed this patch [M68KNOMMU]). This has been around for a long while now, tested on all available platforms. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23m68knommu: improve mii_do_cmd code in FEC driverPhilippe De Muyter
Improve the readability of mii_do_cmd(). Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23m68knommu: improve code formating FEC driverPhilippe De Muyter
Indent all the `else' the same way. Remove some unecesary white space. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23Char: cyclades, fix potential NULL dereferenceJiri Slaby
ztxdone is jumped to even if tty is NULL and tty_wakeup placed after this label doesn't expect NULLed parameter, so this will cause an oops in some situations (why they scheduled a wakeup there before remove bottom half processing patch?). wakeup only in the case when we have non-null tty struct. Spotted by Adrian Bunk. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23md: raid5: fix clearing of biofill operationsDan Williams
ops_complete_biofill() runs outside of spin_lock(&sh->lock) and clears the 'pending' and 'ack' bits. Since the test_and_ack_op() macro only checks against 'complete' it can get an inconsistent snapshot of pending work. Move the clearing of these bits to handle_stripe5(), under the lock. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Joel Bertrand <joel.bertrand@systella.fr> Signed-off-by: Neil Brown <neilb@suse.de> Cc: Stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23md: fix an unsigned compare to allow creation of bitmaps with v1.0 metadataNeilBrown
As page->index is unsigned, this all becomes an unsigned comparison, which almost always returns an error. Signed-off-by: Neil Brown <neilb@suse.de> Cc: Stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23mv643xx_eth: Remove obsolete checksum offload commentDale Farnsworth
We fixed checksum offload a while back. Remove the note that it doesn't work. Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Merge drivers/net/mv643xx_eth.h into mv643xx_eth.cLennert Buytenhek
Since drivers/net/mv643xx_eth.c is the only user of drivers/net/mv643xx_eth.h, there's not much use in having the header file as a separate file, so merge the header into the driver. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Remove unused register definesLennert Buytenhek
Most of the register defines in drivers/net/mv643xx_eth.h aren't used at all. Nuke them -- we can always re-add them if/when we need them, and meanwhile, they unnecessarily clutter up the header file. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Clean up mv643xx_eth.hLennert Buytenhek
Apply the following cleanups to drivers/net/mv643xx_eth.h: * Change "#define<tab>" to "#define<space>". * Fix comment block style. * Wrap lines to fit in 80 columns. * Change "foo<<1" to "foo << 1". * Align addresses in the same column. * Parenthesize macro arguments. * Replace "(1<<24) | (1<<23) | (1<<22)" type constructs with "(7 << 22)". Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Remove MV643XX_ETH_ register prefixLennert Buytenhek
Now that all register address and bit defines are in private namespace (drivers/net/mv643xx_eth.h), we can safely remove the MV643XX_ETH_ prefix to conserve horizontal space. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Remove SHARED_REGS register address biasLennert Buytenhek
Start counting mv643xx_eth register addresses from zero, instead of from 0x2000 (MV643XX_ETH_SHARED_REGS.) Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Enable use on Orion platformsLennert Buytenhek
Allow Orion ARM platforms to use the mv643xx_eth driver. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Disable RX/TX byte swapping on little-endian systemsLennert Buytenhek
On little-endian systems, configure the SDMA unit with MV643XX_ETH_BLM_RX_NO_SWAP and MV643XX_ETH_BLM_TX_NO_SWAP. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23mv643xx_eth: Move ethernet register definitions into private headerLennert Buytenhek
Move the mv643xx's ethernet-related register definitions from include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since they aren't of any use outside the ethernet driver. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2007-10-23[MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursionAlexey Korolev
This patch solves kernel deadlock issue seen on JFFF2 simultaneous operations. Detailed investigation of the issue showed that the kernel deadlock is caused by tons of recursive get_chip calls. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-23intel-iommu: fix sg_page()FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23parisc: fix sg_page() falloutFUJITA Tomonori
arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_map_sg': arch/parisc/kernel/pci-dma.c:487: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_unmap_sg': arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_cpu': arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_device': arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23ide: build fixFUJITA Tomonori
git-drivers/ide/ide-probe.c: In function 'hwif_init': drivers/ide/ide-probe.c:1327: error: implicit declaration of function 'sg_init_table' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23s390 zfcp: sg fixupsJens Axboe
Based on initial patch from Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23powerpc: Fix fallout from sg_page() changesOlof Johansson
Fix fallout from 18dabf473e15850c0dbc8ff13ac1e2806d542c15: In file included from include/linux/dma-mapping.h:52, from drivers/base/dma-mapping.c:10: include/asm/dma-mapping.h: In function 'dma_map_sg': include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page' include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page' include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page' include/asm/dma-mapping.h:289: error: 'struct scatterlist' has no member named 'page' include/asm/dma-mapping.h:290: error: 'struct scatterlist' has no member named 'page' include/asm/dma-mapping.h: In function 'dma_sync_sg_for_cpu': include/asm/dma-mapping.h:331: error: 'struct scatterlist' has no member named 'page' drivers/scsi/ps3rom.c: In function 'fetch_to_dev_buffer': drivers/scsi/ps3rom.c:150: error: 'struct scatterlist' has no member named 'page' Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23IB/ehca: Fix sg_page() falloutOlof Johansson
More fallout from sg_page changes: drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1': drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page' drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate': drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page' drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2': drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page' Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23generalize lgread_u32/lgwrite_u32.Rusty Russell
Jes complains that page table code still uses lgread_u32 even though it now uses general kernel pte types. The best thing to do is to generalize lgread_u32 and lgwrite_u32. This means we lose the efficiency of getuser(). We could potentially regain it if we used __copy_from_user instead of copy_from_user, but I'm not certain that our range check is equivalent to access_ok() on all platforms. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Jes Sorensen <jes@sgi.com>
2007-10-23Lguest support for VirtioRusty Russell
This makes lguest able to use the virtio devices. We change the device descriptor page from a simple array to a variable length "type, config_len, status, config data..." format, and implement virtio_config_ops to read from that config data. We use the virtio ring implementation for an efficient Guest <-> Host virtqueue mechanism, and the new LHCALL_NOTIFY hypercall to kick the host when it changes. We also use LHCALL_NOTIFY on kernel addresses for very very early console output. We could have another hypercall, but this hack works quite well. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Remove old lguest I/O infrrasructure.Rusty Russell
This patch gets rid of the old lguest host I/O infrastructure and replaces it with a single hypercall "LHCALL_NOTIFY" which takes an address. The main change is the removal of io.c: that mainly did inter-guest I/O, which virtio doesn't yet support. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Remove old lguest bus and drivers.Rusty Russell
This gets rid of the lguest bus, drivers and DMA mechanism, to make way for a generic virtio mechanism. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Virtio helper routines for a descriptor ringbuffer implementationRusty Russell
These helper routines supply most of the virtqueue_ops for hypervisors which want to use a ring for virtio. Unlike the previous lguest implementation: 1) The rings are variable sized (2^n-1 elements). 2) They have an unfortunate limit of 65535 bytes per sg element. 3) The page numbers are always 64 bit (PAE anyone?) 4) They no longer place used[] on a separate page, just a separate cacheline. 5) We do a modulo on a variable. We could be tricky if we cared. 6) Interrupts and notifies are suppressed using flags within the rings. Users need only get the ring pages and provide a notify hook (KVM wants the guest to allocate the rings, lguest does it sanely). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Dor Laor <dor.laor@qumranet.com>