Skip to contentSkip to conversation

2.5.8 compile bugs

PATCH Ivan G. 4 participants 10 messages Apr 14, 2002 – Apr 15, 2002

lore
Share & tools
lore

Ivan G.

author
#0 lore raw

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

Config.in Sun Apr 14 16:13:44 2002 renamed from Config.in.bak Sun Apr 14 16:13:29 2002 +0 -0
@@ -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

#1 lore raw
Quoted 5 lines · Ivan G.

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':

Quoted 8 lines

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.

ide/ide.c renamed from ide/ide.c~ +8 -0
@@ -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;
Signature · 1 line
Jens Axboe
#2 lore raw

Hi,

Quoted 18 lines · Jens Axboe

This should fix it.

ide/ide.c renamed from ide/ide.c~ +4 -0
@@ -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 @@
 

ide/ide.c line 2730

Quoted 10 lines
ide/ide.c renamed from ide/ide.c~ +4 -0
 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

#3 lore raw
In reply to Jens Axboe
Quoted 18 lines · Roman Zippel
Quoted 18 lines

This should fix it.

ide/ide.c renamed from ide/ide.c~ +4 -0
@@ -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 @@
 
Quoted 13 lines

ide/ide.c line 2730

Quoted 10 lines
ide/ide.c renamed from ide/ide.c~ +4 -0
 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?

Signature · 1 line
Jens Axboe
#4 lore raw

Hi,

Quoted 6 lines · Jens Axboe
Quoted 2 lines

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

#5 lore raw
In reply to Jens Axboe
Quoted 4 lines · Roman Zippel

Hi,

On Mon, 15 Apr 2002, Jens Axboe wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

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).

Quoted 2 lines

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.

Signature · 1 line
Jens Axboe
#6 lore raw

Hi,

Quoted 5 lines · Jens Axboe
Quoted 1 line

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

#7 lore raw
In reply to Jens Axboe
Quoted 3 lines · Jens Axboe

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.

#8 lore raw
In reply to Jens Axboe

Hi,

Quoted 6 lines · Jens Axboe
Quoted 2 lines

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

#9 lore raw
In reply to Jens Axboe
Quoted 7 lines · Roman Zippel

Hi,

Quoted 3 lines · Jens Axboe
Quoted 2 lines

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

Quoted 7 lines
Quoted 3 lines

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.

Signature · 1 line
Jens Axboe