On Fri, 12 Jan 2007, Michael Schmitz wrote:
> > Does anyone know why the PT_* definitions in include/asm-m68k/ptrace.h:
> >
> > | #define PT_D1 0
> > | #define PT_D2 1
> > | #define PT_D3 2
> > | #define PT_D4 3
> > | #define PT_D5 4
> > | #define PT_D6 5
> > | #define PT_D7 6
> > | #define PT_A0 7
> > | #define PT_A1 8
> > | #define PT_A2 9
> > | #define PT_A3 10
> > | #define PT_A4 11
> > | #define PT_A5 12
> > | #define PT_A6 13
> > | #define PT_D0 14
> > | #define PT_USP 15
> > | #define PT_ORIG_D0 16
> > | #define PT_SR 17
> > | #define PT_PC 18
> >
> > don't match with the PT_* definitions in include/asm-m68k/asm-offsets.h:
> >
> > | #define PT_D0 32 /* offsetof(struct pt_regs, d0) */
> > | #define PT_ORIG_D0 36 /* offsetof(struct pt_regs, orig_d0) */
> > | #define PT_D1 0 /* offsetof(struct pt_regs, d1) */
> > | #define PT_D2 4 /* offsetof(struct pt_regs, d2) */
> > | #define PT_D3 8 /* offsetof(struct pt_regs, d3) */
> > | #define PT_D4 12 /* offsetof(struct pt_regs, d4) */
> > | #define PT_D5 16 /* offsetof(struct pt_regs, d5) */
> > | #define PT_A0 20 /* offsetof(struct pt_regs, a0) */
> > | #define PT_A1 24 /* offsetof(struct pt_regs, a1) */
> > | #define PT_A2 28 /* offsetof(struct pt_regs, a2) */
> > | #define PT_PC 46 /* offsetof(struct pt_regs, pc) */
> > | #define PT_SR 44 /* offsetof(struct pt_regs, sr) */
> > | #define PT_VECTOR 50 /* offsetof(struct pt_regs, pc) + 4 */
> >
> > as generated from struct pt_regs in include/asm-m68k/ptrace.h:
> >
> > | struct pt_regs {
> > | long d1;
> > | long d2;
> > | long d3;
> > | long d4;
> > | long d5;
> > | long a0;
> > | long a1;
> > | long a2;
> > | long d0;
> > | long orig_d0;
> > | long stkadj;
> > | unsigned short sr;
> > | unsigned long pc;
> > | unsigned format : 4; /* frame format specifier */
> > | unsigned vector : 12; /* vector offset */
> > | };
>
>
> Looks like the PT_* offsets are in units of long, but otherwise correct?
Nope, we have PT_D7, but no pt_regs.d7.
> > I was trying to define task_thread_info() using TASK_INFO instead of using
> > struct task_struct directly (cfr. ia64), but these conflicts seem to
> > prevent me
> > from doing this.
>
> At some time in the past (2.6.13??) I had tried to do something similar
> while debugging the Atari interrupt problems (the asm interrupt entries
> used wrong offsets to tweak preempt_count() at that time). I gave up in
> the end... If I understand Linus' suggestion right, he says we should take
> the task struct from the stack instead of going over current (which we
> keep in a2, and prefer to use for that reason)?
Yep, that's what he suggests. But we do it differently for `a good reason'.
Unfortunately I don't remember what good reason it was. Yesterday evening I
searched my lkml archives of 2005 and 2006, but apart from Roman and Al
agreeing we have `a good reason', I couldn't find it.
Roman, can you please refresh my (aging) brain?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html