Skip to contentSkip to conversation

tee: optee: fix build error caused by recent optee tracepoints feature

PATCH In review Jisheng Zhang 3 participants 6 messages Mar 25, 2021 – Apr 6, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tee: optee: fix build error caused by recent optee tracepoints feature

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Tested with and without "O=dir", both can build successfully.

---
 drivers/tee/optee/Makefile | 3 +++
 1 file changed, 3 insertions(+)
drivers/tee/optee/Makefile +3 -0
index 56263ae3b1d7..3aa33ea9e6a6 100644
@@ -6,3 +6,6 @@ optee-objs += rpc.o
 optee-objs += supp.o
 optee-objs += shm_pool.o
 optee-objs += device.o
+
+# for tracing framework to find optee_trace.h
+CFLAGS_call.o := -I$(src)
Signature · 1 line
2.31.0
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Quoted 8 lines

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Tested with and without "O=dir", both can build successfully.

Fixes 0101947dbcc3 ("tee: optee: add invoke_fn tracepoints")
Quoted 18 lines
---
 drivers/tee/optee/Makefile | 3 +++
 1 file changed, 3 insertions(+)
drivers/tee/optee/Makefile +3 -0
index 56263ae3b1d7..3aa33ea9e6a6 100644
@@ -6,3 +6,6 @@ optee-objs += rpc.o
 optee-objs += supp.o
 optee-objs += shm_pool.o
 optee-objs += device.o
+
+# for tracing framework to find optee_trace.h
+CFLAGS_call.o := -I$(src)
Signature · 1 line
2.31.0

Thank you.

Signature · 1 line
Heiko
#2 lore raw
In reply to Jisheng Zhang
Quoted 9 lines · Jisheng Zhang

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Quoted 8 lines

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Tested with and without "O=dir", both can build successfully.

I've picked up this.

Thanks,
Jens

#3 lore raw

Hi Jens,

Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander <[email protected]>:

Quoted 14 lines · Jisheng Zhang
Quoted 12 lines

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Quoted 7 lines
Quoted 5 lines

Tested with and without "O=dir", both can build successfully.

I've picked up this.

For what tree did you pick this? I still see this build failure on the latest next tree (next-20210401).

Quoted 3 lines

Thanks,
Jens

Thank you,
Heiko

#4 lore raw

Hi Heiko,

[+Arnd]

Quoted 21 lines · Heiko Thiery

Hi Jens,

Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander <[email protected]>:

Quoted 16 lines · Jisheng Zhang
Quoted 14 lines

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Tested with and without "O=dir", both can build successfully.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I've picked up this.

For what tree did you pick this? I still see this build failure on the latest next tree (next-20210401).

The next tree hasn't been updated since 1th of April so it's not unexpected. The fix is supposed to be on its way to
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/log/?h=arm/drivers
, I can't see it there yet though.

Cheers,
Jens

#5 lore raw

Hi Jens,

Am Di., 6. Apr. 2021 um 14:30 Uhr schrieb Jens Wiklander <[email protected]>:

Quoted 33 lines

Hi Heiko,

[+Arnd]

Quoted 27 lines · Heiko Thiery

Hi Jens,

Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander <[email protected]>:

Quoted 21 lines · Jisheng Zhang
Quoted 9 lines

If build kernel without "O=dir", below error will be seen:

In file included from drivers/tee/optee/optee_trace.h:67,
from drivers/tee/optee/call.c:18:
./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.

Quoted 8 lines

Fix it by adding below line to Makefile:
CFLAGS_call.o := -I$(src)

Tested with and without "O=dir", both can build successfully.

I've picked up this.

Quoted 7 lines
Quoted 2 lines

For what tree did you pick this? I still see this build failure on the latest next tree (next-20210401).

The next tree hasn't been updated since 1th of April so it's not unexpected. The fix is supposed to be on its way to
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/log/?h=arm/drivers
, I can't see it there yet though.

Ah I see. Now it has been landed in the actual next tree.

Thank you,
Heiko