All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhushan Bharat-R65777 <R65777@freescale.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: RE: Powerpc: Kernel warn_on when enabling IOMMU_API
Date: Tue, 13 Aug 2013 15:30:08 +0000	[thread overview]
Message-ID: <6A3DF150A5B70D4F9B66A25E3F7C888D0710F95C@039-SN2MPN1-013.039d.mgd.msft.net> (raw)
In-Reply-To: <520A2C9E.7070004@ozlabs.ru>



> -----Original Message-----
> From: Alexey Kardashevskiy [mailto:aik@ozlabs.ru]
> Sent: Tuesday, August 13, 2013 6:25 PM
> To: Bhushan Bharat-R65777
> Cc: benh@kernel.crashing.org; linuxppc-dev@lists.ozlabs.org
> Subject: Re: Powerpc: Kernel warn_on when enabling IOMMU_API
>=20
> On 08/13/2013 08:44 PM, Bhushan Bharat-R65777 wrote:
> >
> >
> >> -----Original Message----- From: Alexey Kardashevskiy
> >> [mailto:aik@ozlabs.ru] Sent: Tuesday, August 13, 2013 5:41 AM To:
> >> Bhushan Bharat-R65777 Cc: benh@kernel.crashing.org;
> >> linuxppc-dev@lists.ozlabs.org Subject: Re: Powerpc: Kernel warn_on
> >> when enabling IOMMU_API
> >>
> >> On 08/13/2013 02:14 AM, Bhushan Bharat-R65777 wrote:
> >>>
> >>>
> >>>> -----Original Message----- From: Alexey Kardashevskiy
> >>>> [mailto:aik@ozlabs.ru] Sent: Monday, August 12, 2013 7:44 PM To:
> >>>> Bhushan Bharat-R65777 Cc: benh@kernel.crashing.org;
> >>>> linuxppc-dev@lists.ozlabs.org Subject: Re: Powerpc: Kernel warn_on
> >>>> when enabling IOMMU_API
> >>>>
> >>>> On 08/12/2013 08:20 PM, Bhushan Bharat-R65777 wrote:
> >>>>> And this simple fix work for me diff --git
> >>>>> a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index
> >>>>> b20ff17..8869b0d 100644 --- a/arch/powerpc/kernel/iommu.c
> >>>>> +++ b/arch/powerpc/kernel/iommu.c @@ -48,6 +48,8 @@ #include
> >>>>> <asm/vio.h> #include <asm/tce.h>
> >>>>>
> >>>>> +#define DEBUG + #define DBG(...)
> >>>>>
> >>>>> static int novmerge; @@ -871,7 +873,7 @@ void
> >>>>> iommu_free_coherent(struct iommu_table *tbl, size_t
> >>>> size,
> >>>>> } }
> >>>>>
> >>>>> -#ifdef CONFIG_IOMMU_API +#ifdef SPAPR_TCE_IOMMU /* * SPAPR TCE
> >>>>> API */ ----------------------
> >>>>
> >>>>
> >>>> And with this fix, what does "ls -laR /sys/kernel/iommu_groups/"
> >>>> print?
> >>>
> >>> It shows the list of group id and respective devices:
> >>>
> >>
> >> Is it vanilla 3.11-rc1 kernel? Wow. What does "lspci" show there?
> >
> > It is 3.11-rc1 + (FSL_IOMMU + VFIO-PCI : local changes).
> >
> > root@p5040ds:~# lspci
> 00:00.0 Class 0604: 1957:0450
> 01:00.0 Class 0200: 8086:10fb
> 00:00.0 Class 0604: 1957:0450
> 01:00.0 Class 0200: 8086:10d3
>=20
>=20
> Is it one PCI domain or two PCI domains? Hm.
>=20
> > We uses the bus_set_iommu(), generic iommu api, which creates a
> > iommu_group for a device (drivers/iommu/iommu.c) using. Also this have
> > notifier to support hotplug-able device. So when this initcall (in
> > arch/powerpc/kernel/iommu.c) is called, iommu group is already setup
> > for the device/s.
>=20
> > I think we do not need this piece of code for powerpc. So what is the
> > best way to stub this out for FSL PowerPC/IOMMU?
>=20
>=20
> So you implemented iommu_ops? Can you share your code somewhere, just to =
have a
> look?

https://lkml.org/lkml/2013/7/1/158

>=20
>=20
> > Will the above #ifdef SPAPR_TCE_IOMMU work? Other way can be selecting
> > iommu.c and dma-iommu.c in Makefile if SPAPR_TCE_IOMMU defined and not
> > if CONFIG_64BIT.
>=20
> If SPAPR_TCE_IOMMU is enabled, the code would compile and the subsys_init=
 would
> be called anyway, so normal production kernel will fail anyway.

We will not enable this on FSL powerpc,

-Bharat

>=20
>=20
>=20
> --
> Alexey

  reply	other threads:[~2013-08-13 15:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 10:20 Powerpc: Kernel warn_on when enabling IOMMU_API Bhushan Bharat-R65777
2013-08-12 14:13 ` Alexey Kardashevskiy
2013-08-12 16:14   ` Bhushan Bharat-R65777
2013-08-13  0:11     ` Alexey Kardashevskiy
2013-08-13 10:44       ` Bhushan Bharat-R65777
2013-08-13 12:54         ` Alexey Kardashevskiy
2013-08-13 15:30           ` Bhushan Bharat-R65777 [this message]
2013-08-12 16:52   ` Bhushan Bharat-R65777

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=6A3DF150A5B70D4F9B66A25E3F7C888D0710F95C@039-SN2MPN1-013.039d.mgd.msft.net \
    --to=r65777@freescale.com \
    --cc=aik@ozlabs.ru \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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 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.