summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7264380)
fix the include error of arch-listing. move them to generic as fallback
add default pool declaration to pmm_arch_init_pool
#define __LUNAIX_ARCH_GENERIC_BITS_H
#define _BITS_GENMASK(h, l) \
#define __LUNAIX_ARCH_GENERIC_BITS_H
#define _BITS_GENMASK(h, l) \
- (((1UL << ((h) + 1)) - 1) ^ ((1UL << (l)) - 1))
+ (((1 << ((h) + 1)) - 1) ^ ((1 << (l)) - 1))
#define _BITS_EXTRACT(from, h, l) \
#define _BITS_EXTRACT(from, h, l) \
- (((from) & (((1UL << (h + 1)) - 1) ^ ((1UL << l) - 1))) >> l)
+ (((from) & (((1 << (h + 1)) - 1) ^ ((1 << (l)) - 1))) >> (l))
#define _BITS_INSERT(to, from, h, l) \
#define _BITS_INSERT(to, from, h, l) \
- (((to) & ~_BITS_GENMASK(h, l)) | (((from) << l) & _BITS_GENMASK(h, l)))
+ (((to) & ~_BITS_GENMASK(h, l)) | (((from) << (l)) & _BITS_GENMASK(h, l)))
+
+#define _BITS_STATIC(val, h, l) \
+ (((val) & _BITS_GENMASK(h, l)) << (l))
#endif /* __LUNAIX_ARCH_BITS_H */
#endif /* __LUNAIX_ARCH_BITS_H */
-#ifdef CONFIG_ARCH_X86_64
+#include <lunaix/syscall.h>
+
+#ifdef CONFIG_ARCH_BITS_64
# define PTR .8byte
# define SIZE 8
#else
# define PTR .8byte
# define SIZE 8
#else
_default void
pmm_arch_init_pool(struct pmem* memory)
{
_default void
pmm_arch_init_pool(struct pmem* memory)
{
+ pmm_declare_pool(POOL_UNIFIED, 1, memory->list_len);
{
fail("unimplemented");
}
{
fail("unimplemented");
}
+
+_default pte_t
+translate_vmr_prot(unsigned int vmr_prot, pte_t pte)
+{
+ pte = pte_mkuser(pte);
+
+ if ((vmr_prot & PROT_WRITE)) {
+ pte = pte_mkwritable(pte);
+ }
+
+ if ((vmr_prot & PROT_EXEC)) {
+ pte = pte_mkexec(pte);
+ }
+ else {
+ pte = pte_mknexec(pte);
+ }
+
+ return pte;
+}
-#include <lunaix/syscall.h>
-#include "syscall_nr.inc"
+#include <asm-generic/syscall_nr.inc>
.section .text
.type syscall_hndlr, @function
.section .text
.type syscall_hndlr, @function
-#include <lunaix/syscall.h>
-#include "syscall_nr.inc"
+#include <asm-generic/syscall_nr.inc>
#include "asm/variants/interrupt64.S.inc"
.section .text
#include "asm/variants/interrupt64.S.inc"
.section .text