From: Christoph Hellwig <hch@lst.de>
To: Luis Machado <luisgpm@linux.vnet.ibm.com>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>, Paul Mackerras <paulus@samba.org>
Subject: Re: [RFC] 4xx hardware watchpoint support
Date: Wed, 23 Jul 2008 16:23:35 +0200 [thread overview]
Message-ID: <20080723142335.GA22767@lst.de> (raw)
In-Reply-To: <1216777678.5727.82.camel@gargoyle>
On Tue, Jul 22, 2008 at 10:47:58PM -0300, Luis Machado wrote:
> +void do_dabr(struct pt_regs *regs, unsigned long address,
> + unsigned long error_code)
> +{
> + siginfo_t info;
> +
> +#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
> + if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
> + 11, SIGSEGV) == NOTIFY_STOP)
> + return;
> +
> + if (debugger_dabr_match(regs))
> + return;
> +
> + /* Clear the DAC and struct entries. One shot trigger. */
> +#else /* (defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) */
> + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W
> + | DBCR0_IDM));
> +#endif
Some comment, first the above negate conditional
looks rather ugly, I'd rather do a
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
dbcr0 case
#else
dabr case
#endif
second I wonder why we have the notify_die only for one case, that seems
rather odd. Looking further the notify_die is even more odd because
DIE_DABR_MATCH doesn't actually appear anywhere else in the kernel.
I'd suggest simply removing it.
> + /* For processors using DABR (i.e. 970), the bottom 3 bits are flags.
> + It was assumed, on previous implementations, that 3 bits were
> + passed together with the data address, fitting the design of the
> + DABR register, as follows:
> +
> + bit 0: Read flag
> + bit 1: Write flag
> + bit 2: Breakpoint translation
> +
> + Thus, we use them here as so. */
Can you redo this in the normal Linux comment style, ala:
/*
* For processors using DABR (i.e. 970), the bottom 3 bits are flags.
* It was assumed, on previous implementations, that 3 bits were
* passed together with the data address, fitting the design of the
* DABR register, as follows:
*
* bit 0: Read flag
* bit 1: Write flag
* bit 2: Breakpoint translation
*
* Thus, we use them here as so.
*/
and similar in few other places.
next prev parent reply other threads:[~2008-07-23 14:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 17:39 [RFC] 4xx hardware watchpoint support Luis Machado
2008-05-21 21:16 ` Kumar Gala
2008-05-21 21:54 ` Luis Machado
2008-05-22 3:51 ` Paul Mackerras
2008-05-22 6:46 ` Roland McGrath
2008-05-23 18:12 ` Luis Machado
2008-05-27 21:34 ` Roland McGrath
2008-05-23 18:06 ` Luis Machado
2008-06-20 20:14 ` Luis Machado
2008-06-30 19:16 ` Luis Machado
2008-07-19 13:37 ` Josh Boyer
2008-07-21 16:36 ` Luis Machado
2008-07-21 17:05 ` Josh Boyer
2008-07-23 1:47 ` Luis Machado
2008-07-23 12:51 ` Kumar Gala
2008-07-23 14:23 ` Christoph Hellwig [this message]
2008-07-23 14:42 ` Luis Machado
2008-07-23 15:53 ` Josh Boyer
2008-07-23 16:10 ` Luis Machado
2008-07-25 4:00 ` Benjamin Herrenschmidt
2008-07-25 15:23 ` Kumar Gala
2008-07-25 19:38 ` Kumar Gala
2008-07-25 21:38 ` Benjamin Herrenschmidt
2008-07-25 23:08 ` Josh Boyer
2008-07-25 23:18 ` Benjamin Herrenschmidt
2008-07-25 21:37 ` Benjamin Herrenschmidt
2008-07-25 15:22 ` Kumar Gala
2008-07-23 16:26 ` Kumar Gala
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=20080723142335.GA22767@lst.de \
--to=hch@lst.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=luisgpm@linux.vnet.ibm.com \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.