Commit 6b57ba8e authored by Zong Li's avatar Zong Li Committed by Paul Walmsley
Browse files

riscv: clean up the macro format in each header file



There are many different formats in each header now, such as
_ASM_XXX_H, __ASM_XXX_H, _ASM_RISCV_XXX_H, RISCV_XXX_H, etc., This patch
tries to unify the format by using _ASM_RISCV_XXX_H, because the most
header use it now. This patch also adds the conditional to the headers
if they lost it.

Signed-off-by: default avatarZong Li <zong.li@sifive.com>
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
parent 0fdc636c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_RISCV_PROTOTYPES_H
#define _ASM_RISCV_PROTOTYPES_H

#include <linux/ftrace.h>
#include <asm-generic/asm-prototypes.h>
+3 −3
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@
 */


#ifndef __ASM_CURRENT_H
#define __ASM_CURRENT_H
#ifndef _ASM_RISCV_CURRENT_H
#define _ASM_RISCV_CURRENT_H

#include <linux/bug.h>
#include <linux/compiler.h>
@@ -34,4 +34,4 @@ static __always_inline struct task_struct *get_current(void)

#endif /* __ASSEMBLY__ */

#endif /* __ASM_CURRENT_H */
#endif /* _ASM_RISCV_CURRENT_H */
+5 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2017 Andes Technology Corporation */

#ifndef _ASM_RISCV_FTRACE_H
#define _ASM_RISCV_FTRACE_H

/*
 * The graph frame test is not possible if CONFIG_FRAME_POINTER is not enabled.
 * Check arch/riscv/kernel/mcount.S for detail.
@@ -64,3 +67,5 @@ do { \
 */
#define MCOUNT_INSN_SIZE 8
#endif

#endif /* _ASM_RISCV_FTRACE_H */
+3 −3
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@
 * Copyright (c) 2018  Jim Wilson (jimw@sifive.com)
 */

#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifndef _ASM_RISCV_FUTEX_H
#define _ASM_RISCV_FUTEX_H

#include <linux/futex.h>
#include <linux/uaccess.h>
@@ -112,4 +112,4 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
	return ret;
}

#endif /* _ASM_FUTEX_H */
#endif /* _ASM_RISCV_FUTEX_H */
+4 −3
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@
 * Copyright (C) 2012 ARM Ltd.
 * Copyright (C) 2017 SiFive
 */
#ifndef __ASM_HWCAP_H
#define __ASM_HWCAP_H
#ifndef _ASM_RISCV_HWCAP_H
#define _ASM_RISCV_HWCAP_H

#include <uapi/asm/hwcap.h>

@@ -23,4 +23,5 @@ enum {

extern unsigned long elf_hwcap;
#endif
#endif

#endif /* _ASM_RISCV_HWCAP_H */
Loading