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
71df50a4
Commit
71df50a4
authored
Oct 23, 2007
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh/sh64: fixup dma-mapping for new sg layout
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
ebc3bbcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
include/asm-sh/dma-mapping.h
include/asm-sh/dma-mapping.h
+5
-7
include/asm-sh64/dma-mapping.h
include/asm-sh64/dma-mapping.h
+5
-7
No files found.
include/asm-sh/dma-mapping.h
View file @
71df50a4
...
...
@@ -2,7 +2,7 @@
#define __ASM_SH_DMA_MAPPING_H
#include <linux/mm.h>
#include <
asm
/scatterlist.h>
#include <
linux
/scatterlist.h>
#include <asm/cacheflush.h>
#include <asm/io.h>
...
...
@@ -85,10 +85,9 @@ static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
for
(
i
=
0
;
i
<
nents
;
i
++
)
{
#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
dma_cache_sync
(
dev
,
page_address
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
,
sg
[
i
].
length
,
dir
);
dma_cache_sync
(
dev
,
sg_virt
(
&
sg
[
i
]),
sg
[
i
].
length
,
dir
);
#endif
sg
[
i
].
dma_address
=
page_to_phys
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
;
sg
[
i
].
dma_address
=
sg_phys
(
&
sg
[
i
])
;
}
return
nents
;
...
...
@@ -138,10 +137,9 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
for
(
i
=
0
;
i
<
nelems
;
i
++
)
{
#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
dma_cache_sync
(
dev
,
page_address
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
,
sg
[
i
].
length
,
dir
);
dma_cache_sync
(
dev
,
sg_virt
(
&
sg
[
i
]),
sg
[
i
].
length
,
dir
);
#endif
sg
[
i
].
dma_address
=
page_to_phys
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
;
sg
[
i
].
dma_address
=
sg_phys
(
&
sg
[
i
])
;
}
}
...
...
include/asm-sh64/dma-mapping.h
View file @
71df50a4
...
...
@@ -2,7 +2,7 @@
#define __ASM_SH_DMA_MAPPING_H
#include <linux/mm.h>
#include <
asm
/scatterlist.h>
#include <
linux
/scatterlist.h>
#include <asm/io.h>
struct
pci_dev
;
...
...
@@ -71,10 +71,9 @@ static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
for
(
i
=
0
;
i
<
nents
;
i
++
)
{
#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
dma_cache_sync
(
dev
,
page_address
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
,
sg
[
i
].
length
,
dir
);
dma_cache_sync
(
dev
,
sg_virt
(
&
sg
[
i
]),
sg
[
i
].
length
,
dir
);
#endif
sg
[
i
].
dma_address
=
page_to_phys
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
;
sg
[
i
].
dma_address
=
sg_phys
(
&
sg
[
i
])
;
}
return
nents
;
...
...
@@ -124,10 +123,9 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
for
(
i
=
0
;
i
<
nelems
;
i
++
)
{
#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
dma_cache_sync
(
dev
,
page_address
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
,
sg
[
i
].
length
,
dir
);
dma_cache_sync
(
dev
,
sg_virt
(
&
sg
[
i
]),
sg
[
i
].
length
,
dir
);
#endif
sg
[
i
].
dma_address
=
page_to_phys
(
sg
[
i
].
page
)
+
sg
[
i
].
offset
;
sg
[
i
].
dma_address
=
sg_phys
(
&
sg
[
i
])
;
}
}
...
...
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