Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef280c85 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390: move sys_call_table and last_break from thread_info to thread_struct



Move the last two architecture specific fields from the thread_info
structure to the thread_struct. All that is left in thread_info is
the flags field.

Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 90c53e65
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ extern char elf_platform[];
do {								\
	set_personality(PER_LINUX |				\
		(current->personality & (~PER_MASK)));		\
	current_thread_info()->sys_call_table = 		\
	current->thread.sys_call_table =			\
		(unsigned long) &sys_call_table;		\
} while (0)
#else /* CONFIG_COMPAT */
@@ -204,11 +204,11 @@ do { \
			(current->personality & ~PER_MASK));	\
	if ((ex).e_ident[EI_CLASS] == ELFCLASS32) {		\
		set_thread_flag(TIF_31BIT);			\
		current_thread_info()->sys_call_table =		\
		current->thread.sys_call_table =		\
			(unsigned long)	&sys_call_table_emu;	\
	} else {						\
		clear_thread_flag(TIF_31BIT);			\
		current_thread_info()->sys_call_table =		\
		current->thread.sys_call_table =		\
			(unsigned long) &sys_call_table;	\
	}							\
} while (0)
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ struct thread_struct {
        unsigned long ksp;              /* kernel stack pointer             */
	unsigned long user_timer;	/* task cputime in user space */
	unsigned long system_timer;	/* task cputime in kernel space */
	unsigned long sys_call_table;	/* system call table address */
	mm_segment_t mm_segment;
	unsigned long gmap_addr;	/* address of last gmap fault. */
	unsigned int gmap_write_flag;	/* gmap fault write indication */
@@ -122,6 +123,7 @@ struct thread_struct {
	struct per_event per_event;	/* Cause of the last PER trap */
	unsigned long per_flags;	/* Flags to control debug behavior */
	unsigned int system_call;	/* system call number in signal */
	unsigned long last_break;	/* last breaking-event-address. */
        /* pfault_wait is used to block the process on a pfault event */
	unsigned long pfault_wait;
	struct list_head list;
+0 −2
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@
 */
struct thread_info {
	unsigned long		flags;		/* low level flags */
	unsigned long		sys_call_table;	/* System call table address */
	unsigned long		last_break;	/* last breaking-event-address. */
};

/*
+2 −2
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ int main(void)
	BLANK();
	/* thread struct offsets */
	OFFSET(__THREAD_ksp, thread_struct, ksp);
	OFFSET(__THREAD_sysc_table,  thread_struct, sys_call_table);
	OFFSET(__THREAD_last_break, thread_struct, last_break);
	OFFSET(__THREAD_FPU_fpc, thread_struct, fpu.fpc);
	OFFSET(__THREAD_FPU_regs, thread_struct, fpu.regs);
	OFFSET(__THREAD_per_cause, thread_struct, per_event.cause);
@@ -40,8 +42,6 @@ int main(void)
	BLANK();
	/* thread info offsets */
	OFFSET(__TI_flags, task_struct, thread_info.flags);
	OFFSET(__TI_sysc_table,  task_struct, thread_info.sys_call_table);
	OFFSET(__TI_last_break, task_struct, thread_info.last_break);
	BLANK();
	/* pt_regs offsets */
	OFFSET(__PT_ARGS, pt_regs, args);
+2 −2
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set,
		/* set extra registers only for synchronous signals */
		regs->gprs[4] = regs->int_code & 127;
		regs->gprs[5] = regs->int_parm_long;
		regs->gprs[6] = task_thread_info(current)->last_break;
		regs->gprs[6] = current->thread.last_break;
	}

	return 0;
@@ -523,7 +523,7 @@ static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set,
	regs->gprs[2] = ksig->sig;
	regs->gprs[3] = (__force __u64) &frame->info;
	regs->gprs[4] = (__force __u64) &frame->uc;
	regs->gprs[5] = task_thread_info(current)->last_break;
	regs->gprs[5] = current->thread.last_break;
	return 0;
}

Loading