linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>, Arnd Bergmann <arnd@arndb.de>,
	Helmut Grohne <helmut.grohne@intenta.de>,
	Will Deacon <will.deacon@arm.com>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Paul Durrant <paul.durrant@citrix.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
Date: Mon, 4 Mar 2019 22:28:51 +0000	[thread overview]
Message-ID: <20190304222851.GB36459@C02TF0J2HF1T.local> (raw)
In-Reply-To: <4b1af546-fb8c-f52a-1a39-ee265e7f410a@oracle.com>

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

  reply	other threads:[~2019-03-04 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-03-04 22:49         ` Boris Ostrovsky
2019-03-05  8:08           ` Arnd Bergmann
2018-12-18 21:53 ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304222851.GB36459@C02TF0J2HF1T.local \
    --to=catalin.marinas@arm.com \
    --cc=arnd@arndb.de \
    --cc=ben@decadent.org.uk \
    --cc=boris.ostrovsky@oracle.com \
    --cc=helmut.grohne@intenta.de \
    --cc=jgross@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=paul.durrant@citrix.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).