summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-13powerpc/sysfs: disable hotplug for the boot cpuZhao Chenhui
Some features depend on the boot cpu, for instance, hibernate/suspend. So disable hotplug for the boot cpu. Change-Id: I1e582c4b3d7d243e9fb04dab3174da21a2e25b94 Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2457 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-13powerpc/pm: fix the return value of .enter()Zhao Chenhui
Change-Id: If7505a718c9a76b26eb8ea80c82bb0f4d2742192 Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2456 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-13fsl/b4860: For sRIO,LIODN register is not in GUTS block anymorePoonam Aggrwal
In case of B4 LIODN regsiter for sRIO is not in GUTs block but in the sRIO register space. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Change-Id: I88e92aec7f1125fa7d2ad1113d97afacc1dfeebc Reviewed-on: http://git.am.freescale.net:8181/2453 Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-13dpaa_eth: change init sequence so that TX port is before RX portMandy Lavi
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> ENGR00261278 VSP init sequence expects TX port to be initialized prior RX port Change-Id: I72f0e35d935de15647fa28a975cd89f04151fefd Reviewed-on: http://git.am.freescale.net:8181/2448 Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10asf: Kconfig: Enabling NAT options when ASF is enabled.Sunil Kumar Kori
Change-Id: Ibfb42b0b05a7b33d16a1ca64d57c343da919fdc9 Signed-off-by: Sunil Kumar Kori <Sunil.Kori@freescale.com> CR:ENGR00261559 Reviewed-on: http://git.am.freescale.net:8181/2404 Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10Put the qemu_e500_pci check under CONFIG_PPC_QEMU_E500 check.Varun Sethi
Check for qemu_e500_pci flag only if QEMU E500 platform has been enabled. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Change-Id: I7eacf87bccbd9442c76c851eb185f9b352b00905 Reviewed-on: http://git.am.freescale.net:8181/2439 Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10powerpc: disable CONFIG_SUSPEND in e6500rev1 defconfigHaiying Wang
Current DPAA modules don't support HOTPLUG_CPU, disable CONFIG_SUSPEND so that CONFIG_HOTPLUG_CPU won't be selected. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I8561f50a428700b39d9f6621c7440f0be39d5bea Reviewed-on: http://git.am.freescale.net:8181/2440 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10powerpc/config: enable 913x configs for guest kernelsStuart Yoder
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Change-Id: If7be6559a454552892b9111f61076b51d147bd30 Reviewed-on: http://git.am.freescale.net:8181/2438 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10Subject: [PATCH v5] Support for dummy vfio iommu driver.Varun Sethi
This is primarily required for supporting vfio direct device assignment on platforms that don't have a hardware IOMMU. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Change-Id: Id3e968a7c4110fe392354b053112e2dc083adebd Reviewed-on: http://git.am.freescale.net:8181/2401 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Bhushan Bharat-R65777 <Bharat.Bhushan@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10T4/B4: add aliases for usb nodesLaurentiu Tudor
Add usb aliases for consistency with the other platforms. Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com> Change-Id: I47e50a23ba4eef4e58abe6d65532664f3b25fcb5 Reviewed-on: http://git.am.freescale.net:8181/2418 Reviewed-by: Leekha Shaveta-B20052 <shaveta@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10offline_port: Add support for enabling IP Fragmentation in the O/H port driverRadu Bulie
In order to enable fragmentation on an offline port, a chosen node should be configured in dt for that specific port with two parameters: manip_extra_space and data_align. In addition external buffer pools must be set for the O/H port in the dts file (e.g: fsl,bman-buffer-pools = <&bp8>;). A bool flag is transmited to dpaa_eth_init_port (used further in FMD wrapper) macro whether or not fragmentation was enabled. For the dpaa_eth module this flag must be set to false.(FMD frag support is only available on O/H ports). Change-Id: Ifb01b2feebab9199cc0f72b611ce212061d0a7e2 Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2261 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10i2c/rtc-ds3232: Fix irq for probingYork Sun
Driver shouldn't request irq when irq = 0. It is returned from parsing device tree. 0 means no interrupt. Signed-off-by: York Sun <yorksun@freescale.com> Change-Id: I6d93228f71733bfefa4bf799833416727da64468 Reviewed-on: http://git.am.freescale.net:8181/2355 Reviewed-by: Zang Tiefei-R61911 <tie-fei.zang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10fsl_qbman: fix the non-SMP buildGeoff Thorpe
The <linux/smp.h> header only includes <asm/smp.h> if CONFIG_SMP is defined, yet it is required in the non-SMP case too. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: I0644bca53a0afeb3eb331956f7e4b20959f2a3d6 Reviewed-on: http://git.am.freescale.net:8181/2419 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10dpaa_eth: fix the non-SMP buildGeoff Thorpe
The <linux/smp.h> header only includes <asm/smp.h> if CONFIG_SMP is defined, yet it is required in the non-SMP case too. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: I4b6522b2cdc302d2dc58ae2326d35a54171551df Reviewed-on: http://git.am.freescale.net:8181/2417 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10fmd: restore original dtsec AutoNeg settingsMandy Lavi
Restoring the autonegotiation settings as they were implemented in the previously removed DtsecRestartTbiAN() now implemented via FM_MAC_RestartAutoneg() Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Change-Id: I8c7412dfc86048c7134bf8ae2edcbf555b7c2242 Reviewed-on: http://git.am.freescale.net:8181/2294 Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com> Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10powerpc: Add I2C bus multiplexer node for B4 and T4240QDSJia Hongtao
In both B4 and T4240QDS platform PCA9547 I2C bus multiplexer is used. Change-Id: I7321bd326ef60b0462eb1faacacd52cdbd529448 Reviewed-on: http://git.am.freescale.net:8181/2414 Reviewed-by: Li Yang-R58472 <LeoLi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10powerpc/mpc85xx: Update the clock device tree nodes for B4Tang Yuantian
Update the clockgen node in dts for B4420QDS and B4860QDS. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Change-Id: I13c8216a0bc1b750897c0343211fc6f57b991c60 Reviewed-on: http://git.am.freescale.net:8181/2397 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Li Yang-R58472 <LeoLi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-10powerpc/fsl: add property 'reg' to pcie@0 nodeMinghuan Lian
The property 'reg' is used to identify the PCIe device. if there is no 'reg' the PCI driver can not find PCI device node corresponding to PCI controller, and can not map the interrupts. So all the INTx interrupts can not be used. Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Change-Id: Ibdb61b288964c8d8639671199b2e0cda88857653 Reviewed-on: http://git.am.freescale.net:8181/2410 Reviewed-by: Zang Tiefei-R61911 <tie-fei.zang@freescale.com> Reviewed-by: Xie Shaohui-B21989 <Shaohui.Xie@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-09p5040ds-usdpaa: increase the buffer size to 1728Haiying Wang
Because the BSM is increased to 128 bytes by default. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I656a6a5d5dd2bf39fd95ffb45829fd84dbf6ddb1 Reviewed-on: http://git.am.freescale.net:8181/2383 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-08usdpaa: add b44240qds usdpaa device treeHaiying Wang
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I3dcdc23e350e16eeb0c85647e5b283d773df9cfb Reviewed-on: http://git.am.freescale.net:8181/2406 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-08powerpc/85xx: Add compatible string to parent deviceChunhe Lan
P1023RDB uses the FMan module. If it does not have the dpaa compatible, our probing function is not called at boot-time. So use this patch, FMan network is okey. Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com> Change-Id: I368af157f95f53b0cfb5f6f82cdad2b14c9829cb Reviewed-on: http://git.am.freescale.net:8181/2396 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-08Enable CONFIG_DEVTMPFS_MOUNT to ensure /dev can be mounted correctlyZhenhua Luo
When using recent udev, the /dev node mount requires CONFIG_DEVTMPFS_MOUNT is enabled in Kernel. The patch enables the option in defconfig of Freescale QorIQ targets. Changed defconfig list: arch/powerpc/configs/mpc85xx_defconfig Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Change-Id: I5b9e83bafd0aca68528aebd0ad79b5ff5d36218e Reviewed-on: http://git.am.freescale.net:8181/2403 Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-07Merge remote-tracking branch 'fslkvm/for-sdk1.4' into verifyAndy Fleming
2013-05-07Check of qemu emulated PCI controller.Varun Sethi
While implementing direct device assignment for linux guest using identity mapped memory (1:1 guest to host physical mapping), we hit a case where guest end of memory is not a power of two and thus is not completely mapped by the PCI controller inbound window. For a similar condition if the PCI controller supports PCI express capability the fsl_pci driver allows for over commit of inbound memory window. In this patch we introduce a check to see if the PCI controller is a qemu emulated controller. If it's an emulated controller we allow the inbound memory over commit in the fsl_pci driver. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Change-Id: I6dd7e5fb960a2ec068dd4f01c51906a7a1dea1f7 Reviewed-on: http://git.am.freescale.net:8181/2357 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-07gianfar: asf: Fixes crash in IPv6 fwd in min modeSunil Kumar Kori
In asf minimal mode, when first recieved skb is transmitted by Linux then skb was not getting recycled and when the same skb was used again then the kernel gives a bug on. This patch recycles the skb before adding to RX BD ring. Signed-off-by: Sunil Kumar Kori <Sunil.Kori@freescale.com> Change-Id: I3a880b3b6d84cd1954972f497041626137711df0 Reviewed-on: http://git.am.freescale.net:8181/2326 Reviewed-by: Garg Vakul-B16394 <vakul@freescale.com> Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-07fsl/usb: Resolve PHY_CLK_VLD instability issue for ULPI phyRamneek Mehresh
For controller versions greater than 1.6, setting ULPI_PHY_CLK_SEL bit when USB_EN bit is already set causes instability issues with PHY_CLK_VLD bit. So USB_EN is set only for IP controller version below 1.6 before setting ULPI_PHY_CLK_SEL bit Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Change-Id: I2fe723371dfb0a1993c58b8f3594a967ebd8c2b5 Reviewed-on: http://git.am.freescale.net:8181/2345 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-07Powerpc: Add eSDHC support to defconfigsHaijun.Zhang
Add esdhc support to generic cpu default config files Config file changed: 85xx/e6500rev1_defconfig corenet32_smp_defconfig corenet64_smp_defconfig Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com> Change-Id: I3d704e893a647f7f3cc27dd5b34b232cb26da4a2 Reviewed-on: http://git.am.freescale.net:8181/2375 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-07dpa_stats: added missing header dependency for qman_fq structureAurelian Zanoschi
The DPA Stats component uses the qman_fq structure from QMan. This structure uses rb_node defined in rbtree.h, but doesn't include it, so it was needed to include rbtree.h or module.h into dpa_stats. The DPA Stats component uses the qman_fq structure from QMan. This structure uses rb_node defined in rbtree.h, but doesn't include it, so it was needed to include rbtree.h or module.h into dpa_stats. Change-Id: I79caee058a7a0a4849cfd1827ff7fdb50d4d8d75 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2338 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-06powerpc/sata: add workaround for erratum A-005636Shaohui Xie
When NCQ is enabled, the SATA controller does not support DMA setup FIS with autoactivate enabled from the device. The SATA host may timeout without finishing the transaction. This will have a minor performance impact as disabling the auto-activate feature requires the device to send a DMA setup as well as a DMA activate FIS to enable reception of the first data FIS. Software will set a flag and check if device enables DMA AA by default, then driver will: 1. Disable the DMA setup auto-activate feature by a set features command. 2. if 1# fail, then disable NCQ by setting the queue depth to one. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Change-Id: Icd5b9811eb4cb8342532c5c6238282b6c42cc7fa Reviewed-on: http://git.am.freescale.net:8181/2226 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-02kvm/ppc/mpic: fix missing unlock in set_base_addr()Wei Yongjun
Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC emulation) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/writeScott Wood
These functions do an srcu_dereference without acquiring the srcu lock themselves. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: remove usersScott Wood
This is an unused (no pun intended) leftover from when this code did reference counting. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: fix mmio region lists when multiple guests usedScott Wood
Keeping a linked list of statically defined objects doesn't work very well when we have multiple guests. :-P Switch to an array of constant objects. This fixes a hang when multiple guests are used. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: remove struct list_head from mem_reg] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: remove default routes from documentationScott Wood
The default routes were removed from the code during patchset respinning, but were not removed from the documentation. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: Eliminate mmio_mappedScott Wood
We no longer need to keep track of this now that MPIC destruction always happens either during VM destruction (after MMIO has been destroyed) or during a failed creation (before the fd has been exposed to userspace, and thus before the MMIO region could have been registered). Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm: destroy emulated devices on VM exitScott Wood
The hassle of getting refcounting right was greater than the hassle of keeping a list of devices to destroy on VM exit. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02KVM: IA64: Carry non-ia64 changes into ia64Alexander Graf
We changed a few things in non-ia64 code paths. This patch blindly applies the changes to the ia64 code as well, hoping it proves useful in case anyone revives the ia64 kvm code. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02KVM: PPC: MPIC: Restrict to e500 platformsAlexander Graf
The code as is doesn't make any sense on non-e500 platforms. Restrict it there, so that people don't get wrong ideas on what would actually work. This patch should get reverted as soon as it's possible to either run e500 guests on non-e500 hosts or the MPIC emulation gains support for non-e500 modes. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02KVM: PPC: MPIC: Add support for KVM_IRQ_LINEAlexander Graf
Now that all pieces are in place for reusing generic irq infrastructure, we can copy x86's implementation of KVM_IRQ_LINE irq injection and simply reuse it for PPC, as it will work there just as well. [stuart: removed line_status argument from kvm_vm_ioctl_irq_line and kvm_set_irq] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02KVM: PPC: Support irq routing and irqfd for in-kernel MPICAlexander Graf
Now that all the irq routing and irqfd pieces are generic, we can expose real irqchip support to all of KVM's internal helpers. This allows us to use irqfd with the in-kernel MPIC. Signed-off-by: Alexander Graf <agraf@suse.de> Conflicts: arch/powerpc/include/uapi/asm/kvm.h [stuart: removed line_status_arg from mpic_set_irq and kvm_set_msi] Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
2013-05-02kvm/ppc/mpic: add KVM_CAP_IRQ_MPICScott Wood
Enabling this capability connects the vcpu to the designated in-kernel MPIC. Using explicit connections between vcpus and irqchips allows for flexibility, but the main benefit at the moment is that it simplifies the code -- KVM doesn't need vm-global state to remember which MPIC object is associated with this vm, and it doesn't need to care about ordering between irqchip creation and vcpu creation. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: add stub functions for kvmppc_mpic_{dis,}connect_vcpu] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: in-kernel MPIC emulationScott Wood
Hook the MPIC code up to the KVM interfaces, add locking, etc. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: add stub function for kvmppc_mpic_set_epr, non-booke, 64bit] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: adapt to kernel style and environmentScott Wood
Remove braces that Linux style doesn't permit, remove space after '*' that Lindent added, keep error/debug strings contiguous, etc. Substitute type names, debug prints, etc. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: remove some obviously unneeded codeScott Wood
Remove some parts of the code that are obviously QEMU or Raven specific before fixing style issues, to reduce the style issues that need to be fixed. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm/ppc/mpic: import hw/openpic.c from QEMUScott Wood
This is QEMU's hw/openpic.c from commit abd8d4a4d6dfea7ddea72f095f993e1de941614e ("Update version for 1.4.0-rc0"), run through Lindent with no other changes to ease merging future changes between Linux and QEMU. Remaining style issues (including those introduced by Lindent) will be fixed in a later patch. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-02kvm: add device control APIScott Wood
Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through inflexible one-purpose-only IOCTLs (e.g. KVM_GET/SET_LAPIC). Defining new IOCTLs for every little thing is cumbersome and depletes a limited numberspace. This API provides a mechanism to instantiate a device of a certain type, returning an ID that can be used to set/get attributes of the device. Attributes may include configuration parameters (e.g. register base address), device state, operational commands, etc. It is similar to the ONE_REG API, except that it acts on devices rather than vcpus. Both device types and individual attributes can be tested without having to create the device or get/set the attribute, without the need for separately managing enumerated capabilities. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de> Conflicts: include/linux/kvm_host.h include/uapi/linux/kvm.h Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
2013-05-02KVM: Move irqfd resample cap handling to generic codeAlexander Graf
Now that we have most irqfd code completely platform agnostic, let's move irqfd's resample capability return to generic code as well. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2013-05-02KVM: Move irq routing setup to irqchip.cAlexander Graf
Setting up IRQ routes is nothing IOAPIC specific. Extract everything that really is generic code into irqchip.c and only leave the ioapic specific bits to irq_comm.c. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Conflicts: virt/kvm/irq_comm.c Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
2013-05-02KVM: Extract generic irqchip logic into irqchip.cAlexander Graf
The current irq_comm.c file contains pieces of code that are generic across different irqchip implementations, as well as code that is fully IOAPIC specific. Split the generic bits out into irqchip.c. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Conflicts: virt/kvm/irq_comm.c Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
2013-05-02KVM: Move irq routing to generic codeAlexander Graf
The IRQ routing set ioctl lives in the hacky device assignment code inside of KVM today. This is definitely the wrong place for it. Move it to the much more natural kvm_main.c. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com>