Commit 36338327 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Explicit alignment for .data.cacheline_aligned
  powerpc/ps3: Update ps3_defconfig
  powerpc/ftrace: Fix constraint to be early clobber
  powerpc/ftrace: Use pr_devel() in ftrace.c
  powerpc: Do not assert pte_locked for hugepage PTE entries
parents ee3af6ee 0e337b42
This diff is collapsed.
...@@ -157,7 +157,7 @@ __ftrace_make_nop(struct module *mod, ...@@ -157,7 +157,7 @@ __ftrace_make_nop(struct module *mod,
* 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12) * 0xe8, 0x4c, 0x00, 0x28, ld r2,40(r12)
*/ */
pr_debug("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc); pr_devel("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);
/* Find where the trampoline jumps to */ /* Find where the trampoline jumps to */
if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
...@@ -165,7 +165,7 @@ __ftrace_make_nop(struct module *mod, ...@@ -165,7 +165,7 @@ __ftrace_make_nop(struct module *mod,
return -EFAULT; return -EFAULT;
} }
pr_debug(" %08x %08x", jmp[0], jmp[1]); pr_devel(" %08x %08x", jmp[0], jmp[1]);
/* verify that this is what we expect it to be */ /* verify that this is what we expect it to be */
if (((jmp[0] & 0xffff0000) != 0x3d820000) || if (((jmp[0] & 0xffff0000) != 0x3d820000) ||
...@@ -181,18 +181,18 @@ __ftrace_make_nop(struct module *mod, ...@@ -181,18 +181,18 @@ __ftrace_make_nop(struct module *mod,
offset = ((unsigned)((unsigned short)jmp[0]) << 16) + offset = ((unsigned)((unsigned short)jmp[0]) << 16) +
(int)((short)jmp[1]); (int)((short)jmp[1]);
pr_debug(" %x ", offset); pr_devel(" %x ", offset);
/* get the address this jumps too */ /* get the address this jumps too */
tramp = mod->arch.toc + offset + 32; tramp = mod->arch.toc + offset + 32;
pr_debug("toc: %lx", tramp); pr_devel("toc: %lx", tramp);
if (probe_kernel_read(jmp, (void *)tramp, 8)) { if (probe_kernel_read(jmp, (void *)tramp, 8)) {
printk(KERN_ERR "Failed to read %lx\n", tramp); printk(KERN_ERR "Failed to read %lx\n", tramp);
return -EFAULT; return -EFAULT;
} }
pr_debug(" %08x %08x\n", jmp[0], jmp[1]); pr_devel(" %08x %08x\n", jmp[0], jmp[1]);
ptr = ((unsigned long)jmp[0] << 32) + jmp[1]; ptr = ((unsigned long)jmp[0] << 32) + jmp[1];
...@@ -269,7 +269,7 @@ __ftrace_make_nop(struct module *mod, ...@@ -269,7 +269,7 @@ __ftrace_make_nop(struct module *mod,
* 0x4e, 0x80, 0x04, 0x20 bctr * 0x4e, 0x80, 0x04, 0x20 bctr
*/ */
pr_debug("ip:%lx jumps to %lx", ip, tramp); pr_devel("ip:%lx jumps to %lx", ip, tramp);
/* Find where the trampoline jumps to */ /* Find where the trampoline jumps to */
if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) { if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
...@@ -277,7 +277,7 @@ __ftrace_make_nop(struct module *mod, ...@@ -277,7 +277,7 @@ __ftrace_make_nop(struct module *mod,
return -EFAULT; return -EFAULT;
} }
pr_debug(" %08x %08x ", jmp[0], jmp[1]); pr_devel(" %08x %08x ", jmp[0], jmp[1]);
/* verify that this is what we expect it to be */ /* verify that this is what we expect it to be */
if (((jmp[0] & 0xffff0000) != 0x3d600000) || if (((jmp[0] & 0xffff0000) != 0x3d600000) ||
...@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod, ...@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod,
if (tramp & 0x8000) if (tramp & 0x8000)
tramp -= 0x10000; tramp -= 0x10000;
pr_debug(" %lx ", tramp); pr_devel(" %lx ", tramp);
if (tramp != addr) { if (tramp != addr) {
printk(KERN_ERR printk(KERN_ERR
...@@ -402,7 +402,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -402,7 +402,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
/* ld r2,40(r1) */ /* ld r2,40(r1) */
op[1] = 0xe8410028; op[1] = 0xe8410028;
pr_debug("write to %lx\n", rec->ip); pr_devel("write to %lx\n", rec->ip);
if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2)) if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
return -EPERM; return -EPERM;
...@@ -442,7 +442,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -442,7 +442,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return -EINVAL; return -EINVAL;
} }
pr_debug("write to %lx\n", rec->ip); pr_devel("write to %lx\n", rec->ip);
if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
return -EPERM; return -EPERM;
...@@ -594,7 +594,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) ...@@ -594,7 +594,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
PPC_LONG "2b,4b\n" PPC_LONG "2b,4b\n"
".previous" ".previous"
: [old] "=r" (old), [faulted] "=r" (faulted) : [old] "=&r" (old), [faulted] "=r" (faulted)
: [parent] "r" (parent), [return_hooker] "r" (return_hooker) : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
: "memory" : "memory"
); );
......
...@@ -264,6 +264,7 @@ SECTIONS ...@@ -264,6 +264,7 @@ SECTIONS
*(.data.page_aligned) *(.data.page_aligned)
} }
. = ALIGN(L1_CACHE_BYTES);
.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
*(.data.cacheline_aligned) *(.data.cacheline_aligned)
} }
......
...@@ -219,7 +219,8 @@ int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, ...@@ -219,7 +219,8 @@ int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address,
entry = do_dcache_icache_coherency(entry); entry = do_dcache_icache_coherency(entry);
changed = !pte_same(*(ptep), entry); changed = !pte_same(*(ptep), entry);
if (changed) { if (changed) {
assert_pte_locked(vma->vm_mm, address); if (!(vma->vm_flags & VM_HUGETLB))
assert_pte_locked(vma->vm_mm, address);
__ptep_set_access_flags(ptep, entry); __ptep_set_access_flags(ptep, entry);
flush_tlb_page_nohash(vma, address); flush_tlb_page_nohash(vma, address);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment