2002-04-14 22:56:06

by Ivan G.

[permalink] [raw]
Subject: 2.5.8 compile bugs

1) Script error, xconfig fails, apply to drivers/ide/Config.in

--- Config.in.bak Sun Apr 14 16:13:29 2002
+++ Config.in Sun Apr 14 16:13:44 2002
@@ -49,7 +49,7 @@
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' ATA tagged command queueing' CONFIG_BLK_DEV_IDE_TCQ
$CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' TCQ on by default' CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
$CONFIG_BLK_DEV_IDE_TCQ
- if [ $CONFIG_BLK_DEV_IDE_TCQ_DEFAULT != "n" ]; then
+ if [ "$CONFIG_BLK_DEV_IDE_TCQ_DEFAULT" != "n" ]; then
int ' Default queue depth' CONFIG_BLK_DEV_IDE_TCQ_DEPTH
32
fi
dep_bool ' ATA Work(s) In Progress (EXPERIMENTAL)'
CONFIG_IDEDMA_PCI_WIP $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL


To complement this pathetic bugfix, here's some other bug reports

2)
ERROR:
ide.c: In function `ide_teardown_commandlist':
ide.c:2704: structure has no member named `pci_dev'
ide.c: In function `ide_build_commandlist':
ide.c:2719: structure has no member named `pci_dev'
make[3]: *** [ide.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.8/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.8/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.8/drivers'
make: *** [_dir_drivers] Error 2

CAUSE:
/usr/src/linux-2.5.8/include/linux/ide.h:

#ifdef CONFIG_BLK_DEV_IDEPCI
struct pci_dev *pci_dev; /* for pci chipsets */
#endif

I don't use BLK_DEV_IDEPCI
yet I have an IDE hard drive so ide.c has to be compiled.


3)
Is the init bug fixed? I didn't finish the compile
but it doesn't look like it.
In init/main.c setup_per_cpu_areas ends up undefined
for uniprocessors (and called in start_kernel) , because of
incorrect ifdef statements.............. result is compile error.

any replies:
please cc to [email protected]
I'm not subscribed


2002-04-15 07:07:35

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

On Sun, Apr 14 2002, Ivan G. wrote:
> 2)
> ERROR:
> ide.c: In function `ide_teardown_commandlist':
> ide.c:2704: structure has no member named `pci_dev'
> ide.c: In function `ide_build_commandlist':
> ide.c:2719: structure has no member named `pci_dev'
> make[3]: *** [ide.o] Error 1
> make[3]: Leaving directory `/usr/src/linux-2.5.8/drivers/ide'
> make[2]: *** [first_rule] Error 2
> make[2]: Leaving directory `/usr/src/linux-2.5.8/drivers/ide'
> make[1]: *** [_subdir_ide] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.5.8/drivers'
> make: *** [_dir_drivers] Error 2

This should fix it.

--- drivers/ide/ide.c~ 2002-04-15 09:05:58.000000000 +0200
+++ drivers/ide/ide.c 2002-04-15 09:06:52.000000000 +0200
@@ -2701,7 +2701,11 @@

void ide_teardown_commandlist(ide_drive_t *drive)
{
+#ifdef CONFIG_BLK_DEV_IDEPCI
struct pci_dev *pdev= drive->channel->pci_dev;
+#else
+ struct pci_dev *pdev = NULL;
+#endif
struct list_head *entry;

list_for_each(entry, &drive->free_req) {
@@ -2716,7 +2720,11 @@

int ide_build_commandlist(ide_drive_t *drive)
{
+#ifdef CONFIG_BLK_DEV_IDEPCI
struct pci_dev *pdev= drive->channel->pci_dev;
+#else
+ struct pci_dev *pdev = NULL;
+#endif
struct ata_request *ar;
ide_tag_info_t *tcq;
int i, err;

--
Jens Axboe

2002-04-15 11:47:17

by Roman Zippel

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

Hi,

On Mon, 15 Apr 2002, Jens Axboe wrote:

> This should fix it.
>
> --- drivers/ide/ide.c~ 2002-04-15 09:05:58.000000000 +0200
> +++ drivers/ide/ide.c 2002-04-15 09:06:52.000000000 +0200
> @@ -2701,7 +2701,11 @@
>
> void ide_teardown_commandlist(ide_drive_t *drive)
> {
> +#ifdef CONFIG_BLK_DEV_IDEPCI
> struct pci_dev *pdev= drive->channel->pci_dev;
> +#else
> + struct pci_dev *pdev = NULL;
> +#endif
> struct list_head *entry;
>
> list_for_each(entry, &drive->free_req) {
> @@ -2716,7 +2720,11 @@
>
> int ide_build_commandlist(ide_drive_t *drive)
> {
> +#ifdef CONFIG_BLK_DEV_IDEPCI
> struct pci_dev *pdev= drive->channel->pci_dev;
> +#else
> + struct pci_dev *pdev = NULL;
> +#endif
> struct ata_request *ar;
> ide_tag_info_t *tcq;
> int i, err;

That's not enough, some archs don't define pci_alloc_consistent/
pci_free_consistent, because they have neither PCI nor ISA.

bye, Roman

2002-04-15 11:51:44

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

On Mon, Apr 15 2002, Roman Zippel wrote:
> > This should fix it.
> >
> > --- drivers/ide/ide.c~ 2002-04-15 09:05:58.000000000 +0200
> > +++ drivers/ide/ide.c 2002-04-15 09:06:52.000000000 +0200
> > @@ -2701,7 +2701,11 @@
> >
> > void ide_teardown_commandlist(ide_drive_t *drive)
> > {
> > +#ifdef CONFIG_BLK_DEV_IDEPCI
> > struct pci_dev *pdev= drive->channel->pci_dev;
> > +#else
> > + struct pci_dev *pdev = NULL;
> > +#endif
> > struct list_head *entry;
> >
> > list_for_each(entry, &drive->free_req) {
> > @@ -2716,7 +2720,11 @@
> >
> > int ide_build_commandlist(ide_drive_t *drive)
> > {
> > +#ifdef CONFIG_BLK_DEV_IDEPCI
> > struct pci_dev *pdev= drive->channel->pci_dev;
> > +#else
> > + struct pci_dev *pdev = NULL;
> > +#endif
> > struct ata_request *ar;
> > ide_tag_info_t *tcq;
> > int i, err;
>
> That's not enough, some archs don't define pci_alloc_consistent/
> pci_free_consistent, because they have neither PCI nor ISA.

Please, then those archs need to provide similar functionality. This is
the established api, unless you want to change the documentation and xxx
number of drivers?

--
Jens Axboe

2002-04-15 12:04:42

by Roman Zippel

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

Hi,

On Mon, 15 Apr 2002, Jens Axboe wrote:

> > That's not enough, some archs don't define pci_alloc_consistent/
> > pci_free_consistent, because they have neither PCI nor ISA.
>
> Please, then those archs need to provide similar functionality. This is
> the established api, unless you want to change the documentation and xxx
> number of drivers?

These functions are only specified for PCI/ISA and there was no need so
far to implement them. It's no problem to provide the functionality, but I
have to know with what API.

bye, Roman

2002-04-15 12:09:32

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

On Mon, Apr 15 2002, Roman Zippel wrote:
> Hi,
>
> On Mon, 15 Apr 2002, Jens Axboe wrote:
>
> > > That's not enough, some archs don't define pci_alloc_consistent/
> > > pci_free_consistent, because they have neither PCI nor ISA.
> >
> > Please, then those archs need to provide similar functionality. This is
> > the established api, unless you want to change the documentation and xxx
> > number of drivers?
>
> These functions are only specified for PCI/ISA and there was no need so

In my mind these are generic functions, it's a shame that they come with
a pci_ prefix and take a pci dev as first argument (the NULL for isa
seems like a kludge).

> far to implement them. It's no problem to provide the functionality, but I
> have to know with what API.

Should be very easy for you to provide similar functionality for m68k,
just take a look at the x86 functions.

--
Jens Axboe

2002-04-15 12:31:11

by Roman Zippel

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

Hi,

On Mon, 15 Apr 2002, Jens Axboe wrote:

> > These functions are only specified for PCI/ISA and there was no need so
>
> In my mind these are generic functions, it's a shame that they come with
> a pci_ prefix and take a pci dev as first argument (the NULL for isa
> seems like a kludge).

That first argument is my problem, otherwise we could just define an alias
for them, which could be used in generic code. The current rule is to pass
NULL for non-PCI devices, but e.g. Amigas have a Zorro II and a Zorro III
bus, which have to be handled differently. Amiga drivers know how to deal
with this, but they can't use this API.

bye, Roman

2002-04-15 16:01:36

by andrew may

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

On Mon, Apr 15, 2002 at 02:09:27PM +0200, Jens Axboe wrote:
> In my mind these are generic functions, it's a shame that they come with
> a pci_ prefix and take a pci dev as first argument (the NULL for isa
> seems like a kludge).

arch/ppc/mm/cachemap.c has the function consistent_alloc() for getting
uncached mem for non-PCI use. I don't know about the other arch's.

But we could expect the other arch's to provide the same function.

2002-04-15 17:30:39

by Roman Zippel

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

Hi,

Jens Axboe wrote:

> > That's not enough, some archs don't define pci_alloc_consistent/
> > pci_free_consistent, because they have neither PCI nor ISA.
>
> Please, then those archs need to provide similar functionality. This is
> the established api, unless you want to change the documentation and xxx
> number of drivers?

Anyway, could this part be moved to ide-dma.c or disabled with
CONFIG_BLK_DEV_IDEDMA_PCI, as it only seems to be used in ide-dma.c. Why
allocating this memory, when it's never used in PIO mode?

bye, Roman

2002-04-15 17:32:33

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.8 compile bugs

On Mon, Apr 15 2002, Roman Zippel wrote:
> Hi,
>
> Jens Axboe wrote:
>
> > > That's not enough, some archs don't define pci_alloc_consistent/
> > > pci_free_consistent, because they have neither PCI nor ISA.
> >
> > Please, then those archs need to provide similar functionality. This is
> > the established api, unless you want to change the documentation and xxx
> > number of drivers?
>
> Anyway, could this part be moved to ide-dma.c or disabled with
> CONFIG_BLK_DEV_IDEDMA_PCI, as it only seems to be used in ide-dma.c. Why
> allocating this memory, when it's never used in PIO mode?

Sure, we'll get it shoe horned in there, no need to change the rules
right now.

--
Jens Axboe