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
4ced7ead
Commit
4ced7ead
authored
Feb 01, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dmapool: use dev_err() whenever we can to get the better information in it.
parent
c884ee80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
drivers/base/dmapool.c
drivers/base/dmapool.c
+24
-12
No files found.
drivers/base/dmapool.c
View file @
4ced7ead
...
...
@@ -237,9 +237,12 @@ dma_pool_destroy (struct dma_pool *pool)
page
=
list_entry
(
pool
->
page_list
.
next
,
struct
dma_page
,
page_list
);
if
(
is_page_busy
(
pool
->
blocks_per_page
,
page
->
bitmap
))
{
printk
(
KERN_ERR
"dma_pool_destroy %s/%s, %p busy
\n
"
,
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
pool
->
name
,
page
->
vaddr
);
if
(
pool
->
dev
)
dev_err
(
pool
->
dev
,
"dma_pool_destroy %s, %p busy
\n
"
,
pool
->
name
,
page
->
vaddr
);
else
printk
(
KERN_ERR
"dma_pool_destroy %s, %p busy
\n
"
,
pool
->
name
,
page
->
vaddr
);
/* leak the still-in-use consistent memory */
list_del
(
&
page
->
page_list
);
kfree
(
page
);
...
...
@@ -362,9 +365,12 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
int
map
,
block
;
if
((
page
=
pool_find_page
(
pool
,
dma
))
==
0
)
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, %p/%lx (bad dma)
\n
"
,
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
if
(
pool
->
dev
)
dev_err
(
pool
->
dev
,
"dma_pool_free %s, %p/%lx (bad dma)
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, %p/%lx (bad dma)
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
return
;
}
...
...
@@ -375,15 +381,21 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
#ifdef CONFIG_DEBUG_SLAB
if
(((
dma
-
page
->
dma
)
+
(
void
*
)
page
->
vaddr
)
!=
vaddr
)
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, %p (bad vaddr)/%Lx
\n
"
,
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
if
(
pool
->
dev
)
dev_err
(
pool
->
dev
,
"dma_pool_free %s, %p (bad vaddr)/%Lx
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, %p (bad vaddr)/%Lx
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
return
;
}
if
(
page
->
bitmap
[
map
]
&
(
1UL
<<
block
))
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, dma %Lx already free
\n
"
,
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
pool
->
name
,
(
unsigned
long
long
)
dma
);
if
(
pool
->
dev
)
dev_err
(
pool
->
dev
,
"dma_pool_free %s, dma %Lx already free
\n
"
,
pool
->
name
,
(
unsigned
long
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, dma %Lx already free
\n
"
,
pool
->
name
,
(
unsigned
long
long
)
dma
);
return
;
}
memset
(
vaddr
,
POOL_POISON_FREED
,
pool
->
size
);
...
...
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