linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: linuxppc-dev@ozlabs.org, Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH v2] powerpc: Add irqtrace support for 32-bit powerpc
Date: Mon, 07 Apr 2008 14:49:51 +1000	[thread overview]
Message-ID: <1207543791.10388.468.camel@pasglop> (raw)
In-Reply-To: <20080404213932.GA15847@farnsworth.org>

I think I found one:

 .../...

> -	mr	r6,r3
>  	rlwinm	r12,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
>  	/* disable interrupts so current_thread_info()->flags can't change */
>  	LOAD_MSR_KERNEL(r10,MSR_KERNEL)	/* doesn't include MSR_EE */
>  	SYNC
>  	MTMSRD(r10)
> +#ifdef CONFIG_TRACE_IRQFLAGS
> +	stwu	r1,-16(r1)
> +	stw	r3,12(r1)
> +	bl      trace_hardirqs_off
> +	lwz	r3,12(r1)
> +	addi	r1,r1,16
> +	LOAD_MSR_KERNEL(r10,MSR_KERNEL)
> +#endif

Here, r12 is clobbered, though it's used two lines later:

> +	mr	r6,r3
>  	lwz	r9,TI_FLAGS(r12)

Here.

You can probably just move the rlwinm down as you moved the mr.

Note that I've been wondering wether we should attempt to trace all
those IRQ state change internally to the exception code. I've looked at
not doing it, which simplifies things a bit.

Unfortunately, that will make us occasionally trace redundant
enable/disable (which isn't a big problem per-se, just counters).

The idea is that I only kept the trace of disable in transfer_to_handler
and I modified the enable tracing in restore: moved it lower down, and
made it test for _MSR(r1):MSR_EE. I added a trace_irq_off just before
the preempt_schedule_irq() as well.

Anyway, let me know what you think.

Cheers,
Ben.

  parent reply	other threads:[~2008-04-07  4:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 21:39 [PATCH v2] powerpc: Add irqtrace support for 32-bit powerpc Dale Farnsworth
2008-04-04 22:07 ` Benjamin Herrenschmidt
2008-04-04 22:35   ` Dale Farnsworth
2008-04-04 22:46     ` Benjamin Herrenschmidt
2008-04-04 23:31 ` Johannes Berg
2008-04-05  5:14   ` Benjamin Herrenschmidt
2008-04-05  5:41     ` Dale Farnsworth
2008-04-07  4:49 ` Benjamin Herrenschmidt [this message]
2008-04-07 13:10   ` Johannes Berg
2008-04-07 16:21     ` Dale Farnsworth
2008-04-07 16:16   ` Dale Farnsworth
2008-04-07 17:14 ` [PATCH v3] " Dale Farnsworth
2008-04-08 16:04   ` Johannes Berg
2008-04-08 21:36     ` Johannes Berg
2008-04-18 13:19       ` Kumar Gala
2008-04-23  4:40       ` Benjamin Herrenschmidt
2008-04-23  6:33         ` Johannes Berg

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=1207543791.10388.468.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=dale@farnsworth.org \
    --cc=johannes@sipsolutions.net \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).