Skip to content

Commit

Permalink
am64: Allow cpu.h to be included from assembly
Browse files Browse the repository at this point in the history
Reviewed by:	jhibbits, kevans
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45081
  • Loading branch information
zxombie committed May 10, 2024
1 parent 44e72c6 commit e353ac0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/arm64/include/cpu.h
Expand Up @@ -42,8 +42,10 @@
#ifndef _MACHINE_CPU_H_
#define _MACHINE_CPU_H_

#if !defined(__ASSEMBLER__)
#include <machine/atomic.h>
#include <machine/frame.h>
#endif
#include <machine/armreg.h>

#define TRAPF_PC(tfp) ((tfp)->tf_elr)
Expand Down Expand Up @@ -198,6 +200,7 @@
#define CPU_MATCH_ERRATA_CAVIUM_THUNDERX_1_1 0
#endif

#if !defined(__ASSEMBLER__)
extern char btext[];
extern char etext[];

Expand Down Expand Up @@ -268,6 +271,7 @@ ADDRESS_TRANSLATE_FUNC(s1e0w)
ADDRESS_TRANSLATE_FUNC(s1e1r)
ADDRESS_TRANSLATE_FUNC(s1e1w)

#endif /* !__ASSEMBLER__ */
#endif

#endif /* !_MACHINE_CPU_H_ */
Expand Down

0 comments on commit e353ac0

Please sign in to comment.