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
Kirill Smelkov
linux
Commits
36ebe2b9
Commit
36ebe2b9
authored
Apr 10, 2018
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/dmatest' into for-linus
parents
c5637476
2e67a087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
drivers/dma/dmatest.c
drivers/dma/dmatest.c
+12
-4
No files found.
drivers/dma/dmatest.c
View file @
36ebe2b9
...
...
@@ -74,7 +74,11 @@ MODULE_PARM_DESC(timeout, "Transfer Timeout in msec (default: 3000), "
static
bool
noverify
;
module_param
(
noverify
,
bool
,
S_IRUGO
|
S_IWUSR
);
MODULE_PARM_DESC
(
noverify
,
"Disable random data setup and verification"
);
MODULE_PARM_DESC
(
noverify
,
"Disable data verification (default: verify)"
);
static
bool
norandom
;
module_param
(
norandom
,
bool
,
0644
);
MODULE_PARM_DESC
(
norandom
,
"Disable random offset setup (default: random)"
);
static
bool
verbose
;
module_param
(
verbose
,
bool
,
S_IRUGO
|
S_IWUSR
);
...
...
@@ -103,6 +107,7 @@ struct dmatest_params {
unsigned
int
pq_sources
;
int
timeout
;
bool
noverify
;
bool
norandom
;
};
/**
...
...
@@ -575,7 +580,7 @@ static int dmatest_func(void *data)
break
;
}
if
(
params
->
no
verify
)
if
(
params
->
no
random
)
len
=
params
->
buf_size
;
else
len
=
dmatest_random
()
%
params
->
buf_size
+
1
;
...
...
@@ -586,17 +591,19 @@ static int dmatest_func(void *data)
total_len
+=
len
;
if
(
params
->
no
verify
)
{
if
(
params
->
no
random
)
{
src_off
=
0
;
dst_off
=
0
;
}
else
{
start
=
ktime_get
();
src_off
=
dmatest_random
()
%
(
params
->
buf_size
-
len
+
1
);
dst_off
=
dmatest_random
()
%
(
params
->
buf_size
-
len
+
1
);
src_off
=
(
src_off
>>
align
)
<<
align
;
dst_off
=
(
dst_off
>>
align
)
<<
align
;
}
if
(
!
params
->
noverify
)
{
start
=
ktime_get
();
dmatest_init_srcs
(
thread
->
srcs
,
src_off
,
len
,
params
->
buf_size
,
is_memset
);
dmatest_init_dsts
(
thread
->
dsts
,
dst_off
,
len
,
...
...
@@ -975,6 +982,7 @@ static void run_threaded_test(struct dmatest_info *info)
params
->
pq_sources
=
pq_sources
;
params
->
timeout
=
timeout
;
params
->
noverify
=
noverify
;
params
->
norandom
=
norandom
;
request_channels
(
info
,
DMA_MEMCPY
);
request_channels
(
info
,
DMA_MEMSET
);
...
...
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