All of lore.kernel.org
 help / color / mirror / Atom feed
* ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
@ 2018-12-18  9:36 Helmut Grohne
  2018-12-18 10:09 ` Russell King - ARM Linux
  2018-12-18 21:53 ` Ben Hutchings
  0 siblings, 2 replies; 8+ messages in thread
From: Helmut Grohne @ 2018-12-18  9:36 UTC (permalink / raw)
  To: Ben Hutchings, Catalin Marinas, Will Deacon, linux-arm-kernel,
	Paul Durrant, Boris Ostrovsky, Juergen Gross

Hi,

During a compile test of v4.20-rc7 for armhf (cross build), I
encountered:

ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!

Some searching brought up c5157101e77 ("arm64: mm: Export
__sync_icache_dcache() for xen-privcmd"), which fixes a very similar
problem for arm64. Is that commit maybe also needed for arm?

Helmut

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2018-12-18  9:36 ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined! Helmut Grohne
@ 2018-12-18 10:09 ` Russell King - ARM Linux
  2018-12-18 13:21   ` Catalin Marinas
  2018-12-18 21:53 ` Ben Hutchings
  1 sibling, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2018-12-18 10:09 UTC (permalink / raw)
  To: Helmut Grohne
  Cc: Juergen Gross, Catalin Marinas, Will Deacon, Paul Durrant,
	Boris Ostrovsky, Ben Hutchings, linux-arm-kernel

On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
> Hi,
> 
> During a compile test of v4.20-rc7 for armhf (cross build), I
> encountered:
> 
> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> 
> Some searching brought up c5157101e77 ("arm64: mm: Export
> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
> problem for arm64. Is that commit maybe also needed for arm?

I would rather not export that function for drivers to abuse.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2018-12-18 10:09 ` Russell King - ARM Linux
@ 2018-12-18 13:21   ` Catalin Marinas
  2019-03-04 22:04     ` Boris Ostrovsky
  0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2018-12-18 13:21 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Juergen Gross, Helmut Grohne, Will Deacon, Paul Durrant,
	Boris Ostrovsky, Ben Hutchings, linux-arm-kernel

On Tue, Dec 18, 2018 at 10:09:09AM +0000, Russell King wrote:
> On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
> > During a compile test of v4.20-rc7 for armhf (cross build), I
> > encountered:
> > 
> > ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> > 
> > Some searching brought up c5157101e77 ("arm64: mm: Export
> > __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
> > problem for arm64. Is that commit maybe also needed for arm?
> 
> I would rather not export that function for drivers to abuse.

I think that's a lower risk than the other cache maintenance functions.
This function only deals with the cache maintenance to PoU while
drivers, in general, are more interested in the PoC.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2018-12-18  9:36 ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined! Helmut Grohne
  2018-12-18 10:09 ` Russell King - ARM Linux
@ 2018-12-18 21:53 ` Ben Hutchings
  1 sibling, 0 replies; 8+ messages in thread
From: Ben Hutchings @ 2018-12-18 21:53 UTC (permalink / raw)
  To: Helmut Grohne, Catalin Marinas, Will Deacon, linux-arm-kernel,
	Paul Durrant, Boris Ostrovsky, Juergen Gross


[-- Attachment #1.1: Type: text/plain, Size: 651 bytes --]

On Tue, 2018-12-18 at 10:36 +0100, Helmut Grohne wrote:
> Hi,
> 
> During a compile test of v4.20-rc7 for armhf (cross build), I
> encountered:
> 
> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> 
> Some searching brought up c5157101e77 ("arm64: mm: Export
> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
> problem for arm64. Is that commit maybe also needed for arm?

Yes, I submitted the corresponding patch some months ago:
<https://marc.info/?l=linux-arm-kernel&m=153134944429241>

Ben.

> Helmut
-- 
Ben Hutchings
Anthony's Law of Force: Don't force it, get a larger hammer.


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2018-12-18 13:21   ` Catalin Marinas
@ 2019-03-04 22:04     ` Boris Ostrovsky
  2019-03-04 22:28       ` Catalin Marinas
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Ostrovsky @ 2019-03-04 22:04 UTC (permalink / raw)
  To: Catalin Marinas, Russell King - ARM Linux
  Cc: Juergen Gross, Arnd Bergmann, Helmut Grohne, Will Deacon,
	Paul Durrant, Ben Hutchings, linux-arm-kernel

On 12/18/18 8:21 AM, Catalin Marinas wrote:
> On Tue, Dec 18, 2018 at 10:09:09AM +0000, Russell King wrote:
>> On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
>>> During a compile test of v4.20-rc7 for armhf (cross build), I
>>> encountered:
>>>
>>> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
>>>
>>> Some searching brought up c5157101e77 ("arm64: mm: Export
>>> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
>>> problem for arm64. Is that commit maybe also needed for arm?
>> I would rather not export that function for drivers to abuse.


(I am reviving this thread because Arnd submitted a patch to work around
this issue
https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/ )

Even when the same routine in arm64 is exported for this very reason?

The patch above it going into a lot of trouble to make things work so I
am hoping this can be re-considered.


Thanks.
-boris


> I think that's a lower risk than the other cache maintenance functions.
> This function only deals with the cache maintenance to PoU while
> drivers, in general, are more interested in the PoC.
>




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2019-03-04 22:04     ` Boris Ostrovsky
@ 2019-03-04 22:28       ` Catalin Marinas
  2019-03-04 22:49         ` Boris Ostrovsky
  0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2019-03-04 22:28 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Juergen Gross, Arnd Bergmann, Helmut Grohne, Will Deacon,
	Russell King - ARM Linux, Paul Durrant, Ben Hutchings,
	linux-arm-kernel

On Mon, Mar 04, 2019 at 05:04:10PM -0500, Boris Ostrovsky wrote:
> On 12/18/18 8:21 AM, Catalin Marinas wrote:
> > On Tue, Dec 18, 2018 at 10:09:09AM +0000, Russell King wrote:
> >> On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
> >>> During a compile test of v4.20-rc7 for armhf (cross build), I
> >>> encountered:
> >>>
> >>> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> >>>
> >>> Some searching brought up c5157101e77 ("arm64: mm: Export
> >>> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
> >>> problem for arm64. Is that commit maybe also needed for arm?
> >> I would rather not export that function for drivers to abuse.
> 
> (I am reviving this thread because Arnd submitted a patch to work around
> this issue
> https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/ )
> 
> Even when the same routine in arm64 is exported for this very reason?
> 
> The patch above it going into a lot of trouble to make things work so I
> am hoping this can be re-considered.

It's Russell's decision whether to export this or not for arch/arm/. As
I said, I don't really see drivers abusing this since it doesn't help
with DMA cache maintenance (it only cleans to the PoU rather than PoC as
needed for DMA).

Now, the actual question is whether set_pte_at() is allowed to be called
from loadable modules. If yes, then __sync_icache_dcache() needs to be
exported. Otherwise, Arnd's patch looks fine. Grep'ing (5.0-rc3)
drivers/ for set_pte_at() I can only see 4 instances: one in
gpu/drm/i915/ which is not compiled as a module and three in xen/. Of
the latter, one is x86 only, the second is built-in and the third is
fixed by Arnd's patch.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2019-03-04 22:28       ` Catalin Marinas
@ 2019-03-04 22:49         ` Boris Ostrovsky
  2019-03-05  8:08           ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Ostrovsky @ 2019-03-04 22:49 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Juergen Gross, Arnd Bergmann, Helmut Grohne, Will Deacon,
	Russell King - ARM Linux, Paul Durrant, Ben Hutchings,
	linux-arm-kernel

On 3/4/19 5:28 PM, Catalin Marinas wrote:
> On Mon, Mar 04, 2019 at 05:04:10PM -0500, Boris Ostrovsky wrote:
>> On 12/18/18 8:21 AM, Catalin Marinas wrote:
>>> On Tue, Dec 18, 2018 at 10:09:09AM +0000, Russell King wrote:
>>>> On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
>>>>> During a compile test of v4.20-rc7 for armhf (cross build), I
>>>>> encountered:
>>>>>
>>>>> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
>>>>>
>>>>> Some searching brought up c5157101e77 ("arm64: mm: Export
>>>>> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
>>>>> problem for arm64. Is that commit maybe also needed for arm?
>>>> I would rather not export that function for drivers to abuse.
>> (I am reviving this thread because Arnd submitted a patch to work around
>> this issue
>> https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/ )
>>
>> Even when the same routine in arm64 is exported for this very reason?
>>
>> The patch above it going into a lot of trouble to make things work so I
>> am hoping this can be re-considered.
> It's Russell's decision whether to export this or not for arch/arm/. 

OK, I didn't realize there are different maintainers for arm and arm64.

In any case, the main reason I am asking this question is because the
two architectures have different policies for (what appears to me) a
very similar interface. If __sync_icache_dcache() is kept private in
arm, should then c5157101e77 be reverted (assuming Arnd's patch goes in)?

-boris

> As
> I said, I don't really see drivers abusing this since it doesn't help
> with DMA cache maintenance (it only cleans to the PoU rather than PoC as
> needed for DMA).
>
> Now, the actual question is whether set_pte_at() is allowed to be called
> from loadable modules. If yes, then __sync_icache_dcache() needs to be
> exported. Otherwise, Arnd's patch looks fine. Grep'ing (5.0-rc3)
> drivers/ for set_pte_at() I can only see 4 instances: one in
> gpu/drm/i915/ which is not compiled as a module and three in xen/. Of
> the latter, one is x86 only, the second is built-in and the third is
> fixed by Arnd's patch.
>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
  2019-03-04 22:49         ` Boris Ostrovsky
@ 2019-03-05  8:08           ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2019-03-05  8:08 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Juergen Gross, Helmut Grohne, Catalin Marinas, Will Deacon,
	Russell King - ARM Linux, Paul Durrant, Ben Hutchings, Linux ARM

On Mon, Mar 4, 2019 at 11:49 PM Boris Ostrovsky
<boris.ostrovsky@oracle.com> wrote:
> On 3/4/19 5:28 PM, Catalin Marinas wrote:
> > On Mon, Mar 04, 2019 at 05:04:10PM -0500, Boris Ostrovsky wrote:
> >> On 12/18/18 8:21 AM, Catalin Marinas wrote:
> >>> On Tue, Dec 18, 2018 at 10:09:09AM +0000, Russell King wrote:
> >>>> On Tue, Dec 18, 2018 at 10:36:32AM +0100, Helmut Grohne wrote:
> >>>>> During a compile test of v4.20-rc7 for armhf (cross build), I
> >>>>> encountered:
> >>>>>
> >>>>> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> >>>>>
> >>>>> Some searching brought up c5157101e77 ("arm64: mm: Export
> >>>>> __sync_icache_dcache() for xen-privcmd"), which fixes a very similar
> >>>>> problem for arm64. Is that commit maybe also needed for arm?
> >>>> I would rather not export that function for drivers to abuse.
> >> (I am reviving this thread because Arnd submitted a patch to work around
> >> this issue
> >> https://lore.kernel.org/lkml/20190304204826.2414365-1-arnd@arndb.de/ )
> >>
> >> Even when the same routine in arm64 is exported for this very reason?
> >>
> >> The patch above it going into a lot of trouble to make things work so I
> >> am hoping this can be re-considered.
> > It's Russell's decision whether to export this or not for arch/arm/.
>
> OK, I didn't realize there are different maintainers for arm and arm64.
>
> In any case, the main reason I am asking this question is because the
> two architectures have different policies for (what appears to me) a
> very similar interface. If __sync_icache_dcache() is kept private in
> arm, should then c5157101e77 be reverted (assuming Arnd's patch goes in)?

I don't think it make much of a difference. All callers are in the arch/, mm/,
drivers/xen, and fs/dax, and this is the only one that can currently be
a module, so I don't think we would need it otherwise.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-03-05  8:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18  9:36 ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined! Helmut Grohne
2018-12-18 10:09 ` Russell King - ARM Linux
2018-12-18 13:21   ` Catalin Marinas
2019-03-04 22:04     ` Boris Ostrovsky
2019-03-04 22:28       ` Catalin Marinas
2019-03-04 22:49         ` Boris Ostrovsky
2019-03-05  8:08           ` Arnd Bergmann
2018-12-18 21:53 ` Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.