public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jason Wessel <jason.wessel@windriver•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail•com>
Subject: linux-next: manual merge of the kgdb tree with the input tree
Date: Wed, 6 Oct 2010 13:04:36 +1100	[thread overview]
Message-ID: <20101006130436.45d8a96a.sfr@canb.auug.org.au> (raw)

Hi Jason,

Today's linux-next merge of the kgdb tree got a conflict in
drivers/char/sysrq.c between commit
1966cb225c6f9040ca163802cbd052c393d4448f ("Input: sysrq - add locking to
sysrq_filter()") from the input tree and commit
02307772717c91a108aca2e999bbc586a85d06a2 ("sysrq,keyboard: properly deal
with alt-sysrq in sysrq input filter") from the kgdb tree.

Just context changes.  I fixed it up (see below) and can carry the fax as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc drivers/char/sysrq.c
index f0ad694,9b97aad..0000000
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@@ -566,7 -566,57 +566,58 @@@ static const unsigned char sysrq_xlate[
  static bool sysrq_down;
  static int sysrq_alt_use;
  static int sysrq_alt;
 +static DEFINE_SPINLOCK(sysrq_event_lock);
+ static bool sysrq_kbd_triggered;
+ 
+ /*
+  * This function was a copy of input_pass_event but modified to allow
+  * by-passing a specific filter, to allow for injected events without
+  * filter recursion.
+  */
+ static void input_pass_event_ignore(struct input_dev *dev,
+ 			     unsigned int type, unsigned int code, int value,
+ 			     struct input_handle *ignore_handle)
+ {
+ 	struct input_handler *handler;
+ 	struct input_handle *handle;
+ 
+ 	rcu_read_lock();
+ 
+ 	handle = rcu_dereference(dev->grab);
+ 	if (handle)
+ 		handle->handler->event(handle, type, code, value);
+ 	else {
+ 		bool filtered = false;
+ 
+ 		list_for_each_entry_rcu(handle, &dev->h_list, d_node) {
+ 			if (!handle->open || handle == ignore_handle)
+ 				continue;
+ 			handler = handle->handler;
+ 			if (!handler->filter) {
+ 				if (filtered)
+ 					break;
+ 
+ 				handler->event(handle, type, code, value);
+ 
+ 			} else if (handler->filter(handle, type, code, value))
+ 				filtered = true;
+ 		}
+ 	}
+ 
+ 	rcu_read_unlock();
+ }
+ 
+ /*
+  * Pass along alt-print_screen, if there was no sysrq processing by
+  * sending a key press down and then passing the key up event.
+  */
+ static void simulate_alt_sysrq(struct input_handle *handle)
+ {
+ 	input_pass_event_ignore(handle->dev, EV_KEY, KEY_SYSRQ, 1, handle);
+ 	input_pass_event_ignore(handle->dev, EV_SYN, SYN_REPORT, 0, handle);
+ 	input_pass_event_ignore(handle->dev, EV_KEY, KEY_SYSRQ, 0, handle);
+ 	input_pass_event_ignore(handle->dev, EV_SYN, SYN_REPORT, 0, handle);
+ }
  
  static bool sysrq_filter(struct input_handle *handle, unsigned int type,
  		         unsigned int code, int value)

             reply	other threads:[~2010-10-06  2:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06  2:04 Stephen Rothwell [this message]
2010-10-06 12:17 ` linux-next: manual merge of the kgdb tree with the input tree Jason Wessel
  -- strict thread matches above, loose matches on Subject: below --
2010-03-23  3:09 Stephen Rothwell
2010-03-23 13:24 ` Jason Wessel
2010-03-23 23:08   ` Stephen Rothwell

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=20101006130436.45d8a96a.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=dmitry.torokhov@gmail$(echo .)com \
    --cc=jason.wessel@windriver$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.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