mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: ACPI/PCI: another multiple _OSC memory leak fix x86/PCI: X86_PAT & mprotect PCI: enable nv_msi_ht_cap_quirk for ALi bridges PCI: Make the intel-iommu_wait_op macro work when jiffies are not running ACPI/PCI: handle multiple _OSC ACPI/PCI: handle multiple _OSC x86/PCI: fix broken ISA DMA PCI ACPI: fix uninitialized variable in __pci_osc_support_set
This commit is contained in:
commit
25c55d9720
5 changed files with 89 additions and 39 deletions
|
|
@ -385,11 +385,13 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
|||
if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &memory))
|
||||
return memory;
|
||||
|
||||
if (!dev)
|
||||
if (!dev) {
|
||||
dev = &fallback_dev;
|
||||
gfp |= GFP_DMA;
|
||||
}
|
||||
dma_mask = dev->coherent_dma_mask;
|
||||
if (dma_mask == 0)
|
||||
dma_mask = DMA_32BIT_MASK;
|
||||
dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK;
|
||||
|
||||
/* Device not DMA able */
|
||||
if (dev->dma_mask == NULL)
|
||||
|
|
@ -403,7 +405,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
|||
larger than 16MB and in this case we have a chance of
|
||||
finding fitting memory in the next higher zone first. If
|
||||
not retry with true GFP_DMA. -AK */
|
||||
if (dma_mask <= DMA_32BIT_MASK)
|
||||
if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
|
||||
gfp |= GFP_DMA32;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -301,15 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
|||
prot = pgprot_val(vma->vm_page_prot);
|
||||
if (pat_wc_enabled && write_combine)
|
||||
prot |= _PAGE_CACHE_WC;
|
||||
else if (pat_wc_enabled)
|
||||
else if (pat_wc_enabled || boot_cpu_data.x86 > 3)
|
||||
/*
|
||||
* ioremap() and ioremap_nocache() defaults to UC MINUS for now.
|
||||
* To avoid attribute conflicts, request UC MINUS here
|
||||
* aswell.
|
||||
*/
|
||||
prot |= _PAGE_CACHE_UC_MINUS;
|
||||
else if (boot_cpu_data.x86 > 3)
|
||||
prot |= _PAGE_CACHE_UC;
|
||||
|
||||
vma->vm_page_prot = __pgprot(prot);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue