From: gregkh@linuxfoundation•org (gregkh at linuxfoundation.org)
To: linux-arm-kernel@lists•infradead.org
Subject: [v11,1/4] drivers: jtag: Add JTAG core driver
Date: Tue, 14 Nov 2017 12:10:46 +0100 [thread overview]
Message-ID: <20171114111046.GA23820@kroah.com> (raw)
In-Reply-To: <DB6PR0501MB219753AC43515148F39CC2D0B1280@DB6PR0501MB2197.eurprd05.prod.outlook.com>
On Tue, Nov 14, 2017 at 10:34:49AM +0000, Oleksandr Shamray wrote:
> > -----Original Message-----
> > From: Chip Bilbrey [mailto:chip at bilbrey.org]
> > Sent: Monday, November 6, 2017 12:33 AM
> > To: Oleksandr Shamray <oleksandrs@mellanox•com>
> > Cc: gregkh at linuxfoundation.org; arnd at arndb.de; linux-
> > kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > devicetree at vger.kernel.org; openbmc at lists.ozlabs.org; joel at jms.id.au;
> > jiri at resnulli.us; tklauser at distanz.ch; linux-serial at vger.kernel.org;
> > mec at shout.net; Vadim Pasternak <vadimp@mellanox•com>; system-sw-low-
> > level <system-sw-low-level@mellanox•com>; robh+dt at kernel.org; openocd-
> > devel-owner at lists.sourceforge.net; linux-api at vger.kernel.org;
> > davem at davemloft.net; mchehab at kernel.org; Jiri Pirko <jiri@mellanox•com>
> > Subject: Re: [v11,1/4] drivers: jtag: Add JTAG core driver
> >
> >
> > Oleksandr Shamray writes:
>
> [..]
>
> > I notice the single-open()-per-device lock was dropped by request in an earlier
> > revision of your patches, but multiple processes trying to drive a single JTAG
> > master could wreak serious havoc if transactions get interleaved. Would
> > something like an added JTAG_LOCKCHAIN/UNLOCKCHAIN
> > ioctl() for exclusive client access be reasonable to prevent this?
> >
>
> Yes, it dropped by recommendation of Greg KH <gregkh@linuxfoundation•org>.
I asked to drop it as you didn't even implement it to work correctly :)
> Greg, what you can suggest about it. May be better to add again single-open()-per-device lock with right locking way like:
>
> >if (mutex_lock_interruptible(&jtag->open_lock)) {
You would stall an open? Why not just return saying you can't do that?
Anyway, if you want to only have one access to the device at a time,
great, but do it in a way that works properly.
thanks,
greg k-h
next prev parent reply other threads:[~2017-11-14 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 15:54 [patch v11 0/4] JTAG driver introduction Oleksandr Shamray
2017-11-03 15:54 ` [patch v11 1/4] drivers: jtag: Add JTAG core driver Oleksandr Shamray
2017-11-04 11:36 ` Greg KH
2017-11-05 22:32 ` [v11,1/4] " Chip Bilbrey
2017-11-06 14:28 ` Oleksandr Shamray
2017-11-14 10:34 ` Oleksandr Shamray
2017-11-14 11:10 ` gregkh at linuxfoundation.org [this message]
2017-11-14 11:19 ` Russell King - ARM Linux
2017-11-14 11:31 ` gregkh at linuxfoundation.org
2017-11-03 15:54 ` [patch v11 2/4] drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver Oleksandr Shamray
2017-11-03 15:54 ` [patch v11 3/4] Documentation: jtag: Add bindings for " Oleksandr Shamray
2017-11-03 15:54 ` [patch v11 4/4] Documentation: jtag: Add ABI documentation Oleksandr Shamray
2017-11-07 10:36 ` Tobias Klauser
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=20171114111046.GA23820@kroah.com \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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