diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 13:48:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 13:48:35 -0400 |
commit | 25c55d97209090db1a5f601815433f085bd1af78 (patch) | |
tree | b39c158f9df27826d18f8c8dc2e03fb1eed42d40 /arch | |
parent | 5dc93cf4576125f07cfc1b29cab0c9344c5b3d2b (diff) | |
parent | c4e5fadd2a6fc0da465dcde761877d9a87313b33 (diff) |
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 8 | ||||
-rw-r--r-- | arch/x86/pci/i386.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 0c37f16b6950..c5ef1af8e79d 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -385,11 +385,13 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
385 | if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &memory)) | 385 | if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &memory)) |
386 | return memory; | 386 | return memory; |
387 | 387 | ||
388 | if (!dev) | 388 | if (!dev) { |
389 | dev = &fallback_dev; | 389 | dev = &fallback_dev; |
390 | gfp |= GFP_DMA; | ||
391 | } | ||
390 | dma_mask = dev->coherent_dma_mask; | 392 | dma_mask = dev->coherent_dma_mask; |
391 | if (dma_mask == 0) | 393 | if (dma_mask == 0) |
392 | dma_mask = DMA_32BIT_MASK; | 394 | dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK; |
393 | 395 | ||
394 | /* Device not DMA able */ | 396 | /* Device not DMA able */ |
395 | if (dev->dma_mask == NULL) | 397 | if (dev->dma_mask == NULL) |
@@ -403,7 +405,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
403 | larger than 16MB and in this case we have a chance of | 405 | larger than 16MB and in this case we have a chance of |
404 | finding fitting memory in the next higher zone first. If | 406 | finding fitting memory in the next higher zone first. If |
405 | not retry with true GFP_DMA. -AK */ | 407 | not retry with true GFP_DMA. -AK */ |
406 | if (dma_mask <= DMA_32BIT_MASK) | 408 | if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) |
407 | gfp |= GFP_DMA32; | 409 | gfp |= GFP_DMA32; |
408 | #endif | 410 | #endif |
409 | 411 | ||
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 8af0f0bae2af..10fb308fded8 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -301,15 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
301 | prot = pgprot_val(vma->vm_page_prot); | 301 | prot = pgprot_val(vma->vm_page_prot); |
302 | if (pat_wc_enabled && write_combine) | 302 | if (pat_wc_enabled && write_combine) |
303 | prot |= _PAGE_CACHE_WC; | 303 | prot |= _PAGE_CACHE_WC; |
304 | else if (pat_wc_enabled) | 304 | else if (pat_wc_enabled || boot_cpu_data.x86 > 3) |
305 | /* | 305 | /* |
306 | * ioremap() and ioremap_nocache() defaults to UC MINUS for now. | 306 | * ioremap() and ioremap_nocache() defaults to UC MINUS for now. |
307 | * To avoid attribute conflicts, request UC MINUS here | 307 | * To avoid attribute conflicts, request UC MINUS here |
308 | * aswell. | 308 | * aswell. |
309 | */ | 309 | */ |
310 | prot |= _PAGE_CACHE_UC_MINUS; | 310 | prot |= _PAGE_CACHE_UC_MINUS; |
311 | else if (boot_cpu_data.x86 > 3) | ||
312 | prot |= _PAGE_CACHE_UC; | ||
313 | 311 | ||
314 | vma->vm_page_prot = __pgprot(prot); | 312 | vma->vm_page_prot = __pgprot(prot); |
315 | 313 | ||