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
0a88e772
Commit
0a88e772
authored
Jan 13, 2003
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GFP_ flags to parisc DMA API implementation
parent
13025fe0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
arch/parisc/kernel/pci-dma.c
arch/parisc/kernel/pci-dma.c
+5
-5
drivers/parisc/ccio-dma.c
drivers/parisc/ccio-dma.c
+2
-2
include/asm-parisc/dma-mapping.h
include/asm-parisc/dma-mapping.h
+8
-6
No files found.
arch/parisc/kernel/pci-dma.c
View file @
0a88e772
...
...
@@ -349,7 +349,7 @@ pcxl_dma_init(void)
__initcall
(
pcxl_dma_init
);
static
void
*
pa11_dma_alloc_consistent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
static
void
*
pa11_dma_alloc_consistent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
,
int
flag
)
{
unsigned
long
vaddr
;
unsigned
long
paddr
;
...
...
@@ -358,7 +358,7 @@ static void * pa11_dma_alloc_consistent (struct device *dev, size_t size, dma_ad
order
=
get_order
(
size
);
size
=
1
<<
(
order
+
PAGE_SHIFT
);
vaddr
=
pcxl_alloc_range
(
size
);
paddr
=
__get_free_pages
(
GFP_ATOMIC
,
order
);
paddr
=
__get_free_pages
(
flag
,
order
);
flush_kernel_dcache_range
(
paddr
,
size
);
paddr
=
__pa
(
paddr
);
map_uncached_pages
(
vaddr
,
size
,
paddr
);
...
...
@@ -482,18 +482,18 @@ struct hppa_dma_ops pcxl_dma_ops = {
};
static
void
*
fail_alloc_consistent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
dma_addr_t
*
dma_handle
,
int
flag
)
{
return
NULL
;
}
static
void
*
pa11_dma_alloc_noncoherent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
dma_addr_t
*
dma_handle
,
int
flag
)
{
void
*
addr
=
NULL
;
/* rely on kmalloc to be cacheline aligned */
addr
=
kmalloc
(
size
,
GFP_KERNEL
);
addr
=
kmalloc
(
size
,
flag
);
if
(
addr
)
*
dma_handle
=
(
dma_addr_t
)
virt_to_phys
(
addr
);
...
...
drivers/parisc/ccio-dma.c
View file @
0a88e772
...
...
@@ -728,7 +728,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
* This function implements the pci_alloc_consistent function.
*/
static
void
*
ccio_alloc_consistent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
ccio_alloc_consistent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
,
int
flag
)
{
void
*
ret
;
#if 0
...
...
@@ -741,7 +741,7 @@ ccio_alloc_consistent(struct device *dev, size_t size, dma_addr_t *dma_handle)
return 0;
}
#endif
ret
=
(
void
*
)
__get_free_pages
(
GFP_ATOMIC
,
get_order
(
size
));
ret
=
(
void
*
)
__get_free_pages
(
flag
,
get_order
(
size
));
if
(
ret
)
{
memset
(
ret
,
0
,
size
);
...
...
include/asm-parisc/dma-mapping.h
View file @
0a88e772
...
...
@@ -9,8 +9,8 @@
*/
struct
hppa_dma_ops
{
int
(
*
dma_supported
)(
struct
device
*
dev
,
u64
mask
);
void
*
(
*
alloc_consistent
)(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
iova
);
void
*
(
*
alloc_noncoherent
)(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
iova
);
void
*
(
*
alloc_consistent
)(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
iova
,
int
flag
);
void
*
(
*
alloc_noncoherent
)(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
iova
,
int
flag
);
void
(
*
free_consistent
)(
struct
device
*
dev
,
size_t
size
,
void
*
vaddr
,
dma_addr_t
iova
);
dma_addr_t
(
*
map_single
)(
struct
device
*
dev
,
void
*
addr
,
size_t
size
,
enum
dma_data_direction
direction
);
void
(
*
unmap_single
)(
struct
device
*
dev
,
dma_addr_t
iova
,
size_t
size
,
enum
dma_data_direction
direction
);
...
...
@@ -46,15 +46,17 @@ extern struct hppa_dma_ops pcx_dma_ops;
extern
struct
hppa_dma_ops
*
hppa_dma_ops
;
static
inline
void
*
dma_alloc_coherent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
dma_alloc_coherent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
,
int
flag
)
{
return
hppa_dma_ops
->
alloc_consistent
(
dev
,
size
,
dma_handle
);
return
hppa_dma_ops
->
alloc_consistent
(
dev
,
size
,
dma_handle
,
flag
);
}
static
inline
void
*
dma_alloc_noncoherent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
)
dma_alloc_noncoherent
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
dma_handle
,
int
flag
)
{
return
hppa_dma_ops
->
alloc_noncoherent
(
dev
,
size
,
dma_handle
);
return
hppa_dma_ops
->
alloc_noncoherent
(
dev
,
size
,
dma_handle
,
flag
);
}
static
inline
void
...
...
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