mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 18:49:41 +00:00

While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Vineet Gupta <vgupta@kernel.org>
28 lines
554 B
C
28 lines
554 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
|
*/
|
|
|
|
#ifndef _ASM_ARC_SWITCH_TO_H
|
|
#define _ASM_ARC_SWITCH_TO_H
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
#include <linux/sched.h>
|
|
#include <asm/dsp-impl.h>
|
|
#include <asm/fpu.h>
|
|
|
|
struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
|
|
|
|
#define switch_to(prev, next, last) \
|
|
do { \
|
|
dsp_save_restore(prev, next); \
|
|
fpu_save_restore(prev, next); \
|
|
last = __switch_to(prev, next);\
|
|
mb(); \
|
|
} while (0)
|
|
|
|
#endif
|
|
|
|
#endif
|