return 0;
}
+++ ++static bool device_has_rmrr(struct pci_dev *dev)
+++ ++{
+++ ++ struct dmar_rmrr_unit *rmrr;
+++ ++ int i;
+++ ++
+++ ++ for_each_rmrr_units(rmrr) {
+++ ++ for (i = 0; i < rmrr->devices_cnt; i++) {
+++ ++ /*
+++ ++ * Return TRUE if this RMRR contains the device that
+++ ++ * is passed in.
+++ ++ */
+++ ++ if (rmrr->devices[i] == dev)
+++ ++ return true;
+++ ++ }
+++ ++ }
+++ ++ return false;
+++ ++}
+++ ++
static int iommu_should_identity_map(struct pci_dev *pdev, int startup)
{
+++ ++
+++ ++ /*
+++ ++ * We want to prevent any device associated with an RMRR from
+++ ++ * getting placed into the SI Domain. This is done because
+++ ++ * problems exist when devices are moved in and out of domains
+++ ++ * and their respective RMRR info is lost. We exempt USB devices
+++ ++ * from this process due to their usage of RMRRs that are known
+++ ++ * to not be needed after BIOS hand-off to OS.
+++ ++ */
+++ ++ if (device_has_rmrr(pdev) &&
+++ ++ (pdev->class >> 8) != PCI_CLASS_SERIAL_USB)
+++ ++ return 0;
+++ ++
if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev))
return 1;
static int intel_iommu_add_device(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
--- struct pci_dev *bridge, *dma_pdev;
+++ struct pci_dev *bridge, *dma_pdev = NULL;
struct iommu_group *group;
int ret;
dma_pdev = pci_get_domain_bus_and_slot(
pci_domain_nr(pdev->bus),
bridge->subordinate->number, 0);
--- else
+++ if (!dma_pdev)
dma_pdev = pci_dev_get(bridge);
} else
dma_pdev = pci_dev_get(pdev);
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/mm.h>
+++++ #include <linux/omap-iommu.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <media/v4l2-event.h>
}
static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
----- const struct v4l2_event_subscription *sub)
+++++ struct v4l2_event_subscription *sub)
{
if (sub->type != V4L2_EVENT_FRAME_SYNC)
return -EINVAL;
}
static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
----- const struct v4l2_event_subscription *sub)
+++++ struct v4l2_event_subscription *sub)
{
return v4l2_event_unsubscribe(fh, sub);
}
*/
#include <linux/dma-mapping.h>
+++++ #include <linux/omap-iommu.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev,
struct v4l2_fh *fh,
----- const struct v4l2_event_subscription *sub)
+++++ struct v4l2_event_subscription *sub)
{
struct ispstat *stat = v4l2_get_subdevdata(subdev);
int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev,
struct v4l2_fh *fh,
----- const struct v4l2_event_subscription *sub)
+++++ struct v4l2_event_subscription *sub)
{
return v4l2_event_unsubscribe(fh, sub);
}
#include <linux/clk.h>
#include <linux/mm.h>
#include <linux/module.h>
+++++ #include <linux/omap-iommu.h>
#include <linux/pagemap.h>
#include <linux/scatterlist.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
----- #include <plat/iommu.h>
----- #include <plat/iovmm.h>
#include <plat/omap-pm.h>
#include "ispvideo.h"
}
static int
-----isp_video_set_crop(struct file *file, void *fh, struct v4l2_crop *crop)
+++++isp_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop)
{
struct isp_video *video = video_drvdata(file);
struct v4l2_subdev *subdev;