linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: optee: Fix compilation issue.
@ 2020-01-10 12:28 Vincenzo Frascino
  2020-01-21 14:23 ` Vincenzo Frascino
  0 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2020-01-10 12:28 UTC (permalink / raw)
  To: jens.wiklander; +Cc: tee-dev, linux-kernel, vincenzo.frascino

The optee driver uses specific page table types to verify if a memory
region is normal. These types are not defined in nommu systems. Trying
to compile the driver in these systems results in a build error:

  linux/drivers/tee/optee/call.c: In function ‘is_normal_memory’:
  linux/drivers/tee/optee/call.c:533:26: error: ‘L_PTE_MT_MASK’ undeclared
     (first use in this function); did you mean ‘PREEMPT_MASK’?
     return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
                             ^~~~~~~~~~~~~
                             PREEMPT_MASK
  linux/drivers/tee/optee/call.c:533:26: note: each undeclared identifier is
     reported only once for each function it appears in
  linux/drivers/tee/optee/call.c:533:44: error: ‘L_PTE_MT_WRITEALLOC’ undeclared
     (first use in this function)
     return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
                                            ^~~~~~~~~~~~~~~~~~~

Make the optee driver depend on MMU to fix the compilation issue.

Cc: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 drivers/tee/optee/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
index d1ad512e1708..3ca71e3812ed 100644
--- a/drivers/tee/optee/Kconfig
+++ b/drivers/tee/optee/Kconfig
@@ -3,6 +3,7 @@
 config OPTEE
 	tristate "OP-TEE"
 	depends on HAVE_ARM_SMCCC
+	depends on MMU
 	help
 	  This implements the OP-TEE Trusted Execution Environment (TEE)
 	  driver.
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-10 12:28 [PATCH] drivers: optee: Fix compilation issue Vincenzo Frascino
@ 2020-01-21 14:23 ` Vincenzo Frascino
  2020-01-21 15:20   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2020-01-21 14:23 UTC (permalink / raw)
  To: jens.wiklander, Greg Kroah-Hartman; +Cc: tee-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

Hi Greg,

I sent the fix below few days ago to the optee maintaners but I did not get any
answer. Could you please pick it up?

