Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138539
b: refs/heads/master
c: 9e5efaa
h: refs/heads/master
i:
  138537: a87354f
  138535: b25c572
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Mar 11, 2009
1 parent 3b6aaef commit 6b09b25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 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: 353bca5ed4e0705ed4a1ac7b82491b223c3b55ba
refs/heads/master: 9e5efaa9360f26e0052d16f7a40d002a6a18863b
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ ifeq ($(CONFIG_PPC64),y)
EXTRA_CFLAGS += -mno-minimal-toc
endif

obj-y := fault.o mem.o pgtable.o \
obj-y := fault.o mem.o pgtable.o gup.o \
init_$(CONFIG_WORD_SIZE).o \
pgtable_$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
tlb_nohash_low.o
hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o
obj-$(CONFIG_PPC64) += hash_utils_64.o \
slb_low.o slb.o stab.o \
gup.o mmap.o $(hash-y)
mmap.o $(hash-y)
obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o
obj-$(CONFIG_PPC_STD_MMU) += hash_low_$(CONFIG_WORD_SIZE).o \
tlb_hash$(CONFIG_WORD_SIZE).o \
Expand Down
16 changes: 15 additions & 1 deletion trunk/arch/powerpc/mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <linux/rwsem.h>
#include <asm/pgtable.h>

#ifdef __HAVE_ARCH_PTE_SPECIAL

/*
* The performance critical leaf functions are made noinline otherwise gcc
* inlines everything into a single function which results in too much
Expand Down Expand Up @@ -151,8 +153,11 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
unsigned long addr, len, end;
unsigned long next;
pgd_t *pgdp;
int psize, nr = 0;
int nr = 0;
#ifdef CONFIG_PPC64
unsigned int shift;
int psize;
#endif

pr_debug("%s(%lx,%x,%s)\n", __func__, start, nr_pages, write ? "write" : "read");

Expand Down Expand Up @@ -205,8 +210,13 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
*/
local_irq_disable();

#ifdef CONFIG_PPC64
/* Those bits are related to hugetlbfs implementation and only exist
* on 64-bit for now
*/
psize = get_slice_psize(mm, addr);
shift = mmu_psize_defs[psize].shift;
#endif /* CONFIG_PPC64 */

#ifdef CONFIG_HUGETLB_PAGE
if (unlikely(mmu_huge_psizes[psize])) {
Expand Down Expand Up @@ -236,7 +246,9 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
do {
pgd_t pgd = *pgdp;

#ifdef CONFIG_PPC64
VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, addr)].shift);
#endif
pr_debug(" %016lx: normal pgd %p\n", addr,
(void *)pgd_val(pgd));
next = pgd_addr_end(addr, end);
Expand Down Expand Up @@ -279,3 +291,5 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
return ret;
}
}

#endif /* __HAVE_ARCH_PTE_SPECIAL */

0 comments on commit 6b09b25

Please sign in to comment.