mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Chris Metcalf <cmetcalf@tilera.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: arch/tile
Date: Wed, 26 May 2010 16:05:55 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005261601530.2995@localhost.localdomain> (raw)

Chris,

On Tue, 25 May 2010, Chris Metcalf wrote:

> Thomas, thanks for your feedback.  If I don't comment on something you
> said it's because you were obviously right and I applied a suitable fix. :-)
> 
> On 5/25/2010 4:12 PM, Thomas Gleixner wrote:
> > +/**
> > + * tile_request_irq() - Allocate an interrupt handling instance.
> > [...]
> >
> >   Why are you implementing your private interrupt handling
> >   infrastructure ? What's wrong with the generic interrupt handling
> >   code ? Why is each device driver forced to call tile_request_irq()
> >   which makes it incompatible to the rest of the kernel and therefor
> >   unshareable ?
> >   
> 
> Our interrupt management code has evolved as we have developed this
> code, so I won't present arguments as to why it's perfect the way it is,
> but just why it IS the way it is.  :-)
> 
> The tile irq.c does not replace the generic Linux IRQ management code,
> but instead provides a very limited set of virtual interrupts that are
> only used by our para-virtualized device drivers, and delivered to Linux
> via a single hypervisor downcall that atomically sets "virtual
> interrupt" bits in a bitmask.  The PCI root complex driver reserves four
> of these bits (i.e. irqs) to map real PCI interrupts; they are then fed
> forward into the regular Linux IRQ system to manage all "standard"
> devices.  The other tile-specific para-virtualized drivers that use this
> interface are the PCI endpoint code, xgbe network driver, ATA-over-GPIO
> driver, and the IPI layer.  None of these para-virtualized drivers are
> actually shareable with other Linux architectures in any case.

  Ok, still ...
 
> We have an outstanding enhancement request in our bug tracking system to
> switch to using the Linux generic IRQs directly, and plan to implement
> it prior to our next major release.  But we haven't done it yet, and
> this code, though somewhat crufty, is reasonably stable.  I'm also not
> the primary maintainer of this particular piece of code, so I'd rather
> wait until that person frees up and have him do it, instead of trying to
> hack it myself.

  It should be rather straight forward and can be efficiently done
  with the handle_simple_irq() handler AFAICS. So I'd prefer to see
  that fixed befor the code gets merged.
 
> >   You check desc->handler, but you happily call the handler while
> >   dev_id might be still NULL. See above.
> >   
> 
> Assuming we spinlock the irq request/free routines, I think this is
> safe, since the unlock memory fence will guarantee visibility of the
> fields prior to any attempt to use them.  We always allocate the
> interrupt, then tell the hypervisor to start delivering them; on device
> unload we tell the hypervisor to stop delivering interrupts, then free
> it.  The "tell the hypervisor" steps use on_each_cpu() and wait, so are
> fully synchronous.

  Going to generic irq will solve all of that :)
 
> > +int show_interrupts(struct seq_file *p, void *v)
> > +[...]
> >
> >   So that prints which interrupts ? Now you refer to the generic code,
> >   while above you require that tile specific one. -ENOSENSE.
> >   
> 
> Yes, this is confusing.  This routine is required by procfs, and it
> shows just the PCI interrupts, not the tile irqs.  I'll add a comment,
> and try to segregate the file into "generic irqs" and "tile irqs" more
> obviously, for now.  The routine itself will be more sensible once we
> integrate our tile_irqs into the generic system.

  Ditto.
 
Thanks,

	tglx

             reply	other threads:[~2010-05-26 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 14:05 Thomas Gleixner [this message]
2010-05-28 17:37 ` arch/tile Chris Metcalf

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=alpine.LFD.2.00.1005261601530.2995@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=cmetcalf@tilera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®