On 10/01/2020 12:28, Vincenzo Frascino wrote:
> The optee driver uses specific page table types to verify if a memory
> region is normal. These types are not defined in nommu systems. Trying
> to compile the driver in these systems results in a build error:
> 
>   linux/drivers/tee/optee/call.c: In function ‘is_normal_memory’:
>   linux/drivers/tee/optee/call.c:533:26: error: ‘L_PTE_MT_MASK’ undeclared
>      (first use in this function); did you mean ‘PREEMPT_MASK’?
>      return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
>                              ^~~~~~~~~~~~~
>                              PREEMPT_MASK
>   linux/drivers/tee/optee/call.c:533:26: note: each undeclared identifier is
>      reported only once for each function it appears in
>   linux/drivers/tee/optee/call.c:533:44: error: ‘L_PTE_MT_WRITEALLOC’ undeclared
>      (first use in this function)
>      return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
>                                             ^~~~~~~~~~~~~~~~~~~
> 
> Make the optee driver depend on MMU to fix the compilation issue.
> 
> Cc: Jens Wiklander <jens.wiklander@linaro.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
>  drivers/tee/optee/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
> index d1ad512e1708..3ca71e3812ed 100644
> --- a/drivers/tee/optee/Kconfig
> +++ b/drivers/tee/optee/Kconfig
> @@ -3,6 +3,7 @@
>  config OPTEE
>  	tristate "OP-TEE"
>  	depends on HAVE_ARM_SMCCC
> +	depends on MMU
>  	help
>  	  This implements the OP-TEE Trusted Execution Environment (TEE)
>  	  driver.
> 

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-21 14:23 ` Vincenzo Frascino
@ 2020-01-21 15:20   ` Greg Kroah-Hartman
  2020-01-21 15:27     ` Vincenzo Frascino
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2020-01-21 15:20 UTC (permalink / raw)
  To: Vincenzo Frascino; +Cc: jens.wiklander, tee-dev, linux-kernel

On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
> Hi Greg,
> 
> I sent the fix below few days ago to the optee maintaners but I did not get any
> answer. Could you please pick it up?

	 $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
	Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
	tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
	linux-kernel@vger.kernel.org (open list)

This should go through Jens, why me?

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-21 15:20   ` Greg Kroah-Hartman
@ 2020-01-21 15:27     ` Vincenzo Frascino
  2020-01-21 17:18       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2020-01-21 15:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: jens.wiklander, tee-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Hi Greg,

On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
> On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
>> Hi Greg,
>>
>> I sent the fix below few days ago to the optee maintaners but I did not get any
>> answer. Could you please pick it up?
> 
> 	 $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
> 	Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
> 	tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
> 	linux-kernel@vger.kernel.org (open list)
> 
> This should go through Jens, why me?
> 

I added Jens and tee-dev list in copy already but as I was mentioning in my
previous email I did not get any answer. I thought that since it is a small fix
you could help. Sorry if I made a mistake.

> greg k-h
> 

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-21 15:27     ` Vincenzo Frascino
@ 2020-01-21 17:18       ` Greg Kroah-Hartman
  2020-01-22  8:03         ` Jens Wiklander
  2020-01-22  9:36         ` Vincenzo Frascino
  0 siblings, 2 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2020-01-21 17:18 UTC (permalink / raw)
  To: Vincenzo Frascino; +Cc: jens.wiklander, tee-dev, linux-kernel

On Tue, Jan 21, 2020 at 03:27:47PM +0000, Vincenzo Frascino wrote:
> Hi Greg,
> 
> On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
> > On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
> >> Hi Greg,
> >>
> >> I sent the fix below few days ago to the optee maintaners but I did not get any
> >> answer. Could you please pick it up?
> > 
> > 	 $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
> > 	Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
> > 	tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
> > 	linux-kernel@vger.kernel.org (open list)
> > 
> > This should go through Jens, why me?
> > 
> 
> I added Jens and tee-dev list in copy already but as I was mentioning in my
> previous email I did not get any answer. I thought that since it is a small fix
> you could help. Sorry if I made a mistake.

Give people time to catch up on email, especially for obscure issues
like this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-21 17:18       ` Greg Kroah-Hartman
@ 2020-01-22  8:03         ` Jens Wiklander
  2020-01-22  9:37           ` Vincenzo Frascino
  2020-01-22  9:36         ` Vincenzo Frascino
  1 sibling, 1 reply; 9+ messages in thread
From: Jens Wiklander @ 2020-01-22  8:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Vincenzo Frascino, tee-dev @ lists . linaro . org,
	Linux Kernel Mailing List

Hi Vincenzo,

On Tue, Jan 21, 2020 at 6:18 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jan 21, 2020 at 03:27:47PM +0000, Vincenzo Frascino wrote:
> > Hi Greg,
> >
> > On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
> > > On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
> > >> Hi Greg,
> > >>
> > >> I sent the fix below few days ago to the optee maintaners but I did not get any
> > >> answer. Could you please pick it up?
> > >
> > >      $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
> > >     Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
> > >     tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
> > >     linux-kernel@vger.kernel.org (open list)
> > >
> > > This should go through Jens, why me?
> > >
> >
> > I added Jens and tee-dev list in copy already but as I was mentioning in my
> > previous email I did not get any answer. I thought that since it is a small fix
> > you could help. Sorry if I made a mistake.
>
> Give people time to catch up on email, especially for obscure issues
> like this.
>
> thanks,
>
> greg k-h

I'll pick up this patch.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-21 17:18       ` Greg Kroah-Hartman
  2020-01-22  8:03         ` Jens Wiklander
@ 2020-01-22  9:36         ` Vincenzo Frascino
  1 sibling, 0 replies; 9+ messages in thread
From: Vincenzo Frascino @ 2020-01-22  9:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: jens.wiklander, tee-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Hi Greg,

On 21/01/2020 17:18, Greg Kroah-Hartman wrote:
> On Tue, Jan 21, 2020 at 03:27:47PM +0000, Vincenzo Frascino wrote:
>> Hi Greg,
>>
>> On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
>>> On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
>>>> Hi Greg,
>>>>
>>>> I sent the fix below few days ago to the optee maintaners but I did not get any
>>>> answer. Could you please pick it up?
>>>
>>> 	 $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
>>> 	Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
>>> 	tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
>>> 	linux-kernel@vger.kernel.org (open list)
>>>
>>> This should go through Jens, why me?
>>>
>>
>> I added Jens and tee-dev list in copy already but as I was mentioning in my
>> previous email I did not get any answer. I thought that since it is a small fix
>> you could help. Sorry if I made a mistake.
> 
> Give people time to catch up on email, especially for obscure issues
> like this.
> 

This is a good advise. Thanks.

