lkml.org 
[lkml]   [2009]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6 v6] SGI RTC: add generic system interrupt
On Tue, Mar 03, 2009 at 04:34:33PM +0100, Ingo Molnar wrote:
>
> * Dimitri Sivanich <sivanich@sgi.com> wrote:
>
> > This patch allocates a system interrupt vector for various
> > platform specific uses.
>
> this is really ugly.
>
> Also, why are all these symbols exported? There's no need to
> build the UV RTC driver as a module. It's either built-in or not
> built-in - it's small enough.

OK.

>
> this stuff:
>
> > +/* Function pointer for generic interrupt vector handling */
> > +static void (*generic_interrupt_extension)(void);
> > +static char generic_show_string[28];
> > +static char generic_show_prefix[6];
> > +
> > +int is_generic_interrupt_registered()
> > +{
> > + if (generic_interrupt_extension)
> > + return 1;
> > + else
> > + return 0;
> > +}
> > +
> > +char *generic_interrupt_string(void)
> > +{
> > + return generic_show_string;
> > +}
> > +
> > +char *generic_interrupt_prefix(void)
> > +{
> > + return generic_show_prefix;
> > +}
>
> is SMP unsafe, etc. etc. - not something we should ever call
> from a module. We just shouldnt do it in this form. What
> necessiates it?

I wanted a way to show specific strings when displaying irq statistics. We could show these in a more generic way I suppose.

Any given platform should just be changing these once, hence the lack of need for locking.

>
> All we need is:
>
> > + /* generic IPI for platform specific use */
> > + alloc_intr_gate(GENERIC_INTERRUPT_VECTOR, generic_interrupt);
>
> plus one trivial callback function - and then the UV platform
> uses it for its own purpose. It's not like two platforms will be
> running at once so there's no locking needed, etc.

Right. But still register the callback function as I have it now?

>
> > +#ifdef CONFIG_X86_64
> > +extern void generic_interrupt(void);
> > +#endif
>
> in any case please make it symmetric across 32-bit and 64-bit -
> even though UV is 64-bit only.

OK.

>
> Ingo


\
 
 \ /
  Last update: 2009-03-03 18:43    [W:0.060 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site