From: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>
To: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-arm
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCHv4 0/7] omap hwspinlock dt support
Date: Mon, 17 Mar 2014 14:10:47 -0500 [thread overview]
Message-ID: <532748B7.1080606@ti.com> (raw)
In-Reply-To: <CAK=WgbZCzA7JovSxnysHCQRZZWc3Z2j3AS8ekpM9fOZ160rmCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Ohad,
On 03/17/2014 09:23 AM, Ohad Ben-Cohen wrote:
> Hi Suman,
>
> On Sat, Mar 15, 2014 at 1:58 AM, Suman Anna <s-anna-l0cyMroinI0@public.gmane.org> wrote:
>> The series doesn't change the semantics of hwspinlock registration or adds a
>> new OF controller registration function. Implementations would still need to
>> register a controller using a base_id and number of locks. The series rather
>> adds a DT-friendly function _ONLY_ for requesting a specific hwlock, and
>> there are no restrictions on the args specifier being relative id numbers.
>> Though this is what the simple default xlate helper does (most common
>> usage), the added xlate ops and #hwlock-cells should allow individual
>> implementation drivers to adjust any variations, and return a relative lock
>> w.r.t its registered base_id, as this is how a lock gets registered in the
>> first place.
>
> I might be missing something, but why can't we have the
> specifier+base_id be the hwlock id and then we can entirely drop most
> of the core changes in this patch-set?
base_id would be a property (if added) of the hwspinlock controller
node, and from DT perspective, we will be using the phandle for the
controller anyway. So, using a base_id+specifier seems redundant, as the
specifier is already w.r.t a hwspinlock controller node. It is best to
leave the base_id out, just use the specifier. This is pretty much the
standard practice (GPIOs, DMAs, etc all follow this). Please see the
comments from Mark regarding the same on an earlier version.
http://marc.info/?l=linux-omap&m=138135487703774&w=2
> I realize we couldn't easily
> support sparse id numbers, but not sure this is relevant to
> hwspinlocks? do we have a use case that couldn't be supported in this
> case?
I agree on the sparse id numbers on hwspinlock, I don't see a need for it.
>
>> I actually started out this series with the base_id property, and dropped it
>> in v3 based on comments looking at it from the request-specific-lock
>> semantics with DT. That said, the drivers still need to manage a 'base_id'
>> needed for registration when they get probed for multiple controllers.
>> Getting the base_id from DT _may_ be useful just for registration purposes,
>> but for requesting a hwlock, a controller phandle and an implementation
>> defined args-specifier should suffice IMHO.
>
> How could drivers know what the base_id is if DT doesn't provide it?
> please note that we can't depend on order of controller probing; the
> hwlock id numbers cannot depend on implementation details.
Yes, I agree this is an issue if we have to have the base_ids fixed per
controller. But I don't think it makes any difference from requesting a
lock from a client DTS node. I can bring it back if Mark agrees.
>
>> The exact notion of informing the hwspinlock core about a list of reserved
>> locks is missing at the moment (even in the non-DT case). I am not sure if
>> this got lost during the conversion of the registration from per lock to
>> registering a bank of locks together, or if it is implied by the base_id +
>> num_locks combination. The core today supports requesting only those locks
>> that were actually registered, whether allocating a free one dynamically or
>> giving a specific one.
>
> Before DT came along, early board code could have reserved specific
> hwspinlocks if needed. Now with DT, we should add the list of reserved
> locks to the controller node, in order to prevent them from being
> dynamically allocated by others.
But that strictly relied on the order of requests without any core
changes in the hwspinlock core, right. Also mandates that unique locks
were requested for different clients (left to board integration). The
early board code also has to pass on the reserved hwspinlock information
to the actual client driver somehow (platform data).
With DT, the early board code is much simplified. Looking at the same
scenario from DT case, it seems kinda redundant to specify a set of
reserved locks both in the controller node, as well as the respective
client drivers, as there is almost no platform data with DT. The only
use case for DT client nodes would be for requesting specific locks. I
agree with the problem you described, and I think it will require a
different set of changes to the core.
regards
Suman
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-03-17 19:10 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 0:19 [PATCHv4 0/7] omap hwspinlock dt support Suman Anna
2014-01-14 0:19 ` [PATCHv4 1/7] Documentation: dt: add common bindings for hwspinlock Suman Anna
2014-01-14 0:19 ` [PATCHv4 2/7] Documentation: dt: add the omap hwspinlock bindings document Suman Anna
2014-01-14 0:19 ` [PATCHv4 3/7] hwspinlock/core: maintain a list of registered hwspinlock banks Suman Anna
2014-01-14 0:19 ` [PATCHv4 4/7] hwspinlock/core: add common OF helpers Suman Anna
2014-02-07 22:49 ` Bjorn Andersson
2014-02-10 19:14 ` Suman Anna
2014-03-02 5:14 ` Ohad Ben-Cohen
2014-03-02 20:19 ` Bjorn Andersson
2014-03-03 18:46 ` Suman Anna
[not found] ` <CAJAp7Ohf43hbKatCwS5Y1+OfEkJYWOkuhZhW-E_=t_9mfM+UaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-04 17:38 ` Suman Anna
[not found] ` <53160F8F.9060405-l0cyMroinI0@public.gmane.org>
2014-03-13 16:43 ` Josh Cartwright
2014-03-14 8:58 ` Ohad Ben-Cohen
2014-03-14 13:12 ` Ohad Ben-Cohen
2014-03-14 15:23 ` Josh Cartwright
2014-03-15 17:32 ` Ohad Ben-Cohen
2014-09-26 14:40 ` Bjorn Andersson
2014-09-26 16:25 ` Suman Anna
[not found] ` <5425938C.6070007-l0cyMroinI0@public.gmane.org>
2014-10-06 9:44 ` Ohad Ben-Cohen
[not found] ` <CAK=WgbYf3++K4MVXW_n4zj-8fMEee61XG5+r40cW=trapRtJ7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-06 18:24 ` Suman Anna
[not found] ` <545BBCCB.7030107-l0cyMroinI0@public.gmane.org>
2014-11-07 5:06 ` Ohad Ben-Cohen
2014-01-14 0:19 ` [PATCHv4 6/7] hwspinlock/omap: enable module before reading SYSSTATUS register Suman Anna
2014-01-14 13:10 ` Felipe Balbi
2014-01-14 14:04 ` Felipe Balbi
[not found] ` <20140114140440.GA15785-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-01-14 16:56 ` Anna, Suman
2014-01-15 23:46 ` Anna, Suman
2014-01-15 23:36 ` [UPDATED PATCHv4 " Suman Anna
2014-01-14 0:19 ` [PATCHv4 7/7] hwspinlock/omap: enable build for AM33xx, AM43xx & DRA7xx Suman Anna
2014-01-14 13:12 ` Felipe Balbi
2014-01-14 16:51 ` Anna, Suman
2014-01-14 17:29 ` Felipe Balbi
2014-01-14 18:36 ` Anna, Suman
2014-01-14 13:12 ` [PATCHv4 0/7] omap hwspinlock dt support Felipe Balbi
[not found] ` <1389658764-39199-1-git-send-email-s-anna-l0cyMroinI0@public.gmane.org>
2014-01-14 0:19 ` [PATCHv4 5/7] hwspinlock/omap: add support for dt nodes Suman Anna
2014-02-10 19:27 ` [PATCHv4 0/7] omap hwspinlock dt support Suman Anna
2014-02-24 18:14 ` Suman Anna
[not found] ` <530B8C00.8020001-l0cyMroinI0@public.gmane.org>
2014-03-14 20:10 ` Ohad Ben-Cohen
[not found] ` <CAK=WgbZp_RQPCeZJyMRkNTQxaJsnGZ3DnjhSkYYR_-PAE_Kp4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-14 23:58 ` Suman Anna
2014-03-17 14:23 ` Ohad Ben-Cohen
[not found] ` <CAK=WgbZCzA7JovSxnysHCQRZZWc3Z2j3AS8ekpM9fOZ160rmCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-17 19:10 ` Suman Anna [this message]
[not found] ` <532748B7.1080606-l0cyMroinI0@public.gmane.org>
2014-03-17 19:47 ` Ohad Ben-Cohen
2014-03-17 23:46 ` Suman Anna
[not found] ` <53278950.5030905-l0cyMroinI0@public.gmane.org>
2014-03-18 13:35 ` Ohad Ben-Cohen
2014-03-31 22:45 ` Suman Anna
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=532748B7.1080606@ti.com \
--to=s-anna-l0cymroini0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@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 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).