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

Commit 851b147e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: Cleanup linker script using new linker script macros.
  m32r: Move the spi_stack_top and spu_stack_top into .init.data section.
  m32r: Remove unused .altinstructions and .exit.* code from linker script.
  m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
  m32r: Define THREAD_SIZE only once.
  m32r: make PAGE_SIZE available to assembly.
parents 8e44e434 85233c43
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
#ifndef _ASM_M32R_PAGE_H
#define _ASM_M32R_PAGE_H

#include <linux/const.h>

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT	12
#define PAGE_SIZE	(1UL << PAGE_SHIFT)
#define PAGE_SIZE	(_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK	(~(PAGE_SIZE-1))

#ifndef __ASSEMBLY__
+0 −2
Original line number Diff line number Diff line
@@ -140,8 +140,6 @@ unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk)  ((tsk)->thread.lr)
#define KSTK_ESP(tsk)  ((tsk)->thread.sp)

#define THREAD_SIZE (2*PAGE_SIZE)

#define cpu_relax()	barrier()

#endif /* _ASM_M32R_PROCESSOR_H */
+2 −13
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ struct thread_info {

#define PREEMPT_ACTIVE		0x10000000

#define THREAD_SIZE (PAGE_SIZE << 1)

/*
 * macros/functions for gaining access to the thread information structure
 */
@@ -76,8 +78,6 @@ struct thread_info {
#define init_thread_info	(init_thread_union.thread_info)
#define init_stack		(init_thread_union.stack)

#define THREAD_SIZE (2*PAGE_SIZE)

/* how to get the thread information struct from C */
static inline struct thread_info *current_thread_info(void)
{
@@ -125,17 +125,6 @@ static inline unsigned int get_thread_fault_code(void)
	return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
}

#else /* !__ASSEMBLY__ */

#define THREAD_SIZE	8192

/* how to get the thread information struct from ASM */
#define GET_THREAD_INFO(reg)	GET_THREAD_INFO reg
	.macro GET_THREAD_INFO reg
	ldi	\reg, #-THREAD_SIZE
	and	\reg, sp
	.endm

#endif

/*
+7 −0
Original line number Diff line number Diff line
@@ -118,6 +118,13 @@
#define resume_kernel		restore_all
#endif

/* how to get the thread information struct from ASM */
#define GET_THREAD_INFO(reg)	GET_THREAD_INFO reg
	.macro GET_THREAD_INFO reg
	ldi	\reg, #-THREAD_SIZE
	and	\reg, sp
	.endm

ENTRY(ret_from_fork)
	pop	r0
	bl	schedule_tail
+2 −2
Original line number Diff line number Diff line
@@ -268,13 +268,13 @@ ENTRY(empty_zero_page)
/*------------------------------------------------------------------------
 * Stack area
 */
	.section .spi
	.section .init.data, "aw"
	ALIGN
	.global spi_stack_top
	.zero	1024
spi_stack_top:

	.section .spu
	.section .init.data, "aw"
	ALIGN
	.global spu_stack_top
	.zero	1024
Loading