public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Ingo Molnar <mingo@elte•hu>
Cc: linux-next@vger•kernel.org, Yinghai Lu <yhlu.kernel@gmail•com>,
	Jeremy Fitzhardinge <jeremy@goop•org>
Subject: linux-next: manual merge of the sparseirq tree
Date: Mon, 25 Aug 2008 19:32:43 +1000	[thread overview]
Message-ID: <20080825193243.fdf24fcc.sfr@canb.auug.org.au> (raw)

[Ingo, thanks for the heads up about this ...]

Hi Ingo,

Today's linux-next merge of the sparseirq tree got a conflict in
arch/x86/xen/spinlock.c between commit
168d2f464ab9860f0d1e66cf1f9684973222f1c6 ("xen: save previous spinlock
when blocking") from the x86 tree and commit
fb6dc57946f9ebfeac546dd0698d9f065c191668 ("x86: move kstat_irqs from
kstat to irq_desc") from the sparseirq tree.

I fixed it up (see below) and can carry it.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc arch/x86/xen/spinlock.c
index d072823,5a48aba..0000000
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@@ -194,60 -73,24 +194,60 @@@ static noinline int xen_spin_lock_slow(
  	if (irq == -1)
  		return 0;
  
 +	start = spin_time_start();
 +
  	/* announce we're spinning */
 -	spinning_lock(xl);
 +	prev = spinning_lock(xl);
 +
 +	flags = __raw_local_save_flags();
 +	if (irq_enable) {
 +		ADD_STATS(taken_slow_irqenable, 1);
 +		raw_local_irq_enable();
 +	}
 +
 +	ADD_STATS(taken_slow, 1);
 +	ADD_STATS(taken_slow_nested, prev != NULL);
  
 -	/* clear pending */
 -	xen_clear_irq_pending(irq);
 +	do {
 +		/* clear pending */
 +		xen_clear_irq_pending(irq);
 +
 +		/* check again make sure it didn't become free while
 +		   we weren't looking  */
 +		ret = xen_spin_trylock(lock);
 +		if (ret) {
 +			ADD_STATS(taken_slow_pickup, 1);
 +
 +			/*
 +			 * If we interrupted another spinlock while it
 +			 * was blocking, make sure it doesn't block
 +			 * without rechecking the lock.
 +			 */
 +			if (prev != NULL)
 +				xen_set_irq_pending(irq);
 +			goto out;
 +		}
  
 -	/* check again make sure it didn't become free while
 -	   we weren't looking  */
 -	ret = xen_spin_trylock(lock);
 -	if (ret)
 -		goto out;
 +		/*
 +		 * Block until irq becomes pending.  If we're
 +		 * interrupted at this point (after the trylock but
 +		 * before entering the block), then the nested lock
 +		 * handler guarantees that the irq will be left
 +		 * pending if there's any chance the lock became free;
 +		 * xen_poll_irq() returns immediately if the irq is
 +		 * pending.
 +		 */
 +		xen_poll_irq(irq);
 +		ADD_STATS(taken_slow_spurious, !xen_test_irq_pending(irq));
 +	} while (!xen_test_irq_pending(irq)); /* check for spurious wakeups */
  
- 	kstat_this_cpu.irqs[irq]++;
 -	/* block until irq becomes pending */
 -	xen_poll_irq(irq);
+ 	kstat_irqs_this_cpu(irq_to_desc(irq))++;
  
  out:
 -	unspinning_lock(xl);
 +	raw_local_irq_restore(flags);
 +	unspinning_lock(xl, prev);
 +	spin_time_accum_blocked(start);
 +
  	return ret;
  }
  

             reply	other threads:[~2008-08-25  9:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25  9:32 Stephen Rothwell [this message]
2008-08-25 19:37 ` linux-next: manual merge of the sparseirq tree Jeremy Fitzhardinge
2008-08-25 23:48   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-09-15 14:58 Stephen Rothwell
2008-09-15 15:19 Stephen Rothwell
2008-09-15 18:35 ` Roland McGrath
2008-09-17 10:20   ` Ingo Molnar
2008-10-16  8:08 Stephen Rothwell
2008-10-16  8:13 ` Ingo Molnar
2008-10-16  8:30   ` 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=20080825193243.fdf24fcc.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=jeremy@goop$(echo .)org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mingo@elte$(echo .)hu \
    --cc=yhlu.kernel@gmail$(echo .)com \
    /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