mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'stable/late-swiotlb.v3.3' into stable/for-linus-3.7
* stable/late-swiotlb.v3.3: xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer. xen/swiotlb: Remove functions not needed anymore. xen/pcifront: Use Xen-SWIOTLB when initting if required. xen/swiotlb: For early initialization, return zero on success. xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used. xen/swiotlb: Move the error strings to its own function. xen/swiotlb: Move the nr_tbl determination in its own function. swiotlb: add the late swiotlb initialization function with iotlb memory xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB. xen/swiotlb: Simplify the logic. Conflicts: arch/x86/xen/pci-swiotlb-xen.c Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
commit
a5f9515570
7 changed files with 154 additions and 45 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
#include <asm/xen/swiotlb-xen.h>
|
||||
#define INVALID_GRANT_REF (0)
|
||||
#define INVALID_EVTCHN (-1)
|
||||
|
||||
|
|
@ -668,7 +669,7 @@ static irqreturn_t pcifront_handler_aer(int irq, void *dev)
|
|||
schedule_pcifront_aer_op(pdev);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
static int pcifront_connect(struct pcifront_device *pdev)
|
||||
static int pcifront_connect_and_init_dma(struct pcifront_device *pdev)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
|
|
@ -681,9 +682,13 @@ static int pcifront_connect(struct pcifront_device *pdev)
|
|||
dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n");
|
||||
err = -EEXIST;
|
||||
}
|
||||
|
||||
spin_unlock(&pcifront_dev_lock);
|
||||
|
||||
if (!err && !swiotlb_nr_tbl()) {
|
||||
err = pci_xen_swiotlb_init_late();
|
||||
if (err)
|
||||
dev_err(&pdev->xdev->dev, "Could not setup SWIOTLB!\n");
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -842,10 +847,10 @@ static int __devinit pcifront_try_connect(struct pcifront_device *pdev)
|
|||
XenbusStateInitialised)
|
||||
goto out;
|
||||
|
||||
err = pcifront_connect(pdev);
|
||||
err = pcifront_connect_and_init_dma(pdev);
|
||||
if (err) {
|
||||
xenbus_dev_fatal(pdev->xdev, err,
|
||||
"Error connecting PCI Frontend");
|
||||
"Error setting up PCI Frontend");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue