Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91020
b: refs/heads/master
c: 5b3e5b7
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 19, 2008
1 parent b4f83ad commit 0a4c3ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30db2cbf38d68f466fd34488f8312a151225c9ac
refs/heads/master: 5b3e5b7273435f8a7f83d3556a09adfd6f247e36
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/pci-nommu_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nommu_map_single(struct device *hwdev, phys_addr_t paddr, size_t size,
int direction)
{
dma_addr_t bus = paddr;
WARN_ON(size == 0);
if (!check_addr("map_single", hwdev, bus, size))
return bad_dma_address;
flush_write_buffers();
Expand Down Expand Up @@ -58,6 +59,8 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
struct scatterlist *s;
int i;

WARN_ON(nents == 0 || sg[0].length == 0);

for_each_sg(sg, s, nents, i) {
BUG_ON(!sg_page(s));
s->dma_address = sg_phys(s);
Expand Down

0 comments on commit 0a4c3ec

Please sign in to comment.