| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | 4 | * |
|---|
| 8 | 5 | * Vineetg: Aug 2009 |
|---|
| 9 | 6 | * -"C" version of lowest level context switch asm macro called by schedular |
|---|
| .. | .. |
|---|
| 17 | 14 | #include <asm/asm-offsets.h> |
|---|
| 18 | 15 | #include <linux/sched.h> |
|---|
| 19 | 16 | #include <linux/sched/debug.h> |
|---|
| 20 | | -#ifdef CONFIG_ARC_PLAT_EZNPS |
|---|
| 21 | | -#include <plat/ctop.h> |
|---|
| 22 | | -#endif |
|---|
| 23 | 17 | |
|---|
| 24 | 18 | #define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4) |
|---|
| 25 | 19 | |
|---|
| .. | .. |
|---|
| 71 | 65 | #ifndef CONFIG_SMP |
|---|
| 72 | 66 | "st %2, [@_current_task] \n\t" |
|---|
| 73 | 67 | #else |
|---|
| 74 | | -#ifdef CONFIG_ARC_PLAT_EZNPS |
|---|
| 75 | | - "lr r24, [%4] \n\t" |
|---|
| 76 | | -#ifndef CONFIG_EZNPS_MTM_EXT |
|---|
| 77 | | - "lsr r24, r24, 4 \n\t" |
|---|
| 78 | | -#endif |
|---|
| 79 | | -#else |
|---|
| 80 | 68 | "lr r24, [identity] \n\t" |
|---|
| 81 | 69 | "lsr r24, r24, 8 \n\t" |
|---|
| 82 | 70 | "bmsk r24, r24, 7 \n\t" |
|---|
| 83 | | -#endif |
|---|
| 84 | 71 | "add2 r24, @_current_task, r24 \n\t" |
|---|
| 85 | 72 | "st %2, [r24] \n\t" |
|---|
| 86 | 73 | #endif |
|---|
| .. | .. |
|---|
| 118 | 105 | |
|---|
| 119 | 106 | : "=r"(tmp) |
|---|
| 120 | 107 | : "n"(KSP_WORD_OFF), "r"(next), "r"(prev) |
|---|
| 121 | | -#ifdef CONFIG_ARC_PLAT_EZNPS |
|---|
| 122 | | - , "i"(CTOP_AUX_LOGIC_GLOBAL_ID) |
|---|
| 123 | | -#endif |
|---|
| 124 | 108 | : "blink" |
|---|
| 125 | 109 | ); |
|---|
| 126 | 110 | |
|---|