Merge commit 'v2.6.31-rc8' into x86/txt
Conflicts: arch/x86/kernel/reboot.c security/Kconfig Merge reason: resolve the conflicts, bump up from rc3 to rc8. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -90,11 +90,10 @@ static struct hotplug_slot_ops sn_hotplug_slot_ops = {
|
||||
|
||||
static DEFINE_MUTEX(sn_hotplug_mutex);
|
||||
|
||||
static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
|
||||
char *buf)
|
||||
static ssize_t path_show(struct pci_slot *pci_slot, char *buf)
|
||||
{
|
||||
int retval = -ENOENT;
|
||||
struct slot *slot = bss_hotplug_slot->private;
|
||||
struct slot *slot = pci_slot->hotplug->private;
|
||||
|
||||
if (!slot)
|
||||
return retval;
|
||||
@@ -103,7 +102,7 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
|
||||
static struct pci_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
|
||||
|
||||
static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)
|
||||
{
|
||||
|
@@ -1506,7 +1506,6 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
|
||||
}
|
||||
|
||||
set_bit(num, iommu->domain_ids);
|
||||
set_bit(iommu->seq_id, &domain->iommu_bmp);
|
||||
iommu->domains[num] = domain;
|
||||
id = num;
|
||||
}
|
||||
@@ -1649,6 +1648,14 @@ static int domain_context_mapped(struct pci_dev *pdev)
|
||||
tmp->devfn);
|
||||
}
|
||||
|
||||
/* Returns a number of VTD pages, but aligned to MM page size */
|
||||
static inline unsigned long aligned_nrpages(unsigned long host_addr,
|
||||
size_t size)
|
||||
{
|
||||
host_addr &= ~PAGE_MASK;
|
||||
return PAGE_ALIGN(host_addr + size) >> VTD_PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
||||
struct scatterlist *sg, unsigned long phys_pfn,
|
||||
unsigned long nr_pages, int prot)
|
||||
@@ -1676,7 +1683,7 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
||||
uint64_t tmp;
|
||||
|
||||
if (!sg_res) {
|
||||
sg_res = (sg->offset + sg->length + VTD_PAGE_SIZE - 1) >> VTD_PAGE_SHIFT;
|
||||
sg_res = aligned_nrpages(sg->offset, sg->length);
|
||||
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset;
|
||||
sg->dma_length = sg->length;
|
||||
pteval = page_to_phys(sg_page(sg)) | prot;
|
||||
@@ -2416,14 +2423,6 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Returns a number of VTD pages, but aligned to MM page size */
|
||||
static inline unsigned long aligned_nrpages(unsigned long host_addr,
|
||||
size_t size)
|
||||
{
|
||||
host_addr &= ~PAGE_MASK;
|
||||
return PAGE_ALIGN(host_addr + size) >> VTD_PAGE_SHIFT;
|
||||
}
|
||||
|
||||
/* This takes a number of _MM_ pages, not VTD pages */
|
||||
static struct iova *intel_alloc_iova(struct device *dev,
|
||||
struct dmar_domain *domain,
|
||||
@@ -2552,6 +2551,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
|
||||
int prot = 0;
|
||||
int ret;
|
||||
struct intel_iommu *iommu;
|
||||
unsigned long paddr_pfn = paddr >> PAGE_SHIFT;
|
||||
|
||||
BUG_ON(dir == DMA_NONE);
|
||||
|
||||
@@ -2586,7 +2586,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
|
||||
* is not a big problem
|
||||
*/
|
||||
ret = domain_pfn_mapping(domain, mm_to_dma_pfn(iova->pfn_lo),
|
||||
paddr >> VTD_PAGE_SHIFT, size, prot);
|
||||
mm_to_dma_pfn(paddr_pfn), size, prot);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
@@ -2876,7 +2876,7 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
|
||||
|
||||
start_vpfn = mm_to_dma_pfn(iova->pfn_lo);
|
||||
|
||||
ret = domain_sg_mapping(domain, start_vpfn, sglist, mm_to_dma_pfn(size), prot);
|
||||
ret = domain_sg_mapping(domain, start_vpfn, sglist, size, prot);
|
||||
if (unlikely(ret)) {
|
||||
/* clear the page */
|
||||
dma_pte_clear_range(domain, start_vpfn,
|
||||
@@ -3421,6 +3421,7 @@ static int md_domain_init(struct dmar_domain *domain, int guest_width)
|
||||
|
||||
domain->iommu_count = 0;
|
||||
domain->iommu_coherency = 0;
|
||||
domain->iommu_snooping = 0;
|
||||
domain->max_addr = 0;
|
||||
|
||||
/* always allocate the top pgd */
|
||||
|
@@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
|
||||
return error;
|
||||
}
|
||||
|
||||
return pci_dev->state_saved ? pci_restore_state(pci_dev) : 0;
|
||||
return pci_restore_state(pci_dev);
|
||||
}
|
||||
|
||||
static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev)
|
||||
|
@@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev)
|
||||
int i;
|
||||
u32 val;
|
||||
|
||||
if (!dev->state_saved)
|
||||
return 0;
|
||||
/* PCI Express register must be restored first */
|
||||
pci_restore_pcie_state(dev);
|
||||
|
||||
|
@@ -100,16 +100,16 @@ int pci_claim_resource(struct pci_dev *dev, int resource)
|
||||
{
|
||||
struct resource *res = &dev->resource[resource];
|
||||
struct resource *root;
|
||||
char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
|
||||
int err;
|
||||
|
||||
root = pci_find_parent_resource(dev, res);
|
||||
|
||||
err = -EINVAL;
|
||||
if (root != NULL)
|
||||
err = insert_resource(root, res);
|
||||
err = request_resource(root, res);
|
||||
|
||||
if (err) {
|
||||
const char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
|
||||
dev_err(&dev->dev, "BAR %d: %s of %s %pR\n",
|
||||
resource,
|
||||
root ? "address space collision on" :
|
||||
|
Reference in New Issue
Block a user