Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a4c2baa6
Commit
a4c2baa6
authored
Jul 10, 2009
by
FUJITA Tomonori
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: replace is_buffer_dma_capable() with dma_capable
Signed-off-by:
FUJITA Tomonori
<
fujita.tomonori@lab.ntt.co.jp
>
parent
99becaca
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-dma.c
+1
-1
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/pci-gart_64.c
+2
-3
arch/x86/kernel/pci-nommu.c
arch/x86/kernel/pci-nommu.c
+1
-1
No files found.
arch/x86/kernel/pci-dma.c
View file @
a4c2baa6
...
...
@@ -147,7 +147,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
return
NULL
;
addr
=
page_to_phys
(
page
);
if
(
!
is_buffer_dma_capable
(
dma_mask
,
addr
,
size
)
)
{
if
(
addr
+
size
>
dma_mask
)
{
__free_pages
(
page
,
get_order
(
size
));
if
(
dma_mask
<
DMA_BIT_MASK
(
32
)
&&
!
(
flag
&
GFP_DMA
))
{
...
...
arch/x86/kernel/pci-gart_64.c
View file @
a4c2baa6
...
...
@@ -190,14 +190,13 @@ static void iommu_full(struct device *dev, size_t size, int dir)
static
inline
int
need_iommu
(
struct
device
*
dev
,
unsigned
long
addr
,
size_t
size
)
{
return
force_iommu
||
!
is_buffer_dma_capable
(
*
dev
->
dma_mask
,
addr
,
size
);
return
force_iommu
||
!
dma_capable
(
dev
,
addr
,
size
);
}
static
inline
int
nonforced_iommu
(
struct
device
*
dev
,
unsigned
long
addr
,
size_t
size
)
{
return
!
is_buffer_dma_capable
(
*
dev
->
dma_mask
,
addr
,
size
);
return
!
dma_capable
(
dev
,
addr
,
size
);
}
/* Map a single continuous physical area into the IOMMU.
...
...
arch/x86/kernel/pci-nommu.c
View file @
a4c2baa6
...
...
@@ -14,7 +14,7 @@
static
int
check_addr
(
char
*
name
,
struct
device
*
hwdev
,
dma_addr_t
bus
,
size_t
size
)
{
if
(
hwdev
&&
!
is_buffer_dma_capable
(
*
hwdev
->
dma_mask
,
bus
,
size
))
{
if
(
hwdev
&&
!
dma_capable
(
hwdev
,
bus
,
size
))
{
if
(
*
hwdev
->
dma_mask
>=
DMA_BIT_MASK
(
32
))
printk
(
KERN_ERR
"nommu_%s: overflow %Lx+%zu of device mask %Lx
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment