* [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
@ 2004-03-24 13:43 Bartlomiej Zolnierkiewicz
2004-03-27 22:28 ` [parisc-linux] " Grant Grundler
0 siblings, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-03-24 13:43 UTC (permalink / raw)
To: parisc-linux; +Cc: linux-ide
Hi,
Is this patch correct?
Regards,
Bartlomiej
linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff -puN include/asm-parisc/ide.h~parisc_no_default_ide_ports include/asm-parisc/ide.h
--- linux-2.6.5-rc2-bk3/include/asm-parisc/ide.h~parisc_no_default_ide_ports 2004-03-24 14:39:06.293991064 +0100
+++ linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h 2004-03-24 14:39:33.400870192 +0100
@@ -41,19 +41,8 @@ static __inline__ void ide_init_hwif_por
hw->io_ports[IDE_IRQ_OFFSET] = 0;
}
-static __inline__ void ide_init_default_hwifs(void)
-{
-#ifndef CONFIG_PCI
- hw_regs_t hw;
- int index;
-
- for(index = 0; index < MAX_HWIFS; index++) {
- ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
- hw.irq = ide_default_irq(ide_default_io_base(index));
- ide_register_hw(&hw);
- }
-#endif
-}
+/* There are no standard ports. */
+static inline void ide_init_default_hwifs(void) { ; }
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
_
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-24 13:43 [PATCH] asm-parisc/ide.h cleanup (there are no standard ports) Bartlomiej Zolnierkiewicz
@ 2004-03-27 22:28 ` Grant Grundler
2004-03-27 23:24 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 7+ messages in thread
From: Grant Grundler @ 2004-03-27 22:28 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: parisc-linux, linux-ide
On Wed, Mar 24, 2004 at 02:43:43PM +0100, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> Is this patch correct?
It's not necessary.
> Regards,
> Bartlomiej
>
> linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h | 15 ++-------------
> 1 files changed, 2 insertions(+), 13 deletions(-)
>
> diff -puN include/asm-parisc/ide.h~parisc_no_default_ide_ports include/asm-parisc/ide.h
> --- linux-2.6.5-rc2-bk3/include/asm-parisc/ide.h~parisc_no_default_ide_ports 2004-03-24 14:39:06.293991064 +0100
> +++ linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h 2004-03-24 14:39:33.400870192 +0100
> @@ -41,19 +41,8 @@ static __inline__ void ide_init_hwif_por
> hw->io_ports[IDE_IRQ_OFFSET] = 0;
> }
>
> -static __inline__ void ide_init_default_hwifs(void)
> -{
> -#ifndef CONFIG_PCI
> - hw_regs_t hw;
> - int index;
> -
> - for(index = 0; index < MAX_HWIFS; index++) {
> - ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
> - hw.irq = ide_default_irq(ide_default_io_base(index));
> - ide_register_hw(&hw);
> - }
> -#endif
> -}
> +/* There are no standard ports. */
> +static inline void ide_init_default_hwifs(void) { ; }
Note the "ifndef CONFIG_PCI" - we only support IDE behind PCI to date.
ie this function already is "empty" for parisc since PCI must be enabled
when IDE is enabled. Hypothetically someone could add an IDE card
to a parisc EISA bus (eg 725), not define PCI, and then run the IDE
in PIO mode since DMA is still kaputt behind our EISA IOMMU.
thanks,
grant
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-27 22:28 ` [parisc-linux] " Grant Grundler
@ 2004-03-27 23:24 ` Bartlomiej Zolnierkiewicz
2004-03-27 23:49 ` Grant Grundler
0 siblings, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-03-27 23:24 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux, linux-ide
On Saturday 27 of March 2004 23:28, Grant Grundler wrote:
> On Wed, Mar 24, 2004 at 02:43:43PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > Hi,
> >
> > Is this patch correct?
>
> It's not necessary.
Well, I know but I have other cleanups incremental to this one. :-)
> > Regards,
> > Bartlomiej
> >
> > linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h | 15 ++-------------
> > 1 files changed, 2 insertions(+), 13 deletions(-)
> >
> > diff -puN include/asm-parisc/ide.h~parisc_no_default_ide_ports
> > include/asm-parisc/ide.h ---
> > linux-2.6.5-rc2-bk3/include/asm-parisc/ide.h~parisc_no_default_ide_ports
> >2004-03-24 14:39:06.293991064 +0100 +++
> > linux-2.6.5-rc2-bk3-root/include/asm-parisc/ide.h 2004-03-24
> > 14:39:33.400870192 +0100 @@ -41,19 +41,8 @@ static __inline__ void
> > ide_init_hwif_por
> > hw->io_ports[IDE_IRQ_OFFSET] = 0;
> > }
> >
> > -static __inline__ void ide_init_default_hwifs(void)
> > -{
> > -#ifndef CONFIG_PCI
> > - hw_regs_t hw;
> > - int index;
> > -
> > - for(index = 0; index < MAX_HWIFS; index++) {
> > - ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
> > - hw.irq = ide_default_irq(ide_default_io_base(index));
> > - ide_register_hw(&hw);
> > - }
> > -#endif
> > -}
> > +/* There are no standard ports. */
> > +static inline void ide_init_default_hwifs(void) { ; }
>
> Note the "ifndef CONFIG_PCI" - we only support IDE behind PCI to date.
> ie this function already is "empty" for parisc since PCI must be enabled
It is also NOP for #ifdef CONFIG_PCI (that is the reason for this patch BTW)
since both ide_default_io_base() and ide_default_irq() are defined as '0'.
> when IDE is enabled. Hypothetically someone could add an IDE card
> to a parisc EISA bus (eg 725), not define PCI, and then run the IDE
> in PIO mode since DMA is still kaputt behind our EISA IOMMU.
That would require (at least) passing "ide=base[,ctl,[irq]]" kernel parameter.
Regards,
Bartlomiej
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-27 23:24 ` Bartlomiej Zolnierkiewicz
@ 2004-03-27 23:49 ` Grant Grundler
2004-03-28 0:04 ` Bartlomiej Zolnierkiewicz
2004-03-28 0:21 ` Randolph Chung
0 siblings, 2 replies; 7+ messages in thread
From: Grant Grundler @ 2004-03-27 23:49 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: parisc-linux, linux-ide
On Sun, Mar 28, 2004 at 12:24:57AM +0100, Bartlomiej Zolnierkiewicz wrote:
> Well, I know but I have other cleanups incremental to this one. :-)
Ah ok - go for it.
> It is also NOP for #ifdef CONFIG_PCI (that is the reason for this patch BTW)
> since both ide_default_io_base() and ide_default_irq() are defined as '0'.
Ok - I didn't look any deeper.
> > Hypothetically someone could add an IDE card
> > to a parisc EISA bus (eg 725), not define PCI, and then run the IDE
> > in PIO mode since DMA is still kaputt behind our EISA IOMMU.
>
> That would require (at least) passing "ide=base[,ctl,[irq]]" kernel parameter.
I was told offline my hypothetical example is in fact hypothetical.
parisc won't build with IDE unless PCI is defined. I haven't tried.
thanks,
grant
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-27 23:49 ` Grant Grundler
@ 2004-03-28 0:04 ` Bartlomiej Zolnierkiewicz
2004-03-28 0:21 ` Randolph Chung
1 sibling, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-03-28 0:04 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux, linux-ide
On Sunday 28 of March 2004 00:49, Grant Grundler wrote:
> On Sun, Mar 28, 2004 at 12:24:57AM +0100, Bartlomiej Zolnierkiewicz wrote:
> > Well, I know but I have other cleanups incremental to this one. :-)
>
> Ah ok - go for it.
>
> > It is also NOP for #ifdef CONFIG_PCI (that is the reason for this patch
> > BTW) since both ide_default_io_base() and ide_default_irq() are defined
> > as '0'.
>
> Ok - I didn't look any deeper.
>
> > > Hypothetically someone could add an IDE card
> > > to a parisc EISA bus (eg 725), not define PCI, and then run the IDE
> > > in PIO mode since DMA is still kaputt behind our EISA IOMMU.
> >
> > That would require (at least) passing "ide=base[,ctl,[irq]]" kernel
> > parameter.
>
> I was told offline my hypothetical example is in fact hypothetical.
> parisc won't build with IDE unless PCI is defined. I haven't tried.
Ok, I will push this to Linus.
Thanks,
Bartlomiej
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-27 23:49 ` Grant Grundler
2004-03-28 0:04 ` Bartlomiej Zolnierkiewicz
@ 2004-03-28 0:21 ` Randolph Chung
2004-03-28 15:48 ` Matthew Wilcox
1 sibling, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2004-03-28 0:21 UTC (permalink / raw)
To: Grant Grundler; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, parisc-linux
> I was told offline my hypothetical example is in fact hypothetical.
> parisc won't build with IDE unless PCI is defined. I haven't tried.
not exactly. what i meant is, without this patch, if you built pa with
ide enabled but pci disabled you will get a compilation error.
i think this patch looks ok too. will commit to our tree and let willy
propogate upstream :)
thanks,
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [parisc-linux] [PATCH] asm-parisc/ide.h cleanup (there are no standard ports)
2004-03-28 0:21 ` Randolph Chung
@ 2004-03-28 15:48 ` Matthew Wilcox
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2004-03-28 15:48 UTC (permalink / raw)
To: Randolph Chung
Cc: Grant Grundler, Bartlomiej Zolnierkiewicz, linux-ide,
parisc-linux
On Sat, Mar 27, 2004 at 04:21:39PM -0800, Randolph Chung wrote:
> > I was told offline my hypothetical example is in fact hypothetical.
> > parisc won't build with IDE unless PCI is defined. I haven't tried.
>
> not exactly. what i meant is, without this patch, if you built pa with
> ide enabled but pci disabled you will get a compilation error.
>
> i think this patch looks ok too. will commit to our tree and let willy
> propogate upstream :)
I think Bart's patch already made it into Linus' tree ;-) Whatever;
I'll push it to Linus after 2.6.5 comes out if it hasn't already made
it upstream. Thanks, guys.
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-28 15:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-24 13:43 [PATCH] asm-parisc/ide.h cleanup (there are no standard ports) Bartlomiej Zolnierkiewicz
2004-03-27 22:28 ` [parisc-linux] " Grant Grundler
2004-03-27 23:24 ` Bartlomiej Zolnierkiewicz
2004-03-27 23:49 ` Grant Grundler
2004-03-28 0:04 ` Bartlomiej Zolnierkiewicz
2004-03-28 0:21 ` Randolph Chung
2004-03-28 15:48 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox