forked from Minki/linux
Merge branch 'parisc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "This patchset adds stack usage debug info for parisc and metag (on both the stack grows upwards), switches to the new generic realative extable search and sort routines, drops the long time ago removed syscalls alloc_hugepages and free_hugepages and wires up the new preadv2 and pwritev2 syscalls" * 'parisc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up preadv2 and pwritev2 syscalls parisc: Use generic extable search and sort routines parisc: Panic immediately when panic_on_oops parisc,metag: Implement CONFIG_DEBUG_STACK_USAGE option parisc: Drop alloc_hugepages and free_hugepages syscalls
This commit is contained in:
commit
976fb3f7b9
@ -11,6 +11,7 @@ config PARISC
|
||||
select RTC_DRV_GENERIC
|
||||
select INIT_ALL_POSSIBLE
|
||||
select BUG
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
select HAVE_PERF_EVENTS
|
||||
select GENERIC_ATOMIC64 if !64BIT
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
|
@ -523,7 +523,7 @@
|
||||
*/
|
||||
#define ASM_EXCEPTIONTABLE_ENTRY(fault_addr, except_addr) \
|
||||
.section __ex_table,"aw" ! \
|
||||
ASM_ULONG_INSN fault_addr, except_addr ! \
|
||||
.word (fault_addr - .), (except_addr - .) ! \
|
||||
.previous
|
||||
|
||||
|
||||
|
@ -60,14 +60,15 @@ static inline long access_ok(int type, const void __user * addr,
|
||||
* use a 32bit (unsigned int) address here.
|
||||
*/
|
||||
|
||||
#define ARCH_HAS_RELATIVE_EXTABLE
|
||||
struct exception_table_entry {
|
||||
unsigned long insn; /* address of insn that is allowed to fault. */
|
||||
unsigned long fixup; /* fixup routine */
|
||||
int insn; /* relative address of insn that is allowed to fault. */
|
||||
int fixup; /* relative address of fixup routine */
|
||||
};
|
||||
|
||||
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\
|
||||
".section __ex_table,\"aw\"\n" \
|
||||
ASM_WORD_INSN #fault_addr ", " #except_addr "\n\t" \
|
||||
".word (" #fault_addr " - .), (" #except_addr " - .)\n\t" \
|
||||
".previous\n"
|
||||
|
||||
/*
|
||||
|
@ -235,8 +235,8 @@
|
||||
#define __NR_io_getevents (__NR_Linux + 217)
|
||||
#define __NR_io_submit (__NR_Linux + 218)
|
||||
#define __NR_io_cancel (__NR_Linux + 219)
|
||||
#define __NR_alloc_hugepages (__NR_Linux + 220)
|
||||
#define __NR_free_hugepages (__NR_Linux + 221)
|
||||
#define __NR_alloc_hugepages (__NR_Linux + 220) /* not used */
|
||||
#define __NR_free_hugepages (__NR_Linux + 221) /* not used */
|
||||
#define __NR_exit_group (__NR_Linux + 222)
|
||||
#define __NR_lookup_dcookie (__NR_Linux + 223)
|
||||
#define __NR_epoll_create (__NR_Linux + 224)
|
||||
@ -362,8 +362,10 @@
|
||||
#define __NR_userfaultfd (__NR_Linux + 344)
|
||||
#define __NR_mlock2 (__NR_Linux + 345)
|
||||
#define __NR_copy_file_range (__NR_Linux + 346)
|
||||
#define __NR_preadv2 (__NR_Linux + 347)
|
||||
#define __NR_pwritev2 (__NR_Linux + 348)
|
||||
|
||||
#define __NR_Linux_syscalls (__NR_copy_file_range + 1)
|
||||
#define __NR_Linux_syscalls (__NR_pwritev2 + 1)
|
||||
|
||||
|
||||
#define __IGNORE_select /* newselect */
|
||||
|
@ -368,16 +368,6 @@ asmlinkage long parisc_fallocate(int fd, int mode, u32 offhi, u32 offlo,
|
||||
((u64)lenhi << 32) | lenlo);
|
||||
}
|
||||
|
||||
asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag)
|
||||
{
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
asmlinkage int sys_free_hugepages(unsigned long addr)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
long parisc_personality(unsigned long personality)
|
||||
{
|
||||
long err;
|
||||
|
@ -315,8 +315,8 @@
|
||||
ENTRY_COMP(io_getevents)
|
||||
ENTRY_COMP(io_submit)
|
||||
ENTRY_SAME(io_cancel)
|
||||
ENTRY_SAME(alloc_hugepages) /* 220 */
|
||||
ENTRY_SAME(free_hugepages)
|
||||
ENTRY_SAME(ni_syscall) /* 220: was alloc_hugepages */
|
||||
ENTRY_SAME(ni_syscall) /* was free_hugepages */
|
||||
ENTRY_SAME(exit_group)
|
||||
ENTRY_COMP(lookup_dcookie)
|
||||
ENTRY_SAME(epoll_create)
|
||||
@ -442,6 +442,8 @@
|
||||
ENTRY_SAME(userfaultfd)
|
||||
ENTRY_SAME(mlock2) /* 345 */
|
||||
ENTRY_SAME(copy_file_range)
|
||||
ENTRY_COMP(preadv2)
|
||||
ENTRY_COMP(pwritev2)
|
||||
|
||||
|
||||
.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
|
||||
|
@ -284,11 +284,8 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
|
||||
if (in_interrupt())
|
||||
panic("Fatal exception in interrupt");
|
||||
|
||||
if (panic_on_oops) {
|
||||
printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
|
||||
ssleep(5);
|
||||
if (panic_on_oops)
|
||||
panic("Fatal exception");
|
||||
}
|
||||
|
||||
oops_exit();
|
||||
do_exit(SIGSEGV);
|
||||
|
@ -140,12 +140,6 @@ int fixup_exception(struct pt_regs *regs)
|
||||
{
|
||||
const struct exception_table_entry *fix;
|
||||
|
||||
/* If we only stored 32bit addresses in the exception table we can drop
|
||||
* out if we faulted on a 64bit address. */
|
||||
if ((sizeof(regs->iaoq[0]) > sizeof(fix->insn))
|
||||
&& (regs->iaoq[0] >> 32))
|
||||
return 0;
|
||||
|
||||
fix = search_exception_tables(regs->iaoq[0]);
|
||||
if (fix) {
|
||||
struct exception_data *d;
|
||||
@ -154,7 +148,8 @@ int fixup_exception(struct pt_regs *regs)
|
||||
d->fault_space = regs->isr;
|
||||
d->fault_addr = regs->ior;
|
||||
|
||||
regs->iaoq[0] = ((fix->fixup) & ~3);
|
||||
regs->iaoq[0] = (unsigned long)&fix->fixup + fix->fixup;
|
||||
regs->iaoq[0] &= ~3;
|
||||
/*
|
||||
* NOTE: In some cases the faulting instruction
|
||||
* may be in the delay slot of a branch. We
|
||||
|
@ -2870,10 +2870,18 @@ static inline unsigned long stack_not_used(struct task_struct *p)
|
||||
unsigned long *n = end_of_stack(p);
|
||||
|
||||
do { /* Skip over canary */
|
||||
# ifdef CONFIG_STACK_GROWSUP
|
||||
n--;
|
||||
# else
|
||||
n++;
|
||||
# endif
|
||||
} while (!*n);
|
||||
|
||||
# ifdef CONFIG_STACK_GROWSUP
|
||||
return (unsigned long)end_of_stack(p) - (unsigned long)n;
|
||||
# else
|
||||
return (unsigned long)n - (unsigned long)end_of_stack(p);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
extern void set_task_stack_end_magic(struct task_struct *tsk);
|
||||
|
@ -558,7 +558,7 @@ config DEBUG_KMEMLEAK_DEFAULT_OFF
|
||||
|
||||
config DEBUG_STACK_USAGE
|
||||
bool "Stack utilization instrumentation"
|
||||
depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG
|
||||
depends on DEBUG_KERNEL && !IA64
|
||||
help
|
||||
Enables the display of the minimum amount of free stack which each
|
||||
task has ever had available in the sysrq-T and sysrq-P debug output.
|
||||
|
@ -315,6 +315,7 @@ do_file(char const *const fname)
|
||||
|
||||
case EM_S390:
|
||||
case EM_AARCH64:
|
||||
case EM_PARISC:
|
||||
custom_sort = sort_relative_table;
|
||||
break;
|
||||
case EM_ARCOMPACT:
|
||||
|
Loading…
Reference in New Issue
Block a user