Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65285
b: refs/heads/master
c: d5e8938
h: refs/heads/master
i:
  65283: 7d316c3
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Oct 4, 2007
1 parent 7603409 commit e637087
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16abfa086096895d438b19198e408ee96da7b508
refs/heads/master: d5e89385e92a77b2764d9eb8284808a7628cb2a8
8 changes: 8 additions & 0 deletions trunk/drivers/scsi/megaraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)

*len = 0;

if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) {
sg = scsi_sglist(cmd);
scb->dma_h_bulkdata = sg_dma_address(sg);
*buf = (u32)scb->dma_h_bulkdata;
*len = sg_dma_len(sg);
return 0;
}

scsi_for_each_sg(cmd, sg, sgcnt, idx) {
if (adapter->has_64bit_addr) {
scb->sgl64[idx].address = sg_dma_address(sg);
Expand Down
14 changes: 8 additions & 6 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,14 +2307,13 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
* do not need to flush old virtual caches or the TLB.
*
* We enter with non-exclusive mmap_sem (to exclude vma changes,
* but allow concurrent faults), and pte neither mapped nor locked.
* but allow concurrent faults), and pte mapped but not yet locked.
* We return with mmap_sem still held, but pte unmapped and unlocked.
*/
static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pmd_t *pmd,
unsigned long address, pte_t *page_table, pmd_t *pmd,
pgoff_t pgoff, unsigned int flags, pte_t orig_pte)
{
pte_t *page_table;
spinlock_t *ptl;
struct page *page;
pte_t entry;
Expand All @@ -2328,6 +2327,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
vmf.flags = flags;
vmf.page = NULL;

pte_unmap(page_table);
BUG_ON(vma->vm_flags & VM_PFNMAP);

if (likely(vma->vm_ops->fault)) {
Expand Down Expand Up @@ -2468,8 +2468,8 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
- vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);

pte_unmap(page_table);
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
return __do_fault(mm, vma, address, page_table, pmd, pgoff,
flags, orig_pte);
}


Expand Down Expand Up @@ -2552,7 +2552,9 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
}

pgoff = pte_to_pgoff(orig_pte);
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);

return __do_fault(mm, vma, address, page_table, pmd, pgoff,
flags, orig_pte);
}

/*
Expand Down

0 comments on commit e637087

Please sign in to comment.