2021-03-25 04:10:02

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH] 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.

Reported-by: Guenter Roeck <[email protected]>
Suggested-by: Steven Rostedt <[email protected]>
Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/tee/optee/Makefile | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
index 56263ae3b1d7..3aa33ea9e6a6 100644
--- a/drivers/tee/optee/Makefile
+++ b/drivers/tee/optee/Makefile
@@ -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)
--
2.31.0


2021-03-25 04:59:19

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote:
> 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.
>
> Reported-by: Guenter Roeck <[email protected]>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Jisheng Zhang <[email protected]>

Tested-by: Guenter Roeck <[email protected]>

> ---
> drivers/tee/optee/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
> index 56263ae3b1d7..3aa33ea9e6a6 100644
> --- a/drivers/tee/optee/Makefile
> +++ b/drivers/tee/optee/Makefile
> @@ -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)
> --
> 2.31.0
>

2021-03-30 06:56:34

by Heiko Thiery

[permalink] [raw]
Subject: Re: [PATCH] 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.
>
> Reported-by: Guenter Roeck <[email protected]>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Jisheng Zhang <[email protected]>

Fixes: 0101947dbcc3 ("tee: optee: add invoke_fn tracepoints")
Tested-by: Heiko Thiery <[email protected]>

> ---
> drivers/tee/optee/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
> index 56263ae3b1d7..3aa33ea9e6a6 100644
> --- a/drivers/tee/optee/Makefile
> +++ b/drivers/tee/optee/Makefile
> @@ -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)
> --
> 2.31.0
>

Thank you.

--
Heiko

2021-03-30 08:28:25

by Jens Wiklander

[permalink] [raw]
Subject: Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote:
> 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.
>
> Reported-by: Guenter Roeck <[email protected]>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Jisheng Zhang <[email protected]>

I've picked up this.

Thanks,
Jens

2021-04-06 21:37:06

by Jens Wiklander

[permalink] [raw]
Subject: Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

Hi Heiko,

[+Arnd]

On Tue, Apr 6, 2021 at 12:38 PM Heiko Thiery <[email protected]> wrote:
>
> Hi Jens,
>
> Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander
> <[email protected]>:
> >
> > On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote:
> > > 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.
> > >
> > > Reported-by: Guenter Roeck <[email protected]>
> > > Suggested-by: Steven Rostedt <[email protected]>
> > > Signed-off-by: Jisheng Zhang <[email protected]>
> >
> > 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

2021-04-06 23:32:22

by Heiko Thiery

[permalink] [raw]
Subject: Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

Hi Jens,

Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander
<[email protected]>:
>
> On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote:
> > 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.
> >
> > Reported-by: Guenter Roeck <[email protected]>
> > Suggested-by: Steven Rostedt <[email protected]>
> > Signed-off-by: Jisheng Zhang <[email protected]>
>
> 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).

>
> Thanks,
> Jens

Thank you,
Heiko

2021-04-07 06:08:05

by Heiko Thiery

[permalink] [raw]
Subject: Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

Hi Jens,

Am Di., 6. Apr. 2021 um 14:30 Uhr schrieb Jens Wiklander
<[email protected]>:
>
> Hi Heiko,
>
> [+Arnd]
>
> On Tue, Apr 6, 2021 at 12:38 PM Heiko Thiery <[email protected]> wrote:
> >
> > Hi Jens,
> >
> > Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander
> > <[email protected]>:
> > >
> > > On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote:
> > > > 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.
> > > >
> > > > Reported-by: Guenter Roeck <[email protected]>
> > > > Suggested-by: Steven Rostedt <[email protected]>
> > > > Signed-off-by: Jisheng Zhang <[email protected]>
> > >
> > > 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.

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

Thank you,
Heiko