From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] New input patches
Date: Tue, 21 Sep 2004 08:15:34 -0500 [thread overview]
Message-ID: <200409210815.34509.dtor_core@ameritech.net> (raw)
In-Reply-To: <20040921121040.GA1603@ucw.cz>
On Tuesday 21 September 2004 07:10 am, Vojtech Pavlik wrote:
> On Thu, Sep 16, 2004 at 11:58:27PM -0500, Dmitry Torokhov wrote:
> > I think that command processing is now race free - instead of using
> > bit operations on flags the ps2_command and ps2_send_byte simply
> > take serio->lock (via serio_pause/continue_rx). Since serio->lock
> > is also taken by interrupt handler anyway it gives us desired
> > serialization. As wakeup routines take a spinlock as well and
> > spinlock is guaranteed to be a barrier we should not miss wake up
> > events either.
>
> I hope the wait_event* functions also use memory barriers properly, but
> they probably must, otherwise they won't be useful, because there we're
> accessing the flags variable without a lock.
prepare_to_wait does spin_lock/spin_unlock on when adding a task to a wait queue
and (I hope someone corrects me if I'm wrong) spin lock/unlock are guaranteed to
be memory barriers.
> - input_event(&atkbd->dev, EV_MSC, MSC_RAW, code);
> + if (atkbd->softraw)
> + input_event(&atkbd->dev, EV_MSC, MSC_RAW, code);
>
> ... we definitely want the RAW codes to be sent when we're not in
> softraw mode, because that's when they're passed through keyboard.c to
> the console.
>
> So the condition needs to be inverted. However, it's not necessary at
> all, since the input layer will not pass the RAW events when the MSC_RAW
> bit is not set.
I see, my bad. I will drop that bit.
Thanks for the comments!
--
Dmitry
next prev parent reply other threads:[~2004-09-21 13:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-17 4:58 [PATCH 0/3] New input patches Dmitry Torokhov
2004-09-17 4:59 ` [PATCH 1/3] libps2.patch Dmitry Torokhov
2004-09-17 5:00 ` [PATCH 2/3] serio-pin-driver.patch Dmitry Torokhov
2004-09-17 5:01 ` [PATCH 3/3] atkbd-sysfs-attr.patch Dmitry Torokhov
2004-09-21 12:10 ` [PATCH 0/3] New input patches Vojtech Pavlik
2004-09-21 13:15 ` Dmitry Torokhov [this message]
2004-09-22 7:12 ` Dmitry Torokhov
2004-09-22 7:30 ` Vojtech Pavlik
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=200409210815.34509.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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