> thanks,
> 
> greg k-h
> 

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-22  8:03         ` Jens Wiklander
@ 2020-01-22  9:37           ` Vincenzo Frascino
  2020-01-23 10:15             ` Jens Wiklander
  0 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2020-01-22  9:37 UTC (permalink / raw)
  To: Jens Wiklander, Greg Kroah-Hartman
  Cc: tee-dev @ lists . linaro . org, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

Hi Jens,

On 22/01/2020 08:03, Jens Wiklander wrote:
> Hi Vincenzo,
> 
> On Tue, Jan 21, 2020 at 6:18 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>>
>> On Tue, Jan 21, 2020 at 03:27:47PM +0000, Vincenzo Frascino wrote:
>>> Hi Greg,
>>>
>>> On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
>>>> On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
>>>>> Hi Greg,
>>>>>
>>>>> I sent the fix below few days ago to the optee maintaners but I did not get any
>>>>> answer. Could you please pick it up?
>>>>
>>>>      $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
>>>>     Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
>>>>     tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
>>>>     linux-kernel@vger.kernel.org (open list)
>>>>
>>>> This should go through Jens, why me?
>>>>
>>>
>>> I added Jens and tee-dev list in copy already but as I was mentioning in my
>>> previous email I did not get any answer. I thought that since it is a small fix
>>> you could help. Sorry if I made a mistake.
>>
>> Give people time to catch up on email, especially for obscure issues
>> like this.
>>
>> thanks,
>>
>> greg k-h
> 
> I'll pick up this patch.
> 

Thanks for this, since it might break the build in some cases, do you think it
there any chance it can end up in 5.5? I know it might be late.

> Thanks,
> Jens
> 

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers: optee: Fix compilation issue.
  2020-01-22  9:37           ` Vincenzo Frascino
@ 2020-01-23 10:15             ` Jens Wiklander
  0 siblings, 0 replies; 9+ messages in thread
From: Jens Wiklander @ 2020-01-23 10:15 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: Greg Kroah-Hartman, tee-dev @ lists . linaro . org,
	Linux Kernel Mailing List

On Wed, Jan 22, 2020 at 09:37:28AM +0000, Vincenzo Frascino wrote:
> Hi Jens,
> 
> On 22/01/2020 08:03, Jens Wiklander wrote:
> > Hi Vincenzo,
> > 
> > On Tue, Jan 21, 2020 at 6:18 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> >>
> >> On Tue, Jan 21, 2020 at 03:27:47PM +0000, Vincenzo Frascino wrote:
> >>> Hi Greg,
> >>>
> >>> On 21/01/2020 15:20, Greg Kroah-Hartman wrote:
> >>>> On Tue, Jan 21, 2020 at 02:23:02PM +0000, Vincenzo Frascino wrote:
> >>>>> Hi Greg,
> >>>>>
> >>>>> I sent the fix below few days ago to the optee maintaners but I did not get any
> >>>>> answer. Could you please pick it up?
> >>>>
> >>>>      $ ./scripts/get_maintainer.pl --file drivers/tee/optee/Kconfig
> >>>>     Jens Wiklander <jens.wiklander@linaro.org> (maintainer:OP-TEE DRIVER)
> >>>>     tee-dev@lists.linaro.org (open list:OP-TEE DRIVER)
> >>>>     linux-kernel@vger.kernel.org (open list)
> >>>>
> >>>> This should go through Jens, why me?
> >>>>
> >>>
> >>> I added Jens and tee-dev list in copy already but as I was mentioning in my
> >>> previous email I did not get any answer. I thought that since it is a small fix
> >>> you could help. Sorry if I made a mistake.
> >>
> >> Give people time to catch up on email, especially for obscure issues
> >> like this.
> >>
> >> thanks,
> >>
> >> greg k-h
> > 
> > I'll pick up this patch.
> > 
> 
> Thanks for this, since it might break the build in some cases, do you think it
> there any chance it can end up in 5.5? I know it might be late.

I've just sent a pull request with this commit to arm-soc. It's their
decision if it's passed on for 5.5 or if it's too late.

Cheers,
Jens

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-23 10:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 12:28 [PATCH] drivers: optee: Fix compilation issue Vincenzo Frascino
2020-01-21 14:23 ` Vincenzo Frascino
2020-01-21 15:20   ` Greg Kroah-Hartman
2020-01-21 15:27     ` Vincenzo Frascino
2020-01-21 17:18       ` Greg Kroah-Hartman
2020-01-22  8:03         ` Jens Wiklander
2020-01-22  9:37           ` Vincenzo Frascino
2020-01-23 10:15             ` Jens Wiklander
2020-01-22  9:36         ` Vincenzo Frascino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).