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
9964c2d8
Commit
9964c2d8
authored
Aug 27, 2003
by
Pete Zaitcev
Committed by
David S. Miller
Aug 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Add pci_{map,unmap}_page().
parent
d172a8a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
arch/sparc/kernel/ioport.c
arch/sparc/kernel/ioport.c
+20
-0
include/asm-sparc/pci.h
include/asm-sparc/pci.h
+8
-0
No files found.
arch/sparc/kernel/ioport.c
View file @
9964c2d8
...
@@ -511,6 +511,26 @@ void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t ba, size_t size,
...
@@ -511,6 +511,26 @@ void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t ba, size_t size,
}
}
}
}
/*
* Same as pci_map_single, but with pages.
*/
dma_addr_t
pci_map_page
(
struct
pci_dev
*
hwdev
,
struct
page
*
page
,
unsigned
long
offset
,
size_t
size
,
int
direction
)
{
if
(
direction
==
PCI_DMA_NONE
)
BUG
();
/* IIep is write-through, not flushing. */
return
page_to_phys
(
page
)
+
offset
;
}
void
pci_unmap_page
(
struct
pci_dev
*
hwdev
,
dma_addr_t
dma_address
,
size_t
size
,
int
direction
)
{
if
(
direction
==
PCI_DMA_NONE
)
BUG
();
/* mmu_inval_dma_area XXX */
}
/* Map a set of buffers described by scatterlist in streaming
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
* mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list
* above pci_map_single interface. Here the scatter gather list
...
...
include/asm-sparc/pci.h
View file @
9964c2d8
...
@@ -78,6 +78,14 @@ extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t
...
@@ -78,6 +78,14 @@ extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
(((PTR)->LEN_NAME) = (VAL))
(((PTR)->LEN_NAME) = (VAL))
/*
* Same as above, only with pages instead of mapped addresses.
*/
extern
dma_addr_t
pci_map_page
(
struct
pci_dev
*
hwdev
,
struct
page
*
page
,
unsigned
long
offset
,
size_t
size
,
int
direction
);
extern
void
pci_unmap_page
(
struct
pci_dev
*
hwdev
,
dma_addr_t
dma_address
,
size_t
size
,
int
direction
);
/* Map a set of buffers described by scatterlist in streaming
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
* mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list
* above pci_map_single interface. Here the scatter gather list
...
...
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