lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B85A65D85D7EB246BE421B3FB0FBB593023458C2BA@dbde02.ent.ti.com>
Date:	Fri, 22 Oct 2010 15:29:52 +0530
From:	"Kamoolkar, Mugdha" <mugdha@...com>
To:	Ohad Ben-Cohen <ohad@...ery.com>
CC:	Kevin Hilman <khilman@...prootsystems.com>,
	"Krishnamoorthy, Balaji T" <balajitk@...com>,
	"Kamat, Nishant" <nskamat@...com>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	Greg KH <greg@...ah.com>, Tony Lindgren <tony@...mide.com>,
	"Cousson, Benoit" <b-cousson@...com>,
	Grant Likely <grant.likely@...retlab.ca>,
	"Kanigeri, Hari" <h-kanigeri2@...com>,
	"Anna, Suman" <s-anna@...com>
Subject: RE: [PATCH 3/3] omap: add hwspinlock device

> -----Original Message-----
> From: Ohad Ben-Cohen [mailto:ohad@...ery.com]
> Sent: Thursday, October 21, 2010 2:37 PM
> To: Kamoolkar, Mugdha
> Cc: Kevin Hilman; Krishnamoorthy, Balaji T; Kamat, Nishant; linux-
> omap@...r.kernel.org; linux-kernel@...r.kernel.org; linux-arm-
> kernel@...ts.infradead.org; akpm@...ux-foundation.org; Greg KH; Tony
> Lindgren; Cousson, Benoit; Grant Likely; Kanigeri, Hari; Anna, Suman
> Subject: Re: [PATCH 3/3] omap: add hwspinlock device
> 
> On Thu, Oct 21, 2010 at 10:36 AM, Kamoolkar, Mugdha <mugdha@...com>
> wrote:
> >> <khilman@...prootsystems.com> wrote:
> >> > Yes, that would indeed simplify things.
> >>
> >> Balaji, Nishant, are you OK with this ?
> >>
> > The problem with this approach is that the i2c driver would have to
> > sync up on the shared memory location that it uses to share the
> > information of the spinlock ID.
> 
> I agree.
> 
> But we seem to have this sort of problem anyway:
> 
> Since we are forbidden to take a hwspinlock over a lengthy period of
> time, i2c-omap can't really use it directly to achieve mutual
> exclusion over the entire i2c transfer (which is long and involved
> sleeping).
> 
> It was suggested that i2c-omap would only use the hwspinlock to
> protect a shared memory entry which would indicate the owner of the
> i2c bus. Either that, or use something like Peterson's mutual
> exclusion algorithm which is entirely implemented in software.
> 
> Both of the latter approaches involves sync'ing up on a shared memory
> location..  so it seems like i2c-omap anyway has to deal with this
> kind of pain, and having a predefined hwspinlock id number doesn't
> relieve it.
> 
> What do you think ?
That is true. Perhaps we should consider adding a software 
implementation over HW spinlocks. We were anyway considering doing this, 
because the number of hw spinlocks available for our usage are not 
sufficient when we look at multi-channel use-cases. So adding a software 
module that uses a hardware spinlock for protection of its shared memory 
could be written, and then i2c could use that software module. In that 
case, if this is the only reason why i2c driver needs shared memory, 
that need would go away.

> 
> Thanks,
> Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