lkml.org 
[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 08/16] Add support for X86_64 platforms to KGDB
On Mon, Aug 29, 2005 at 07:13:47PM +0200, Andi Kleen wrote:
> On Monday 29 August 2005 18:10, Tom Rini wrote:
>
> > +void __init early_setup_per_cpu_area(void)
> > +{
> > + static char cpu0[PERCPU_ENOUGH_ROOM]
> > + __attribute__ ((aligned (SMP_CACHE_BYTES)));
> > + char *ptr = cpu0;
> > +
> > + cpu_pda[0].data_offset = ptr - __per_cpu_start;
> > + memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
> > +}
>
> What is that? It looks totally bogus. Can you tell exactly where you
> believe early per cpu data is needed?

Bob did this part (forgot to CC him, oops). But I believe it's needed
for setting traps so much earlier.

> > +
> > /*
> > * Great future plan:
> > * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
> > @@ -97,7 +107,9 @@ void __init setup_per_cpu_areas(void)
> > for (i = 0; i < NR_CPUS; i++) {
> > char *ptr;
> >
> > - if (!NODE_DATA(cpu_to_node(i))) {
> > + if (cpu_pda[i].data_offset)
> > + continue;
>
> And that looks broken too.

I believe that's to takecare of the case where something is covered in
early_setup_cpu_areas().

> In general I would also advise to mix any other changes outside kgdb* into the
> x86-64 kgdb patch. Either the patch should be merged into mainline in a
> separate patch or kgdb reworked to not need this.

ok.

> > + if (notify_die(DIE_PAGE_FAULT, "no context", regs, error_code, 14,
> > + SIGSEGV) == NOTIFY_STOP)
> > + return;
> > +
>
> I can see the point of that. It's ok if you submit it as a separate patch.

I can split that out into one that follows the KDB_VECTOR rename easily
enough.

> Regarding early trap init: I would have no problem to move all of traps_init
> into setup_arch (and leave traps_init empty for generic code). I actually
> don't know why it runs so late. But doing it half way is ugly.

Should I make setup_per_cpu_area and trap_init empty and turn the real
ones into early_foo?

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-29 19:49    [W:0.164 / U:0.616 seconds]
©2003-2014 Jasper Spaans. Advertise on this site