All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Grant Grundler <grundler-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Linux DeviceTree
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux Samsung SOC
	<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Prathyush <prathyush.k-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Sachin Kamat
	<sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Linux Kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux IOMMU
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Sylwester Nawrocki
	<s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Antonios Motakis
	<a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>,
	Cho KyongHo <pullip.cho-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Linux ARM Kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Rahul Sharma
	<rahul.sharma-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions
Date: Wed, 19 Mar 2014 18:30:14 +0100	[thread overview]
Message-ID: <5329D426.9020706@samsung.com> (raw)
In-Reply-To: <CANEJEGuYz28dGT+264CYtG+Tk6htOq=u-t4PWMtsij32X0vJFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Grant,

On 19.03.2014 18:03, Grant Grundler wrote:
> On Wed, Mar 19, 2014 at 6:12 AM, Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> ...
>> No. Proper Linux drivers must support deferred probing mechanism and there
>> should be no assumptions about probing orders. Using other initcall level
>> than module_initcall for particular drivers is strongly discouraged.
>
> That's true for "end-point" devices. It's not true for
> "infrastructure": Memory, CPU, DMA, Interrupt handling, etc. Those
> need to be in place before "normal" drivers get called. This SysMMU
> driver provides DMA services for "normal" device drivers. Or do I see
> that wrong?

Of course using an early initcall level would give you some kind of 
guarantees, but it wouldn't guarantee that someone couldn't lower 
initcall level for some MMU client driver and break the ordering anyway.

As I said, AFAIK the trend is to get rid of ordering by initcalls and 
make sure that drivers can handle missing dependencies properly, even 
for "services" such as DMA, GPIO, clocks and so on, which after all are 
provided by normal drivers like other.

>
> thanks,
> grant
>
> ps. I've written IOMMU support for four different IOMMUs on three
> operating systems (See drivers/parisc for two linux examples). But I
> still feel like I at best have 80% understanding of how this one is
> organized/works. Abstract descriptions and convoluted code have been
> handicapping me (and lack of time to dig further).

Well, this is one of my concerns with this driver. It isn't easy to read 
(and so review, maintain, extend and debug found issues).

Best regards,
Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions
Date: Wed, 19 Mar 2014 18:30:14 +0100	[thread overview]
Message-ID: <5329D426.9020706@samsung.com> (raw)
In-Reply-To: <CANEJEGuYz28dGT+264CYtG+Tk6htOq=u-t4PWMtsij32X0vJFA@mail.gmail.com>

Hi Grant,

On 19.03.2014 18:03, Grant Grundler wrote:
> On Wed, Mar 19, 2014 at 6:12 AM, Tomasz Figa <t.figa@samsung.com> wrote:
> ...
>> No. Proper Linux drivers must support deferred probing mechanism and there
>> should be no assumptions about probing orders. Using other initcall level
>> than module_initcall for particular drivers is strongly discouraged.
>
> That's true for "end-point" devices. It's not true for
> "infrastructure": Memory, CPU, DMA, Interrupt handling, etc. Those
> need to be in place before "normal" drivers get called. This SysMMU
> driver provides DMA services for "normal" device drivers. Or do I see
> that wrong?

Of course using an early initcall level would give you some kind of 
guarantees, but it wouldn't guarantee that someone couldn't lower 
initcall level for some MMU client driver and break the ordering anyway.

As I said, AFAIK the trend is to get rid of ordering by initcalls and 
make sure that drivers can handle missing dependencies properly, even 
for "services" such as DMA, GPIO, clocks and so on, which after all are 
provided by normal drivers like other.

>
> thanks,
> grant
>
> ps. I've written IOMMU support for four different IOMMUs on three
> operating systems (See drivers/parisc for two linux examples). But I
> still feel like I at best have 80% understanding of how this one is
> organized/works. Abstract descriptions and convoluted code have been
> handicapping me (and lack of time to dig further).

Well, this is one of my concerns with this driver. It isn't easy to read 
(and so review, maintain, extend and debug found issues).

Best regards,
Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: Tomasz Figa <t.figa@samsung.com>
To: Grant Grundler <grundler@chromium.org>
Cc: Cho KyongHo <pullip.cho@samsung.com>,
	Linux ARM Kernel <linux-arm-kernel@lists.infradead.org>,
	Linux DeviceTree <devicetree@vger.kernel.org>,
	Linux IOMMU <iommu@lists.linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>,
	Antonios Motakis <a.motakis@virtualopensystems.com>,
	Joerg Roedel <joro@8bytes.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Prathyush <prathyush.k@samsung.com>,
	Rahul Sharma <rahul.sharma@samsung.com>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Varun Sethi <Varun.Sethi@freescale.com>
