summaryrefslogtreecommitdiff
path: root/drivers/vbus
AgeCommit message (Collapse)Author
2009-12-08ioq: clearly specify endiannessIra W. Snyder
The IOQ code uses structures which are designed to be shared between disparate systems, such as 32-bit and 64-bit, as well as Linux and Windows. Since IOQ is primarily intended to be used by qemu/kvm, which support virtual guests with a different CPU architecture than the host, clearly define the endianness for the shared structures. The endianness is defined to be little-endian, to avoid byte swapping in the most common case: x86. Note that the cookie member was not changed to have a fixed endianness. This is because it is only intended for use by one side of the IOQ. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
2009-12-08vbus: fix lots of sparse "dubious signed bitfield" warningsIra W. Snyder
The sparse utility gave tons of warnings about signed bitfields. A simple inspection shows that they are all used as booleans, so convert them to the correct type. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
2009-12-08vbus: pci-bridge: fix sparse warningsIra W. Snyder
The sparse tool caught many missing static declarations. Add them. There are still many address space errors, but I'm unsure about the best way to fix these. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
2009-12-07vbus: fix pcibridge busmaster supportGregory Haskins
We should technically enable the busmaster bit, even though its not actually used on the host side Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: add autoprobe capability to guestGregory Haskins
This enables the guest to automatically load the appropriate driver when vbus devices are detected. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: remove create_irq() references from the pcibridgeGregory Haskins
We cannot rely on create_irq() being available in all circumstances, therefore lets remove it from the code for now until we can figure out a way to support it with config options. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07fix irq resource leakGregory Haskins
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07Eliminate all cast warnings in vbus-enet.c and pci-bridge.c.Randy Dunlap
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: fix kmalloc() from interrupt context to use GFP_ATOMICGregory Haskins
DEVADD events currently perform a GFP_KERNEL allocation for the device object in interrupt context. This is technically illegal, although we have gotten away with it to date by sheer luck that the allocation never tried to swap or otherwise sleep. Lets fix this properly by making sure that we only allocated the space for the device object using GFP_KERNEL from process-context. We achieve this by generating a temporary GFP_ATOMIC relay for the event and deferring the actual device allocation/registration to process context. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: register shm-signal events as standard Linux IRQ vectorsGregory Haskins
This will allow us to view the vector statistics in a uniform way, as well as pave the way for supporting irqbalance in the future. The VBUS PCI-BRIDGE will present itself as an irqchip device to the kernel proper. Each shm-signal that is created by a specific driver will show up as a "VBUS-edge" IRQ in /proc/interrupts. For instane, here is example output from running a venet device as "eth1" (see vectors 28-31): vbus-guest:/home/ghaskins # cat /proc/interrupts CPU0 0: 89 IO-APIC-edge timer 1: 6 IO-APIC-edge i8042 4: 1620 IO-APIC-edge serial 6: 2 IO-APIC-edge floppy 7: 0 IO-APIC-edge parport0 8: 0 IO-APIC-edge rtc0 9: 0 IO-APIC-fasteoi acpi 10: 0 IO-APIC-fasteoi virtio1 12: 90 IO-APIC-edge i8042 14: 3474 IO-APIC-edge ata_piix 15: 7778 IO-APIC-edge ata_piix 24: 185849 PCI-MSI-edge vbus 25: 0 PCI-MSI-edge virtio0-config 26: 210 PCI-MSI-edge virtio0-input 27: 28 PCI-MSI-edge virtio0-output 28: 167062 VBUS-edge eth1-evq 29: 0 VBUS-edge eth1-pageq 30: 161593 VBUS-edge eth1-rx 31: 0 VBUS-edge eth1-tx NMI: 0 Non-maskable interrupts LOC: 72010 Local timer interrupts SPU: 0 Spurious interrupts CNT: 0 Performance counter interrupts PND: 0 Performance pending work RES: 0 Rescheduling interrupts CAL: 0 Function call interrupts TLB: 0 TLB shootdowns TRM: 0 Thermal event interrupts THR: 0 Threshold APIC interrupts MCE: 0 Machine check exceptions MCP: 20 Machine check polls ERR: 0 MIS: 0 Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: allow shmsignals to be namedGregory Haskins
This will allow the signals to be displayed to the end-user in some meaningful way later in the series, such as for statistics, etc. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: Fix section mismatch warnings in pci-bridge.cRakib Mullick
The functions vbus_pci_open, _ioq_init, eventq_init, vbus_pci_eventq_register are annoted with __init and referenced from a function __devinit vbus_pci_probe, which causes a section mismatch.So annote those functions with __devinit. We were warned by the following warnings: LD drivers/vbus/vbus-pcibridge.o WARNING: drivers/vbus/vbus-pcibridge.o(.devinit.text+0x19e): Section mismatch in reference from the function vbus_pci_probe() to the function .init.text:vbus_pci_open() The function __devinit vbus_pci_probe() references a function __init vbus_pci_open(). If vbus_pci_open is only used by vbus_pci_probe then annotate vbus_pci_open with a matching annotation. WARNING: drivers/vbus/vbus-pcibridge.o(.devinit.text+0x1f4): Section mismatch in reference from the function vbus_pci_probe() to the function .init.text:_ioq_init() The function __devinit vbus_pci_probe() references a function __init _ioq_init(). If _ioq_init is only used by vbus_pci_probe then annotate _ioq_init with a matching annotation. WARNING: drivers/vbus/vbus-pcibridge.o(.devinit.text+0x240): Section mismatch in reference from the function vbus_pci_probe() to the function .init.text:eventq_init() The function __devinit vbus_pci_probe() references a function __init eventq_init(). If eventq_init is only used by vbus_pci_probe then annotate eventq_init with a matching annotation. WARNING: drivers/vbus/vbus-pcibridge.o(.devinit.text+0x45a): Section mismatch in reference from the function vbus_pci_probe() to the function .init.text:vbus_pci_eventq_register() The function __devinit vbus_pci_probe() references a function __init vbus_pci_eventq_register(). If vbus_pci_eventq_register is only used by vbus_pci_probe then annotate vbus_pci_eventq_register with a matching annotation. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus-proxy also uses ioq, so it should select IOQ.Randy Dunlap
When CONFIG_VBUS_PROXY=[ym] and VBUS_PCIBRIDGE=n: ERROR: "ioq_init" [drivers/vbus/vbus-proxy.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07ioq: add driver-side vbus helpersGregory Haskins
It will be a common pattern to map an IOQ over the VBUS shared-memory interfaces. Therefore, we provide a helper function to generalize the allocation and registration of an IOQ to make this use case simple and easy. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus-proxy: add a pci-to-vbus bridgeGregory Haskins
This patch adds a pci-based bridge driver to interface between the a host VBUS and the guest's vbus-proxy bus model. It completes the guest side notion of a "vbus-connector", and requires a cooresponding host-side connector (in this case, the pci-bridge model) to comlete the connection. Signed-off-by: Gregory Haskins <ghaskins@novell.com>
2009-12-07vbus: add a "vbus-proxy" bus model for vbus_driver objectsGregory Haskins
This will generally be used for hypervisors to publish any host-side virtual devices up to a guest. The guest will have the opportunity to consume any devices present on the vbus-proxy as if they were platform devices, similar to existing buses like PCI. Signed-off-by: Gregory Haskins <ghaskins@novell.com>