Skip to content

Commit

Permalink
Added more kernel files related to #36
Browse files Browse the repository at this point in the history
  • Loading branch information
MirMohammadd committed Mar 22, 2024
1 parent 10a3162 commit 28e773b
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
16 changes: 16 additions & 0 deletions arch/alpha/sh/include/asm/types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef __ASM_SH_TYPES_H
#define __ASM_SH_TYPES_H

#include <asm-generic/int-ll64.h>
#include <heisen/typing.h>

/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifndef __ASSEMBLY__

typedef uint16_t insn_size_t;
typedef uint32_t reg_size_t;

#endif /* __ASSEMBLY__ */
#endif /* __ASM_SH_TYPES_H */
9 changes: 9 additions & 0 deletions include/heisen/bitops.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef HEISEN_BITOPS_H
#define HEISEN_BITOPS_H


#include <asm/types.h>



#endif // HEISEN_BITOPS_H
26 changes: 26 additions & 0 deletions include/uapi/heisen/const.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef _UAPI_HEISEN_CONST_H
#define _UAPI_HEISEN_CONST_H


#ifdef __ASSEMBLY__
#define _AC(X,Y) X
#define _AT(T,X) X
#else
#define __AC(X,Y) (X##Y)
#define _AC(X,Y) __AC(X,Y)
#define _AT(T,X) ((T)(X))
#endif

#define _UL(x) (_AC(x, UL))
#define _ULL(x) (_AC(x, ULL))

#define _BITUL(x) (_UL(1) << (x))
#define _BITULL(x) (_ULL(1) << (x))

#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))

#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))


#endif // _UAPI_HEISEN_CONST_H
13 changes: 13 additions & 0 deletions include/vdso/const.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef __VDSO_CONST_H
#define __VDSO_CONST_H

#include <uapi/heisen/const.h>


#define UL(x) (_UL(x))
#define ULL(x) (_ULL(x))




#endif // __VDSO_CONST_H

0 comments on commit 28e773b

Please sign in to comment.