diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-03 20:56:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-03 20:56:32 -0400 |
commit | 08e4e0d0456d0ca8427b2d1ddffa30f1c3e774d7 (patch) | |
tree | 09ddde8a9b1b022e2e715452d36ada3f342d8d0c | |
parent | 4ad72555b8421a9dceb2085079aeaee871c4888e (diff) | |
parent | 1493aa65ad076293722908f03bab3d4bf3dc3638 (diff) |
Merge tag 'xtensa-20170403' of git://github.com/jcmvbkbc/linux-xtensa
Pull Xtensa fixes from Max Filippov:
- make __pa work with uncached KSEG addresses, it fixes DMA memory
mmapping and DMA debug
- fix torn stack dump output
- wire up statx syscall
* tag 'xtensa-20170403' of git://github.com/jcmvbkbc/linux-xtensa:
xtensa: wire up statx system call
xtensa: fix stack dump output
xtensa: make __pa work with uncached KSEG addresses
-rw-r--r-- | arch/xtensa/include/asm/page.h | 13 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/xtensa/kernel/traps.c | 6 |
3 files changed, 19 insertions, 5 deletions
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 976b1d70edbc..4ddbfd57a7c8 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h | |||
@@ -164,8 +164,21 @@ void copy_user_highpage(struct page *to, struct page *from, | |||
164 | 164 | ||
165 | #define ARCH_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) | 165 | #define ARCH_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) |
166 | 166 | ||
167 | #ifdef CONFIG_MMU | ||
168 | static inline unsigned long ___pa(unsigned long va) | ||
169 | { | ||
170 | unsigned long off = va - PAGE_OFFSET; | ||
171 | |||
172 | if (off >= XCHAL_KSEG_SIZE) | ||
173 | off -= XCHAL_KSEG_SIZE; | ||
174 | |||
175 | return off + PHYS_OFFSET; | ||
176 | } | ||
177 | #define __pa(x) ___pa((unsigned long)(x)) | ||
178 | #else | ||
167 | #define __pa(x) \ | 179 | #define __pa(x) \ |
168 | ((unsigned long) (x) - PAGE_OFFSET + PHYS_OFFSET) | 180 | ((unsigned long) (x) - PAGE_OFFSET + PHYS_OFFSET) |
181 | #endif | ||
169 | #define __va(x) \ | 182 | #define __va(x) \ |
170 | ((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET)) | 183 | ((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET)) |
171 | #define pfn_valid(pfn) \ | 184 | #define pfn_valid(pfn) \ |
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h index cd400af4a6b2..6be7eb27fd29 100644 --- a/arch/xtensa/include/uapi/asm/unistd.h +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
@@ -774,7 +774,10 @@ __SYSCALL(349, sys_pkey_alloc, 2) | |||
774 | #define __NR_pkey_free 350 | 774 | #define __NR_pkey_free 350 |
775 | __SYSCALL(350, sys_pkey_free, 1) | 775 | __SYSCALL(350, sys_pkey_free, 1) |
776 | 776 | ||
777 | #define __NR_syscall_count 351 | 777 | #define __NR_statx 351 |
778 | __SYSCALL(351, sys_statx, 5) | ||
779 | |||
780 | #define __NR_syscall_count 352 | ||
778 | 781 | ||
779 | /* | 782 | /* |
780 | * sysxtensa syscall handler | 783 | * sysxtensa syscall handler |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index c82c43bff296..bae697a06a98 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -483,10 +483,8 @@ void show_regs(struct pt_regs * regs) | |||
483 | 483 | ||
484 | static int show_trace_cb(struct stackframe *frame, void *data) | 484 | static int show_trace_cb(struct stackframe *frame, void *data) |
485 | { | 485 | { |
486 | if (kernel_text_address(frame->pc)) { | 486 | if (kernel_text_address(frame->pc)) |
487 | pr_cont(" [<%08lx>]", frame->pc); | 487 | pr_cont(" [<%08lx>] %pB\n", frame->pc, (void *)frame->pc); |
488 | print_symbol(" %s\n", frame->pc); | ||
489 | } | ||
490 | return 0; | 488 | return 0; |
491 | } | 489 | } |
492 | 490 | ||