Subject: Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions
Date: Wed, 19 Mar 2014 18:30:14 +0100	[thread overview]
Message-ID: <5329D426.9020706@samsung.com> (raw)
In-Reply-To: <CANEJEGuYz28dGT+264CYtG+Tk6htOq=u-t4PWMtsij32X0vJFA@mail.gmail.com>

Hi Grant,

On 19.03.2014 18:03, Grant Grundler wrote:
> On Wed, Mar 19, 2014 at 6:12 AM, Tomasz Figa <t.figa@samsung.com> wrote:
> ...
>> No. Proper Linux drivers must support deferred probing mechanism and there
>> should be no assumptions about probing orders. Using other initcall level
>> than module_initcall for particular drivers is strongly discouraged.
>
> That's true for "end-point" devices. It's not true for
> "infrastructure": Memory, CPU, DMA, Interrupt handling, etc. Those
> need to be in place before "normal" drivers get called. This SysMMU
> driver provides DMA services for "normal" device drivers. Or do I see
> that wrong?

Of course using an early initcall level would give you some kind of 
guarantees, but it wouldn't guarantee that someone couldn't lower 
initcall level for some MMU client driver and break the ordering anyway.

As I said, AFAIK the trend is to get rid of ordering by initcalls and 
make sure that drivers can handle missing dependencies properly, even 
for "services" such as DMA, GPIO, clocks and so on, which after all are 
provided by normal drivers like other.

>
> thanks,
> grant
>
> ps. I've written IOMMU support for four different IOMMUs on three
> operating systems (See drivers/parisc for two linux examples). But I
> still feel like I at best have 80% understanding of how this one is
> organized/works. Abstract descriptions and convoluted code have been
> handicapping me (and lack of time to dig further).

Well, this is one of my concerns with this driver. It isn't easy to read 
(and so review, maintain, extend and debug found issues).

Best regards,
Tomasz

  parent reply	other threads:[~2014-03-19 17:30 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14  5:08 [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions Cho KyongHo
2014-03-14  5:08 ` Cho KyongHo
2014-03-14  5:08 ` Cho KyongHo
     [not found] ` <20140314140843.ba055f28dd7ed59c46088029-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-14 12:59   ` Tomasz Figa
2014-03-14 12:59     ` Tomasz Figa
2014-03-14 12:59     ` Tomasz Figa
2014-03-18  9:56     ` Cho KyongHo
2014-03-18  9:56       ` Cho KyongHo
     [not found]       ` <20140318185605.0380c8dfe6559c06183092e5-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-18 15:09         ` Tomasz Figa
2014-03-18 15:09           ` Tomasz Figa
2014-03-18 15:09           ` Tomasz Figa
     [not found]           ` <532861BE.7020601-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-19  1:03             ` Cho KyongHo
2014-03-19  1:03               ` Cho KyongHo
2014-03-19  1:03               ` Cho KyongHo
     [not found]               ` <20140319100304.5e26fa43ccdfc29178b058e1-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-19 13:12                 ` Tomasz Figa
2014-03-19 13:12                   ` Tomasz Figa
2014-03-19 13:12                   ` Tomasz Figa
     [not found]                   ` <532997D7.6090608-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-19 16:54                     ` Grant Grundler
2014-03-19 16:54                       ` Grant Grundler
2014-03-19 16:54                       ` Grant Grundler
2014-03-20 11:55                       ` Cho KyongHo
2014-03-20 11:55                         ` Cho KyongHo
2014-03-19 17:03                     ` Grant Grundler
2014-03-19 17:03                       ` Grant Grundler
2014-03-19 17:03                       ` Grant Grundler
     [not found]                       ` <CANEJEGuYz28dGT+264CYtG+Tk6htOq=u-t4PWMtsij32X0vJFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-19 17:30                         ` Tomasz Figa [this message]
2014-03-19 17:30                           ` Tomasz Figa
2014-03-19 17:30                           ` Tomasz Figa
     [not found]                           ` <5329D426.9020706-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-19 18:37                             ` Grant Grundler
2014-03-19 18:37                               ` Grant Grundler
2014-03-19 18:37                               ` Grant Grundler
     [not found]                               ` <CANEJEGtCdMmWXwpoky8USLOBw7jAt1bRw8or-mDK7twxAzhWpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-19 18:51                                 ` Tomasz Figa
2014-03-19 18:51                                   ` Tomasz Figa
2014-03-19 18:51                                   ` Tomasz Figa
     [not found]                                   ` <5329E729.4020201-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-20 12:07                                     ` Cho KyongHo
2014-03-20 12:07                                       ` Cho KyongHo
2014-03-20 12:07                                       ` Cho KyongHo

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=5329D426.9020706@samsung.com \
    --to=t.figa-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grundler-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=prathyush.k-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=pullip.cho-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=rahul.sharma-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.