Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272081
b: refs/heads/master
c: 499069e
h: refs/heads/master
i:
  272079: 9214829
v: v3
  • Loading branch information
Carsten Otte authored and Martin Schwidefsky committed Oct 30, 2011
1 parent 7d2e78e commit 2edfefd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 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: cc772456ac9b460693492b3a3d89e8c81eda5874
refs/heads/master: 499069e1a421e2a85e76846c3237f00f1a5cb435
1 change: 1 addition & 0 deletions trunk/arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ void gmap_disable(struct gmap *gmap);
int gmap_map_segment(struct gmap *gmap, unsigned long from,
unsigned long to, unsigned long length);
int gmap_unmap_segment(struct gmap *gmap, unsigned long to, unsigned long len);
unsigned long __gmap_fault(unsigned long address, struct gmap *);
unsigned long gmap_fault(unsigned long address, struct gmap *);

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static inline int do_exception(struct pt_regs *regs, int access,

#ifdef CONFIG_PGSTE
if (test_tsk_thread_flag(current, TIF_SIE) && S390_lowcore.gmap) {
address = gmap_fault(address,
address = __gmap_fault(address,
(struct gmap *) S390_lowcore.gmap);
if (address == -EFAULT) {
fault = VM_FAULT_BADMAP;
Expand Down
15 changes: 14 additions & 1 deletion trunk/arch/s390/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ int gmap_map_segment(struct gmap *gmap, unsigned long from,
}
EXPORT_SYMBOL_GPL(gmap_map_segment);

unsigned long gmap_fault(unsigned long address, struct gmap *gmap)
/*
* this function is assumed to be called with mmap_sem held
*/
unsigned long __gmap_fault(unsigned long address, struct gmap *gmap)
{
unsigned long *table, vmaddr, segment;
struct mm_struct *mm;
Expand Down Expand Up @@ -461,7 +464,17 @@ unsigned long gmap_fault(unsigned long address, struct gmap *gmap)
return vmaddr | (address & ~PMD_MASK);
}
return -EFAULT;
}

unsigned long gmap_fault(unsigned long address, struct gmap *gmap)
{
unsigned long rc;

down_read(&gmap->mm->mmap_sem);
rc = __gmap_fault(address, gmap);
up_read(&gmap->mm->mmap_sem);

return rc;
}
EXPORT_SYMBOL_GPL(gmap_fault);

Expand Down

0 comments on commit 2edfefd

Please sign in to comment.