All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ux500: Adding support for u8500 Hsem functionality V2
Date: Sun, 17 Apr 2011 22:39:57 +0200	[thread overview]
Message-ID: <201104172239.57362.arnd@arndb.de> (raw)
In-Reply-To: <4DA4A44D.5020208@linaro.org>

On Tuesday 12 April 2011, Mathieu Poirier wrote:
> > struct u8500_hsem_state {
> >       void __iomem *io_base;
> >       struct u8500_hsem hsem[U8500_MAX_SEMAPHORE];
> > }
> I don't see the real advantage in doing a single allocation - the 
> dynamic allocation method is also used in 'omap_hwspinlock.c'.  Is 
> modification mandatory to get the driver accepted ?

Not strictly required, but somewhat cleaner IMHO. If you have a good
reason for splitting the allocations, just document that clearly.

One more thing I just noticed: the hwspinlock_internal.h file defines
the hwspinlock->id field as "a global, unique, system-wide, index of
the lock", but the u8500 hsem just sets it to an integer starting
at zero. If there are multiple devices providing hwspinlocks in the
same system, that cannot work.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
	ohad@wizery.com, linus.walleij@stericsson.com,
	patches@linaro.org, linux-kernel@vger.kernel.org,
	lee.jones@linaro.org
Subject: Re: [PATCH 1/2] ux500: Adding support for u8500 Hsem functionality V2
Date: Sun, 17 Apr 2011 22:39:57 +0200	[thread overview]
Message-ID: <201104172239.57362.arnd@arndb.de> (raw)
In-Reply-To: <4DA4A44D.5020208@linaro.org>

On Tuesday 12 April 2011, Mathieu Poirier wrote:
> > struct u8500_hsem_state {
> >       void __iomem *io_base;
> >       struct u8500_hsem hsem[U8500_MAX_SEMAPHORE];
> > }
> I don't see the real advantage in doing a single allocation - the 
> dynamic allocation method is also used in 'omap_hwspinlock.c'.  Is 
> modification mandatory to get the driver accepted ?

Not strictly required, but somewhat cleaner IMHO. If you have a good
reason for splitting the allocations, just document that clearly.

One more thing I just noticed: the hwspinlock_internal.h file defines
the hwspinlock->id field as "a global, unique, system-wide, index of
the lock", but the u8500 hsem just sets it to an integer starting
at zero. If there are multiple devices providing hwspinlocks in the
same system, that cannot work.

	Arnd

  parent reply	other threads:[~2011-04-17 20:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 15:24 [PATCH 1/2] ux500: Adding support for u8500 Hsem functionality V2 mathieu.poirier at linaro.org
2011-04-11 15:24 ` mathieu.poirier
2011-04-12 13:44 ` Ohad Ben-Cohen
2011-04-12 13:44   ` Ohad Ben-Cohen
2011-04-12 16:53   ` Mathieu Poirier
2011-04-12 16:53     ` Mathieu Poirier
2011-04-12 17:46 ` Arnd Bergmann
2011-04-12 17:46   ` Arnd Bergmann
2011-04-12 19:13   ` Mathieu Poirier
2011-04-12 19:13     ` Mathieu Poirier
2011-04-13  8:45     ` Ohad Ben-Cohen
2011-04-13  8:45       ` Ohad Ben-Cohen
2011-04-17 20:39     ` Arnd Bergmann [this message]
2011-04-17 20:39       ` Arnd Bergmann
2011-04-19 16:06       ` Mathieu Poirier
2011-04-19 16:06         ` Mathieu Poirier
2011-04-19 16:10         ` Arnd Bergmann
2011-04-19 16:10           ` Arnd Bergmann
2011-09-05 21:09           ` Ohad Ben-Cohen
2011-09-05 21:09             ` Ohad Ben-Cohen
2011-09-06  7:15             ` Linus Walleij
2011-09-06  7:15               ` Linus Walleij
2011-09-06  7:27               ` Ohad Ben-Cohen
2011-09-06  7:27                 ` Ohad Ben-Cohen
2011-04-13  8:16   ` Ohad Ben-Cohen
2011-04-13  8:16     ` Ohad Ben-Cohen

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=201104172239.57362.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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.