All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>,
	linux-ide@vger.kernel.org
Subject: Re: How to cleanly setup legacy IDE irq ?
Date: Sun, 03 Oct 2004 21:27:10 -0400	[thread overview]
Message-ID: <4160A6EE.1010804@pobox.com> (raw)
In-Reply-To: <1096851939.9516.53.camel@gaston>

Benjamin Herrenschmidt wrote:
> On Mon, 2004-10-04 at 10:27, Bartlomiej Zolnierkiewicz wrote:
> 
> 
>>>Then you'll have a ton of
>>>
>>>#ifdef CONFIG_****
>>>	if (machine == blablabla)
>>>		irq = something;
>>>#endif
>>>#if CONFIG_****
>>>	irq = something else
>>>#endif
>>>
>>>and that sort of thing all over drivers... stinks as well.
>>
>>Actually it is fine with me.  I find it very informative. :)
>>Also host driver specific code is where is should belong.
> 
> 
> Ugh ? damn, that's a textboot example of crappy code ! You are
> putting interrupt routing platform knowledge in non-platform specific
> drivers, that is disgusting !

Yeah, I agree...  unless the driver is wholly platform specific (in 
which case no #ifdefs).



> Well, then what about my proposal above ?
> 
>   int ide_get_pci_legacy_irq(struct pci_dev *pdev, int channel);
> 
> (with eventually an #ifdef ARCH_HAS.....)
> 
> We could have it either called by the chipset drivers themselves, or by
> the generic code when the controller is in legacy mode.

How about a more generic, yet more specific pci_init_hwif()?

	Jeff




  parent reply	other threads:[~2004-10-04  1:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01  3:51 How to cleanly setup legacy IDE irq ? Benjamin Herrenschmidt
2004-10-01 14:11 ` Bartlomiej Zolnierkiewicz
2004-10-02  4:30   ` Benjamin Herrenschmidt
2004-10-02 14:56     ` Bartlomiej Zolnierkiewicz
2004-10-03  0:33       ` Benjamin Herrenschmidt
2004-10-03 20:54         ` Bartlomiej Zolnierkiewicz
2004-10-03 23:42           ` Benjamin Herrenschmidt
2004-10-04  0:27             ` Bartlomiej Zolnierkiewicz
2004-10-04  1:05               ` Benjamin Herrenschmidt
2004-10-04  1:20                 ` Benjamin Herrenschmidt
2004-10-04 21:35                   ` Bartlomiej Zolnierkiewicz
2004-10-04 23:27                     ` Benjamin Herrenschmidt
2004-10-04  1:27                 ` Jeff Garzik [this message]
2004-10-04  1:26                   ` Benjamin Herrenschmidt
2004-10-04  1:33                     ` Jeff Garzik
2004-10-04  1:33                       ` Benjamin Herrenschmidt
2004-10-04 21:21                         ` Bartlomiej Zolnierkiewicz
2004-10-04 23:26                           ` Benjamin Herrenschmidt
2004-10-04 23:56                             ` Bartlomiej Zolnierkiewicz

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=4160A6EE.1010804@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=benh@kernel.crashing.org \
    --cc=bzolnier@elka.pw.edu.pl \
    --cc=linux-ide@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.