login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
12
Re: [PATCH 4/7] x86: add alloc_coherent dma_ops callback to NOMMU driver
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Joerg Roedel
Subject:
Re: [PATCH 4/7] x86: add alloc_coherent dma_ops callback to NOMMU driver
Date: Tuesday, August 12, 2008 - 11:24 am
On Tue, Aug 12, 2008 at 05:24:14PM +0200, Joerg Roedel wrote:
quoted text
> +static void * > +nommu_alloc_coherent(struct device *hwdev, size_t size, > + dma_addr_t *dma_addr, gfp_t gfp) > +{ > + unsigned long dma_mask; > + int node; > + struct page *page; > + > + if (hwdev->dma_mask == NULL) > + return NULL; > + > + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); > + gfp |= __GFP_ZERO; > + > + dma_mask = hwdev->coherent_dma_mask; > + if (!dma_mask) > + dma_mask = *(hwdev->dma_mask); > + > + if (dma_mask <= DMA_24BIT_MASK) > + gfp |= GFP_DMA; > + else if (dma_mask <= DMA_32BIT_MASK) > + gfp |= GFP_DMA32;
Argh. But there is a bug in this logic :-( I fix it and resend. Joerg --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/7] x86 dma_*_coherent rework patchset
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 1/7] x86: add alloc_coherent dma_ops callback to GA ...
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 2/7] x86: add free_coherent dma_ops callback to GAR ...
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 3/7] x86: add free_coherent dma_ops callback to Cal ...
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 4/7] x86: add alloc_coherent dma_ops callback to NO ...
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 5/7] x86: add free_coherent dma_ops callback to NOM ...
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 6/7] x86: cleanup dma_*_coherent functions
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
[PATCH 7/7] x86, AMD IOMMU: remove obsolete FIXME comment
, Joerg Roedel
, (Tue Aug 12, 8:24 am)
Re: [PATCH 0/7] x86 dma_*_coherent rework patchset
, Muli Ben-Yehuda
, (Tue Aug 12, 9:06 am)
Re: [PATCH 3/7] x86: add free_coherent dma_ops callback to ...
, Muli Ben-Yehuda
, (Tue Aug 12, 9:07 am)
Re: [PATCH 0/7] x86 dma_*_coherent rework patchset
, Joerg Roedel
, (Tue Aug 12, 9:49 am)
Re: [PATCH 4/7] x86: add alloc_coherent dma_ops callback t ...
, Joerg Roedel
, (Tue Aug 12, 11:24 am)
Re: [PATCH 6/7] x86: cleanup dma_*_coherent functions
, FUJITA Tomonori
, (Tue Aug 12, 5:45 pm)
Re: [PATCH 2/7] x86: add free_coherent dma_ops callback to ...
, FUJITA Tomonori
, (Tue Aug 12, 5:45 pm)
Re: [PATCH 1/7] x86: add alloc_coherent dma_ops callback t ...
, FUJITA Tomonori
, (Tue Aug 12, 5:45 pm)
Re: [PATCH 0/7] x86 dma_*_coherent rework patchset
, FUJITA Tomonori
, (Tue Aug 12, 5:51 pm)
Re: [PATCH 1/7] x86: add alloc_coherent dma_ops callback t ...
, Joerg Roedel
, (Wed Aug 13, 5:46 am)
Re: [PATCH 2/7] x86: add free_coherent dma_ops callback to ...
, Joerg Roedel
, (Wed Aug 13, 5:49 am)
Re: [PATCH 6/7] x86: cleanup dma_*_coherent functions
, Joerg Roedel
, (Wed Aug 13, 5:51 am)
Re: [PATCH 1/7] x86: add alloc_coherent dma_ops callback t ...
, FUJITA Tomonori
, (Wed Aug 13, 1:46 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Trent Waddington
Re: Gaming Interface
Pekka Enberg
Re: latest -git: suspend: unable to handle kernel paging request (was Re: no_conso...
Dan Carpenter
Re: [patch] dma-debug: off by one issue
Adrian McMenamin
time_after - what on earth???
Paul E. McKenney
Re: [PATCH, RFC] v4 scalable classic RCU implementation
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
bnx2x: Fan failure mechanism on additional design
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
linux-netdev
:
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Marco Peereboom
Re: Singularity OS
Colocation donated by:
Syndicate