On 27.09.2017 18:56, Liam Girdwood wrote:
On Wed, 2017-09-27 at 17:31 +0300, Seppo Ingalsuo wrote:
This patch adds include statements for modules to introduce the function prototypes for trig.c, numbers.c, and lib.c. In addition three unused functions are disabled with #if 0.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com
src/arch/xtensa/hal/set_region_translate.c | 2 ++ src/arch/xtensa/xtos/exc-syscall-c-handler.c | 3 +++ src/lib/lib.c | 1 + src/math/numbers.c | 2 ++ src/math/trig.c | 1 + 5 files changed, 9 insertions(+)
diff --git a/src/arch/xtensa/hal/set_region_translate.c b/src/arch/xtensa/hal/set_region_translate.c index 7e885f6..5d5b21d 100644 --- a/src/arch/xtensa/hal/set_region_translate.c +++ b/src/arch/xtensa/hal/set_region_translate.c @@ -69,6 +69,7 @@ static inline unsigned probe_itlb(unsigned addr) { return tmp; }
+#if 0 void invalidate_dtlb_entry(unsigned addr) {
best to declare these in a hal header file.
OK, I will do this + next change.
Thanks, Seppo
__asm__ __volatile__("idtlb %0; dsync \n\t" : : "a" (addr)); @@ -78,6 +79,7 @@ void invalidate_itlb_entry(unsigned addr) { __asm__ __volatile__("iitlb %0 ; isync\n\t" : : "a" (addr)); } +#endif
static inline unsigned read_dtlbcfg() { unsigned long tmp; diff --git a/src/arch/xtensa/xtos/exc-syscall-c-handler.c b/src/arch/xtensa/xtos/exc-syscall-c-handler.c index 405f7b6..aa43d27 100644 --- a/src/arch/xtensa/xtos/exc-syscall-c-handler.c +++ b/src/arch/xtensa/xtos/exc-syscall-c-handler.c @@ -42,6 +42,8 @@
- _xtos_set_exception_handler( EXCCAUSE_SYSCALL,
(_xtos_handler)_xtos_p_syscall_handler );
*/
+#if 0 UserFrame* _xtos_p_syscall_handler( UserFrame *uf /*, int cause */ )
ditto in a xtos header.
{ uf->pc += 3; /* skip SYSCALL instruction */ @@ -98,4 +100,5 @@ UserFrame* _xtos_p_syscall_handler( UserFrame *uf /*, int cause */ )
return( uf );
} +#endif
diff --git a/src/lib/lib.c b/src/lib/lib.c index e1b1d9a..a1c9933 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -31,6 +31,7 @@ #include <stdint.h> #include <stdlib.h> #include <reef/reef.h> +#include <reef/alloc.h>
#if 0 // TODO: only compile if no arch memcpy is available.
diff --git a/src/math/numbers.c b/src/math/numbers.c index 579de5d..67492a0 100644 --- a/src/math/numbers.c +++ b/src/math/numbers.c @@ -35,6 +35,8 @@
*/
+#include <reef/math/numbers.h>
- int gcd(int a, int b) { int t;
diff --git a/src/math/trig.c b/src/math/trig.c index 8101980..79eb480 100644 --- a/src/math/trig.c +++ b/src/math/trig.c @@ -32,6 +32,7 @@
#include <stdint.h> #include <reef/audio/format.h> +#include <reef/math/trig.h>
#define SINE_C_Q20 341782638 /* 2*SINE_NQUART/pi in Q12.20 */