97 lines
3.0 KiB
Diff
Executable File
97 lines
3.0 KiB
Diff
Executable File
From ad6bdd735ed7fc21a3f14a2a2793b218fc167917 Mon Sep 17 00:00:00 2001
|
|
From: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
|
|
Date: Wed, 19 Jul 2023 19:44:27 +0800
|
|
Subject: [PATCH] xenomai-v3.2.x-on-rockchip
|
|
|
|
Signed-off-by: Liang Chen <cl@rock-chips.com>
|
|
---
|
|
include/smokey/smokey.h | 1 +
|
|
.../arch/arm64/dovetail/include/asm/xenomai/machine.h | 2 +-
|
|
.../cobalt/arch/arm64/ipipe/include/asm/xenomai/machine.h | 2 +-
|
|
kernel/cobalt/heap.c | 6 +++---
|
|
kernel/cobalt/ipipe/sched.c | 3 +++
|
|
5 files changed, 9 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/include/smokey/smokey.h b/include/smokey/smokey.h
|
|
index 185fd3a..e276726 100644
|
|
--- a/include/smokey/smokey.h
|
|
+++ b/include/smokey/smokey.h
|
|
@@ -24,6 +24,7 @@
|
|
#include <boilerplate/libc.h>
|
|
#include <copperplate/clockobj.h>
|
|
#include <xenomai/init.h>
|
|
+#include <stdbool.h>
|
|
|
|
#ifdef HAVE_FORK
|
|
#define do_fork fork
|
|
diff --git a/kernel/cobalt/arch/arm64/dovetail/include/asm/xenomai/machine.h b/kernel/cobalt/arch/arm64/dovetail/include/asm/xenomai/machine.h
|
|
index e71a5b7..adac8d6 100644
|
|
--- a/kernel/cobalt/arch/arm64/dovetail/include/asm/xenomai/machine.h
|
|
+++ b/kernel/cobalt/arch/arm64/dovetail/include/asm/xenomai/machine.h
|
|
@@ -16,7 +16,7 @@
|
|
|
|
static inline __attribute_const__ unsigned long ffnz(unsigned long ul)
|
|
{
|
|
- int __r;
|
|
+ unsigned long __r;
|
|
|
|
/* zero input is not valid */
|
|
XENO_WARN_ON(COBALT, ul == 0);
|
|
diff --git a/kernel/cobalt/arch/arm64/ipipe/include/asm/xenomai/machine.h b/kernel/cobalt/arch/arm64/ipipe/include/asm/xenomai/machine.h
|
|
index c91c8f5..f518ee5 100644
|
|
--- a/kernel/cobalt/arch/arm64/ipipe/include/asm/xenomai/machine.h
|
|
+++ b/kernel/cobalt/arch/arm64/ipipe/include/asm/xenomai/machine.h
|
|
@@ -51,7 +51,7 @@
|
|
|
|
static inline __attribute_const__ unsigned long ffnz(unsigned long ul)
|
|
{
|
|
- int __r;
|
|
+ unsigned long __r;
|
|
|
|
/* zero input is not valid */
|
|
XENO_WARN_ON(COBALT, ul == 0);
|
|
diff --git a/kernel/cobalt/heap.c b/kernel/cobalt/heap.c
|
|
index f106d5d..f2b49d3 100644
|
|
--- a/kernel/cobalt/heap.c
|
|
+++ b/kernel/cobalt/heap.c
|
|
@@ -149,19 +149,19 @@ enum xnheap_pgtype {
|
|
page_list =2
|
|
};
|
|
|
|
-static inline u32 __always_inline
|
|
+static u32 __always_inline
|
|
gen_block_mask(int log2size)
|
|
{
|
|
return -1U >> (32 - (XNHEAP_PAGE_SIZE >> log2size));
|
|
}
|
|
|
|
-static inline __always_inline
|
|
+static __always_inline
|
|
int addr_to_pagenr(struct xnheap *heap, void *p)
|
|
{
|
|
return ((void *)p - heap->membase) >> XNHEAP_PAGE_SHIFT;
|
|
}
|
|
|
|
-static inline __always_inline
|
|
+static __always_inline
|
|
void *pagenr_to_addr(struct xnheap *heap, int pg)
|
|
{
|
|
return heap->membase + (pg << XNHEAP_PAGE_SHIFT);
|
|
diff --git a/kernel/cobalt/ipipe/sched.c b/kernel/cobalt/ipipe/sched.c
|
|
index 3104e50..aa4c356 100644
|
|
--- a/kernel/cobalt/ipipe/sched.c
|
|
+++ b/kernel/cobalt/ipipe/sched.c
|
|
@@ -62,6 +62,9 @@ static void giveup_fpu(struct xnthread *thread)
|
|
|
|
#else
|
|
|
|
+static inline void switch_fpu(void)
|
|
+{ }
|
|
+
|
|
static inline void giveup_fpu(struct xnthread *thread)
|
|
{ }
|
|
|
|
--
|
|
2.34.1
|
|
|