entry-compact.h (27fd38c5226ed0f1712d071880fa8e739eb78650) entry-compact.h (0efacbbaee1e94e9942da0912f5b46ffd45a74bd)
1/*
2 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 22 unchanged lines hidden (view full) ---

31
32#ifndef __ASM_ARC_ENTRY_COMPACT_H
33#define __ASM_ARC_ENTRY_COMPACT_H
34
35#include <asm/asm-offsets.h>
36#include <asm/irqflags-compact.h>
37#include <asm/thread_info.h> /* For THREAD_SIZE */
38
1/*
2 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 22 unchanged lines hidden (view full) ---

31
32#ifndef __ASM_ARC_ENTRY_COMPACT_H
33#define __ASM_ARC_ENTRY_COMPACT_H
34
35#include <asm/asm-offsets.h>
36#include <asm/irqflags-compact.h>
37#include <asm/thread_info.h> /* For THREAD_SIZE */
38
39#ifdef CONFIG_ARC_PLAT_EZNPS
40#include <plat/ctop.h>
41#endif
42
39/*--------------------------------------------------------------
40 * Switch to Kernel Mode stack if SP points to User Mode stack
41 *
42 * Entry : r9 contains pre-IRQ/exception/trap status32
43 * Exit : SP set to K mode stack
44 * SP at the time of entry (K/U) saved @ pt_regs->sp
45 * Clobbers: r9
46 *-------------------------------------------------------------*/

--- 244 unchanged lines hidden (view full) ---

291 /* orig_r0, ECR, user_r25 skipped automatically */
292.endm
293
294/* Get thread_info of "current" tsk */
295.macro GET_CURR_THR_INFO_FROM_SP reg
296 bic \reg, sp, (THREAD_SIZE - 1)
297.endm
298
43/*--------------------------------------------------------------
44 * Switch to Kernel Mode stack if SP points to User Mode stack
45 *
46 * Entry : r9 contains pre-IRQ/exception/trap status32
47 * Exit : SP set to K mode stack
48 * SP at the time of entry (K/U) saved @ pt_regs->sp
49 * Clobbers: r9
50 *-------------------------------------------------------------*/

--- 244 unchanged lines hidden (view full) ---

295 /* orig_r0, ECR, user_r25 skipped automatically */
296.endm
297
298/* Get thread_info of "current" tsk */
299.macro GET_CURR_THR_INFO_FROM_SP reg
300 bic \reg, sp, (THREAD_SIZE - 1)
301.endm
302
303#ifndef CONFIG_ARC_PLAT_EZNPS
299/* Get CPU-ID of this core */
300.macro GET_CPU_ID reg
301 lr \reg, [identity]
302 lsr \reg, \reg, 8
303 bmsk \reg, \reg, 7
304.endm
304/* Get CPU-ID of this core */
305.macro GET_CPU_ID reg
306 lr \reg, [identity]
307 lsr \reg, \reg, 8
308 bmsk \reg, \reg, 7
309.endm
310#endif
305
306#endif /* __ASM_ARC_ENTRY_COMPACT_H */
311
312#endif /* __ASM_ARC_ENTRY_COMPACT_H */