summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/pgtable.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-18 23:56:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-18 23:56:57 +0100
commit3542f6b1836d8940615104e22248bb9b7cf54f5f (patch)
tree6808fae6dfb12bb4b7e5e0df4efbe3e0dae8c537 /arch/s390/mm/pgtable.c
parentpcmcia: add missing include for new pci resource handler (diff)
parentLinux 3.19-rc5 (diff)
downloadlinux-3542f6b1836d8940615104e22248bb9b7cf54f5f.tar.xz
linux-3542f6b1836d8940615104e22248bb9b7cf54f5f.zip
Merge 3.19-rc5 into char-misc-next
We want the 3.19-rc5 fixes in here for our testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390/mm/pgtable.c')
-rw-r--r--arch/s390/mm/pgtable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index be99357d238c..3cf8cc03fff6 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -322,11 +322,12 @@ static int gmap_alloc_table(struct gmap *gmap, unsigned long *table,
static unsigned long __gmap_segment_gaddr(unsigned long *entry)
{
struct page *page;
- unsigned long offset;
+ unsigned long offset, mask;
offset = (unsigned long) entry / sizeof(unsigned long);
offset = (offset & (PTRS_PER_PMD - 1)) * PMD_SIZE;
- page = pmd_to_page((pmd_t *) entry);
+ mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1);
+ page = virt_to_page((void *)((unsigned long) entry & mask));
return page->index + offset;
}