Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2014 20:00:39 -1000
From:      "George Neville-Neil" <gnn@neville-neil.com>
To:        "Mark Johnston" <markj@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore <ian@freebsd.org>
Subject:   Re: svn commit: r276142 - in head/sys: amd64/amd64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 cddl/dev/dtrace/mips cddl/dev/dtrace/powerpc i386/i386 mips/mips powerpc/aim sys
Message-ID:  <C5FDD0F3-3E4F-4AAB-96A6-8DAE44A3F26F@neville-neil.com>
In-Reply-To: <20141223160423.GA24447@charmander.home>
References:  <201412231538.sBNFcKrx091251@svn.freebsd.org> <1419349557.1018.134.camel@freebsd.org> <20141223160423.GA24447@charmander.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 Dec 2014, at 6:05, Mark Johnston wrote:

> On Tue, Dec 23, 2014 at 08:45:57AM -0700, Ian Lepore wrote:
>> On Tue, 2014-12-23 at 15:38 +0000, Mark Johnston wrote:
>>> Author: markj
>>> Date: Tue Dec 23 15:38:19 2014
>>> New Revision: 276142
>>> URL: https://svnweb.freebsd.org/changeset/base/276142
>>>
>>> Log:
>>> Restore the trap type argument to the DTrace trap hook, removed in 
>>> r268600.
>>> It's redundant at the moment since it can be obtained from the 
>>> trapframe
>>> on the architectures where DTrace is supported, but this won't be 
>>> the case
>>> with ARM.
>>>
>>> Modified:
>>> head/sys/amd64/amd64/trap.c
>>> head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
>>> head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
>>> head/sys/cddl/dev/dtrace/mips/dtrace_subr.c
>>> head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
>>> head/sys/i386/i386/trap.c
>>> head/sys/mips/mips/trap.c
>>> head/sys/powerpc/aim/trap.c
>>> head/sys/sys/dtrace_bsd.h
>>>
>>
>> Wouldn't it have been easier to just add the field to the trapframe 
>> for
>> arm?  iirc we have an unused padding field in the struct already just
>> for ABI alignment, it could go there.
>
> In this case, the extra argument will be the fault address AND'ed with
> FAULT_TYPE_MASK, and the hook is only potentially called in the data 
> abort
> handler, so this extra field would be unused for other exceptions (and
> unused for data aborts unless DTrace is active). Maybe that's ok, but
> restoring the extra hook argument seemed like a less intrusive way to 
> go
> to me.
>

Actually I have re-patched my tree with the code from Howard Su, put on 
top of the work
by Mark et al.  I took the comment in the review to heart and added the 
type to the trapframe
for ARM.  I'm happy to go either way, though.  It's trivial to change it 
to work with this.

Best,
George



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C5FDD0F3-3E4F-4AAB-96A6-8DAE44A3F26F>