linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: Current 2.5-BK tree dies on boot!
@ 2002-09-18 20:44 Anton Altaparmakov
  2002-09-18 22:58 ` Anton Blanchard
  2002-09-19  8:47 ` Jens Axboe
  0 siblings, 2 replies; 12+ messages in thread
From: Anton Altaparmakov @ 2002-09-18 20:44 UTC (permalink / raw)
  To: Linux Kernel

This is without preempt. I tried both with and without SMP, with and without
large TLB pages, with and without pte highmem, all die in the same place.

Here are the boot messages:

Linux version 2.5.36 (aia21@drop.stormcorp.org) (gcc version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)) #11 SMP Thu Sep 12 21:11:41 BST 2002
Video mode to be used for restore is f06
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
 BIOS-e820: 000000003fff0000 - 000000003fff3000 (ACPI NVS)
 BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
127MB HIGHMEM available.
896MB LOWMEM available.
On node 0 totalpages: 262128
  DMA zone: 4096 pages
  Normal zone: 225280 pages
  HighMem zone: 32752 pages
ACPI: RSDP (v000 VIA694                     ) @ 0x000f79f0
ACPI: RSDT (v001 VIA694 AWRDACPI 16944.11825) @ 0x3fff3000
ACPI: FADT (v001 VIA694 AWRDACPI 16944.11825) @ 0x3fff3040
Kernel command line: BOOT_IMAGE=l2536 ro root=301 console=ttyS1,115200n8 console=tty0 hdc=ide-scsi
ide_setup: hdc=ide-scsi
Initializing CPU#0
Detected 1336.509 MHz processor.
Console: colour VGA+ 80x34
Calibrating delay loop... 2629.63 BogoMIPS
Memory: 1033160k/1048512k available (2040k kernel code, 14968k reserved, 1230k data, 88k init, 131008k highmem)
Security Scaffold v1.0.0 initialized
Dentry-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Machine check exception polling timer started.
CPU: AMD Athlon(tm) processor stepping 04
Enabling fast FPU save and restore... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
mtrr: v2.0 (20020519)
PCI: PCI BIOS revision 2.10 entry at 0xfb4a0, last bus=1
PCI: Using configuration type 1
ACPI: Subsystem revision 20020829
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: System [ACPI] (supports S0 S1 S4 S5)
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 11 *12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)
usb.c: registered new driver usbfs
usb.c: registered new driver hub
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi'
Starting kswapd
highmem bounce pool size: 64 pages
BIO: pool of 256 setup, 14Kb (56 bytes/bio)
biovec pool[0]:   1 bvecs: 256 entries (12 bytes)
biovec pool[1]:   4 bvecs: 256 entries (48 bytes)
biovec pool[2]:  16 bvecs: 256 entries (192 bytes)
biovec pool[3]:  64 bvecs: 256 entries (768 bytes)
biovec pool[4]: 128 bvecs: 256 entries (1536 bytes)
biovec pool[5]: 256 bvecs: 256 entries (3072 bytes)
aio_setup: sizeof(struct page) = 44
Journalled Block Device driver loaded
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
udf: registering filesystem
Capability LSM initialized
Applying VIA southbridge workaround.
ACPI: Power Button (FF) [PWRF]
ACPI: Processor [CPU0] (supports C1 C2, 2 throttling states)
Serial: 8250/16550 driver $Revision: 1.90 $ IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
i2c-core.o: i2c core module version 2.6.4 (20020719)
i2c-dev.o: i2c /dev entries driver module version 2.6.4 (20020719)
i2c-algo-bit.o: i2c bit algorithm module version 2.6.4 (20020719)
i2c-proc.o version 2.6.4 (20020719)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.11
Non-volatile memory driver v1.2
Software Watchdog Timer: 0.06, soft_margin: 60 sec, nowayout: 0
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 816M
agpgart: Detected Via Apollo Pro KT133 chipset
agpgart: AGP aperture is 256M @ 0xc0000000
[drm] AGP 0.99 on VIA Apollo KT133 @ 0xc0000000 256MB
[drm] Initialized mga 3.0.2 20010321 on minor 0
block: 256 slots per queue, batch=32
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
loop: loaded (max 8 devices)
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
00:09.0: 3Com PCI 3c905C Tornado at 0xe800. Vers LK1.1.18
phy=0, phyx=24, mii_status=0x782d
Linux video capture interface: v1.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1
    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:DMA
hda: IC35L040AVER07-0, ATA DISK drive
hda: DMA disabled
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: LITE-ON LTR-12102B, ATAPI CD/DVD-ROM drive
hdd: Maxtor 90288D2, ATA DISK drive
hdc: DMA disabled
hdd: DMA disabled
ide1 at 0x170-0x177,0x376 on irq 15
VP_IDE: IDE controller at PCI slot 00:07.1
PCI: Unable to reserve I/O region #5:10@d000 for device 00:07.1
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1
VP_IDE: neither IDE port enabled (BIOS)
hda: host protected area => 1
hda: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=5005/255/63, UDMA(100)
 hda: hda1 hda2 < hda5 hda6 hda7 >
hdd: host protected area => 1
hdd: 5627664 sectors (2881 MB) w/256KiB Cache, CHS=5583/16/63, UDMA(33)
 hdd: hdd1 hdd2 < hdd5 hdd6 hdd7 hdd8 hdd9 hdd10 >
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
  Vendor: LITE-ON   Model: LTR-12102B        Rev: NS1D
  Type:   CD-ROM                             ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12
uhci-hcd.c: USB Universal Host Controller Interface driver v2.0
hcd-pci.c: uhci-hcd @ 00:07.2, VIA Technologies, Inc. USB
hcd-pci.c: irq 5, io base 0000d400
hcd.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found at 0
hub.c: 2 ports detected
hcd-pci.c: uhci-hcd @ 00:07.3, VIA Technologies, Inc. USB (#2)
hcd-pci.c: irq 5, io base 0000d800
hcd.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found at 0
hub.c: 2 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: PC Speaker
Advanced Linux Sound Architecture Driver Version 0.9.0rc2 (Wed Jun 19 08:56:25 2002 UTC).
ALSA device list:
  #0: VIA 82C686A/B at 0xdc00, irq 12
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
IPv4 over IPv4 tunneling driver
ip_conntrack version 2.1 (8191 buckets, 65528 max) - 292 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
arp_tables: (C) 2002 David S. Miller
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
hub.c: new USB device 00:07.2-1, assigned address 2
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 88k freed
hub.c: USB hub found at 1
hub.c: 3 ports detected
----------it dies here--------

Note that if no usb devices are plugged in the last message is "Freeing
unused kernel memory...".

It seems to be not completely dead however since if I then plug in my
usb mouse and keyboard I get a message printed that a new usb device has
been found.

Any ideas anyone?

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-18 20:44 BUG: Current 2.5-BK tree dies on boot! Anton Altaparmakov
@ 2002-09-18 22:58 ` Anton Blanchard
  2002-09-19  8:47 ` Jens Axboe
  1 sibling, 0 replies; 12+ messages in thread
From: Anton Blanchard @ 2002-09-18 22:58 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Linux Kernel


> This is without preempt. I tried both with and without SMP, with and without
> large TLB pages, with and without pte highmem, all die in the same place.

I needed this to boot the latest BK on my ppc64 box. The question is
why we are suddenly ending up with prev == NULL, hch mentioned his
patch was only a cleanup in this area.

Anton

===== mm/mprotect.c 1.16 vs edited =====
--- 1.16/mm/mprotect.c	Wed Sep 18 04:05:14 2002
+++ edited/mm/mprotect.c	Wed Sep 18 22:44:40 2002
@@ -281,7 +281,7 @@
 		}
 	}
 
-	if (next && prev->vm_end == next->vm_start &&
+	if (prev && next && prev->vm_end == next->vm_start &&
 			can_vma_merge(next, prev->vm_flags) &&
 			!prev->vm_file && !(prev->vm_flags & VM_SHARED)) {
 		spin_lock(&prev->vm_mm->page_table_lock);

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-18 20:44 BUG: Current 2.5-BK tree dies on boot! Anton Altaparmakov
  2002-09-18 22:58 ` Anton Blanchard
@ 2002-09-19  8:47 ` Jens Axboe
  2002-09-19  9:33   ` ide double init? + " Anton Altaparmakov
  1 sibling, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2002-09-19  8:47 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

On Wed, Sep 18 2002, Anton Altaparmakov wrote:
> This is without preempt. I tried both with and without SMP, with and without
> large TLB pages, with and without pte highmem, all die in the same place.

You have highmem, and bouncing does not get correctly enabled on the ide
drives. This, in combination with broken bouncing (woops), will probably
make it die fairly quickly.

I attach two patches, one fixes the bouncing, the other fixes IDE bounce
enable.

-- 
Jens Axboe


[-- Attachment #2: ide-high-2 --]
[-- Type: text/plain, Size: 2781 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.583   -> 1.584  
#	 include/linux/ide.h	1.16    -> 1.17   
#	drivers/ide/ide-dma.c	1.3     -> 1.4    
#	drivers/ide/ide-probe.c	1.12    -> 1.13   
#	drivers/ide/ide-lib.c	1.2     -> 1.3    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/19	axboe@burns.home.kernel.dk	1.584
# ide_toggle_bounce() was called prior to init'ing the block queue,
# which then reset the bounce_pfn back to BLK_BOUNCE_HIGH. Make
# ide_toggle_bounce() an ide-lib helper, and call it when setting up
# the queue as well.
# --------------------------------------------
#
diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
--- a/drivers/ide/ide-dma.c	Thu Sep 19 09:17:30 2002
+++ b/drivers/ide/ide-dma.c	Thu Sep 19 09:17:30 2002
@@ -445,20 +445,6 @@
 	return 0;
 }
 
-static void ide_toggle_bounce(ide_drive_t *drive, int on)
-{
-	u64 addr = BLK_BOUNCE_HIGH;	/* dma64_addr_t */
-
-	if (on && drive->media == ide_disk) {
-		if (!PCI_DMA_BUS_IS_PHYS)
-			addr = BLK_BOUNCE_ANY;
-		else
-			addr = HWIF(drive)->pci_dev->dma_mask;
-	}
-
-	blk_queue_bounce_limit(&drive->queue, addr);
-}
-
 int __ide_dma_host_off (ide_drive_t *drive)
 {
 	ide_hwif_t *hwif	= HWIF(drive);
diff -Nru a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
--- a/drivers/ide/ide-lib.c	Thu Sep 19 09:17:30 2002
+++ b/drivers/ide/ide-lib.c	Thu Sep 19 09:17:30 2002
@@ -386,3 +386,19 @@
 }
 
 EXPORT_SYMBOL_GPL(ide_get_best_pio_mode);
+
+void ide_toggle_bounce(ide_drive_t *drive, int on)
+{
+	u64 addr = BLK_BOUNCE_HIGH;	/* dma64_addr_t */
+
+	if (on && drive->media == ide_disk) {
+		if (!PCI_DMA_BUS_IS_PHYS)
+			addr = BLK_BOUNCE_ANY;
+		else
+			addr = HWIF(drive)->pci_dev->dma_mask;
+	}
+
+	blk_queue_bounce_limit(&drive->queue, addr);
+}
+
+EXPORT_SYMBOL(ide_toggle_bounce);
diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
--- a/drivers/ide/ide-probe.c	Thu Sep 19 09:17:30 2002
+++ b/drivers/ide/ide-probe.c	Thu Sep 19 09:17:30 2002
@@ -778,6 +778,8 @@
 
 	/* This is a driver limit and could be eliminated. */
 	blk_queue_max_phys_segments(q, PRD_ENTRIES);
+
+	ide_toggle_bounce(drive, 1);
 }
 
 /*
diff -Nru a/include/linux/ide.h b/include/linux/ide.h
--- a/include/linux/ide.h	Thu Sep 19 09:17:30 2002
+++ b/include/linux/ide.h	Thu Sep 19 09:17:30 2002
@@ -1753,6 +1753,7 @@
 extern u8 ide_rate_filter(u8 mode, u8 speed); 
 extern int ide_dma_enable(ide_drive_t *drive);
 extern char *ide_xfer_verbose(u8 xfer_rate);
+extern void ide_toggle_bounce(ide_drive_t *drive, int on);
 
 extern spinlock_t ide_lock;
 

[-- Attachment #3: bounce-end_io-2 --]
[-- Type: text/plain, Size: 2936 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.582   -> 1.583  
#	        mm/highmem.c	1.35    -> 1.36   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/19	axboe@burns.home.kernel.dk	1.583
# clean up highmem bounce end_io handling
# --------------------------------------------
#
diff -Nru a/mm/highmem.c b/mm/highmem.c
--- a/mm/highmem.c	Thu Sep 19 08:15:17 2002
+++ b/mm/highmem.c	Thu Sep 19 08:15:17 2002
@@ -291,16 +291,12 @@
 	}
 }
 
-static inline int bounce_end_io(struct bio *bio, unsigned int bytes_done,
-				int error, mempool_t *pool)
+static void bounce_end_io(struct bio *bio, mempool_t *pool)
 {
 	struct bio *bio_orig = bio->bi_private;
 	struct bio_vec *bvec, *org_vec;
 	int i;
 
-	if (bio->bi_size)
-		return 1;
-
 	if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
 		goto out_eio;
 
@@ -318,43 +314,54 @@
 	}
 
 out_eio:
-	bio_endio(bio_orig, bytes_done, error);
+	bio_endio(bio_orig, bio_orig->bi_size, 0);
 	bio_put(bio);
-	return 0;
 }
 
-static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done,
-			       int error)
+static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done,int err)
 {
-	return bounce_end_io(bio, bytes_done, error, page_pool);
+	if (bio->bi_size)
+		return 1;
+
+	bounce_end_io(bio, page_pool);
+	return 0;
 }
 
-static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done,
-				   int error)
+static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int err)
 {
-	return bounce_end_io(bio, bytes_done, error, isa_page_pool);
+	if (bio->bi_size)
+		return 1;
+
+	bounce_end_io(bio, isa_page_pool);
+	return 0;
 }
 
-static inline int __bounce_end_io_read(struct bio *bio, unsigned int done,
-				       int error, mempool_t *pool)
+static inline void __bounce_end_io_read(struct bio *bio, mempool_t *pool)
 {
 	struct bio *bio_orig = bio->bi_private;
 
 	if (test_bit(BIO_UPTODATE, &bio->bi_flags))
 		copy_to_high_bio_irq(bio_orig, bio);
 
-	return bounce_end_io(bio, done, error, pool);
+	bounce_end_io(bio, pool);
 }
 
 static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err)
 {
-	return __bounce_end_io_read(bio, bytes_done, err, page_pool);
+	if (bio->bi_size)
+		return 1;
+
+	__bounce_end_io_read(bio, page_pool);
+	return 0;
 }
 
-static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done,
-				  int err)
+static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int err)
 {
-	return __bounce_end_io_read(bio, bytes_done, err, isa_page_pool);
+	if (bio->bi_size)
+		return 1;
+
+	__bounce_end_io_read(bio, isa_page_pool);
+	return 0;
 }
 
 void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19  8:47 ` Jens Axboe
@ 2002-09-19  9:33   ` Anton Altaparmakov
  2002-09-19  9:45     ` Jens Axboe
  0 siblings, 1 reply; 12+ messages in thread
From: Anton Altaparmakov @ 2002-09-19  9:33 UTC (permalink / raw)
  To: Jens Axboe, Andre Hedrick; +Cc: Linux Kernel

At 09:47 19/09/02, Jens Axboe wrote:
>On Wed, Sep 18 2002, Anton Altaparmakov wrote:
> > This is without preempt. I tried both with and without SMP, with and 
> without
> > large TLB pages, with and without pte highmem, all die in the same place.
>
>You have highmem, and bouncing does not get correctly enabled on the ide
>drives. This, in combination with broken bouncing (woops), will probably
>make it die fairly quickly.
>
>I attach two patches, one fixes the bouncing, the other fixes IDE bounce
>enable.

BK as of this morning already contains the bounce patch, so I only applied 
the IDE bounce enable and it worked fine. - Thanks!

Note there is something odd wrt IDE initialization. The driver seems to be 
trying to initialize twice and there quite a few messages output which 
don't reflect reality (probably a consequence of the double init). For 
example it says DMA disabled but checking with hdparm and in /proc/ide/via 
DMA is enabled just fine. And it says neither IDE port enabled (BIOS) which 
isn't true either.

Here is the current IDE output on boot:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1
     ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
     ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:DMA
hda: IC35L040AVER07-0, ATA DISK drive
hda: DMA disabled
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: LITE-ON LTR-12102B, ATAPI CD/DVD-ROM drive
hdd: Maxtor 90288D2, ATA DISK drive
hdc: DMA disabled
hdd: DMA disabled
ide1 at 0x170-0x177,0x376 on irq 15
VP_IDE: IDE controller at PCI slot 00:07.1
PCI: Unable to reserve I/O region #5:10@d000 for device 00:07.1
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1
VP_IDE: port 0x01f0 already claimed by ide0
VP_IDE: port 0x0170 already claimed by ide1
VP_IDE: neither IDE port enabled (BIOS)
hda: host protected area => 1
hda: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=5005/255/63, UDMA(100)
  hda: hda1 hda2 < hda5 hda6 hda7 >
hdd: host protected area => 1
hdd: 5627664 sectors (2881 MB) w/256KiB Cache, CHS=5583/16/63, UDMA(33)
  hdd: hdd1 hdd2 < hdd5 hdd6 hdd7 hdd8 hdd9 hdd10 >
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
   Vendor: LITE-ON   Model: LTR-12102B        Rev: NS1D
   Type:   CD-ROM                             ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12

But it all seems to works just fine, despite the slightly confused init...

Best regards,

         Anton


-- 
   "I haven't lost my mind... it's backed up on tape." - Peter da Silva
-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS Maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19  9:33   ` ide double init? + " Anton Altaparmakov
@ 2002-09-19  9:45     ` Jens Axboe
  2002-09-19 10:08       ` Jens Axboe
  0 siblings, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2002-09-19  9:45 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Andre Hedrick, Linux Kernel

On Thu, Sep 19 2002, Anton Altaparmakov wrote:
> At 09:47 19/09/02, Jens Axboe wrote:
> >On Wed, Sep 18 2002, Anton Altaparmakov wrote:
> >> This is without preempt. I tried both with and without SMP, with and 
> >without
> >> large TLB pages, with and without pte highmem, all die in the same place.
> >
> >You have highmem, and bouncing does not get correctly enabled on the ide
> >drives. This, in combination with broken bouncing (woops), will probably
> >make it die fairly quickly.
> >
> >I attach two patches, one fixes the bouncing, the other fixes IDE bounce
> >enable.
> 
> BK as of this morning already contains the bounce patch, so I only applied 
> the IDE bounce enable and it worked fine. - Thanks!

Good

> Note there is something odd wrt IDE initialization. The driver seems to be 
> trying to initialize twice and there quite a few messages output which 
> don't reflect reality (probably a consequence of the double init). For 
> example it says DMA disabled but checking with hdparm and in /proc/ide/via 
> DMA is enabled just fine. And it says neither IDE port enabled (BIOS) which 
> isn't true either.

Yes you are right, it does seem to try and init twice. Wonder why. I'll
take a look at that.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19  9:45     ` Jens Axboe
@ 2002-09-19 10:08       ` Jens Axboe
  2002-09-19 10:58         ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2002-09-19 10:08 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Andre Hedrick, Linux Kernel, Alan Cox

On Thu, Sep 19 2002, Jens Axboe wrote:
> > Note there is something odd wrt IDE initialization. The driver seems to be 
> > trying to initialize twice and there quite a few messages output which 
> > don't reflect reality (probably a consequence of the double init). For 
> > example it says DMA disabled but checking with hdparm and in /proc/ide/via 
> > DMA is enabled just fine. And it says neither IDE port enabled (BIOS) which 
> > isn't true either.
> 
> Yes you are right, it does seem to try and init twice. Wonder why. I'll
> take a look at that.

Seems to be ide probe calling the pci probe functions, and then they get
called by the pci layer later when they register. Dunno what the best
way to handle this is. Alan quotes ordering constraints as the reason.
Then maybe the easiest fix is to just do

chipset_init(bla)
{
	if (chipset already setup)
		return;

	do_init();
}

Alan?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 10:08       ` Jens Axboe
@ 2002-09-19 10:58         ` Alan Cox
  2002-09-19 11:14           ` Jens Axboe
  0 siblings, 1 reply; 12+ messages in thread
From: Alan Cox @ 2002-09-19 10:58 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Anton Altaparmakov, Andre Hedrick, Linux Kernel

On Thu, 2002-09-19 at 11:08, Jens Axboe wrote:
> Seems to be ide probe calling the pci probe functions, and then they get
> called by the pci layer later when they register. Dunno what the best
> way to handle this is. Alan quotes ordering constraints as the reason.
> Then maybe the easiest fix is to just do

Something is very wrong if they initialize twice. Hacking chipset_init
is not a fix its an ugly hack.

They should end up on the ide queue to init, then transfer to the core
PCI hotplug layer. The hotplug layer won't call the setups again because
the device is already owned by the driver that grabbed it.

In 2.4 at least pci_register_driver checks that it doesnt do that

    pci_for_each_dev(dev) {
                if (!pci_dev_driver(dev))
                        count += pci_announce_device(drv, dev);
        }


2.5 should do the same

Alan


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 10:58         ` Alan Cox
@ 2002-09-19 11:14           ` Jens Axboe
  2002-09-19 13:28             ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2002-09-19 11:14 UTC (permalink / raw)
  To: Alan Cox; +Cc: Anton Altaparmakov, Andre Hedrick, Linux Kernel

On Thu, Sep 19 2002, Alan Cox wrote:
> On Thu, 2002-09-19 at 11:08, Jens Axboe wrote:
> > Seems to be ide probe calling the pci probe functions, and then they get
> > called by the pci layer later when they register. Dunno what the best
> > way to handle this is. Alan quotes ordering constraints as the reason.
> > Then maybe the easiest fix is to just do
> 
> Something is very wrong if they initialize twice. Hacking chipset_init
> is not a fix its an ugly hack.

True :-)

> They should end up on the ide queue to init, then transfer to the core
> PCI hotplug layer. The hotplug layer won't call the setups again because
> the device is already owned by the driver that grabbed it.
> 
> In 2.4 at least pci_register_driver checks that it doesnt do that
> 
>     pci_for_each_dev(dev) {
>                 if (!pci_dev_driver(dev))
>                         count += pci_announce_device(drv, dev);
>         }
> 
> 
> 2.5 should do the same

2.5 is reorged big time it seems, pci_register_driver() ->
drier_attach() -> do_driver_attach() -> found_match() calls ->probe()
unconditionally...

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 13:28             ` Alan Cox
@ 2002-09-19 13:27               ` Jens Axboe
  2002-09-19 17:48                 ` Patrick Mochel
  0 siblings, 1 reply; 12+ messages in thread
From: Jens Axboe @ 2002-09-19 13:27 UTC (permalink / raw)
  To: Alan Cox; +Cc: Anton Altaparmakov, Andre Hedrick, Linux Kernel, Patrick Mochel

On Thu, Sep 19 2002, Alan Cox wrote:
> On Thu, 2002-09-19 at 12:14, Jens Axboe wrote:
> > 2.5 is reorged big time it seems, pci_register_driver() ->
> > drier_attach() -> do_driver_attach() -> found_match() calls ->probe()
> > unconditionally...
> 
> That would appear to be a bug in the 2.5 driver layer then. I'd suggest
> fixing it there. Attempting to probe a device that already has a driver
> attached to it doesn't seem to make sense.

Agree. Pat?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 11:14           ` Jens Axboe
@ 2002-09-19 13:28             ` Alan Cox
  2002-09-19 13:27               ` Jens Axboe
  0 siblings, 1 reply; 12+ messages in thread
From: Alan Cox @ 2002-09-19 13:28 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Anton Altaparmakov, Andre Hedrick, Linux Kernel

On Thu, 2002-09-19 at 12:14, Jens Axboe wrote:
> 2.5 is reorged big time it seems, pci_register_driver() ->
> drier_attach() -> do_driver_attach() -> found_match() calls ->probe()
> unconditionally...

That would appear to be a bug in the 2.5 driver layer then. I'd suggest
fixing it there. Attempting to probe a device that already has a driver
attached to it doesn't seem to make sense.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 13:27               ` Jens Axboe
@ 2002-09-19 17:48                 ` Patrick Mochel
  2002-09-19 18:02                   ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Patrick Mochel @ 2002-09-19 17:48 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Alan Cox, Anton Altaparmakov, Andre Hedrick, Linux Kernel


On Thu, 19 Sep 2002, Jens Axboe wrote:

> On Thu, Sep 19 2002, Alan Cox wrote:
> > On Thu, 2002-09-19 at 12:14, Jens Axboe wrote:
> > > 2.5 is reorged big time it seems, pci_register_driver() ->
> > > drier_attach() -> do_driver_attach() -> found_match() calls ->probe()
> > > unconditionally...
> > 
> > That would appear to be a bug in the 2.5 driver layer then. I'd suggest
> > fixing it there. Attempting to probe a device that already has a driver
> > attached to it doesn't seem to make sense.
> 
> Agree. Pat?

Yes, and that's the way it's set up: we check if the device has a driver 
before we bind to it. However, dev->driver doesn't get set before the 
device is registered with the core for PCI devices. That's fixed easily 
enough. 

But, I'm a bit confused on where this is happening. The PCI layer will 
probe for devices before any drivers are registered. The drivers are 
registered, then they're attached to devices that were already discovered. 
So, how are they getting init'ed twice? 


	-pat


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ide double init? + Re: BUG: Current 2.5-BK tree dies on boot!
  2002-09-19 17:48                 ` Patrick Mochel
@ 2002-09-19 18:02                   ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2002-09-19 18:02 UTC (permalink / raw)
  To: Patrick Mochel
  Cc: Jens Axboe, Anton Altaparmakov, Andre Hedrick, Linux Kernel

On Thu, 2002-09-19 at 18:48, Patrick Mochel wrote:
> Yes, and that's the way it's set up: we check if the device has a driver 
> before we bind to it. However, dev->driver doesn't get set before the 
> device is registered with the core for PCI devices. That's fixed easily 
> enough. 
> 
> But, I'm a bit confused on where this is happening. The PCI layer will 
> probe for devices before any drivers are registered. The drivers are 
> registered, then they're attached to devices that were already discovered. 
> So, how are they getting init'ed twice? 

The IDE layer has to preserve ordering. It does that by doing pci device
ordered scans at boot then handing the driver registrations over to the
pci hotplug layer for new inserts.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-09-19 17:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-18 20:44 BUG: Current 2.5-BK tree dies on boot! Anton Altaparmakov
2002-09-18 22:58 ` Anton Blanchard
2002-09-19  8:47 ` Jens Axboe
2002-09-19  9:33   ` ide double init? + " Anton Altaparmakov
2002-09-19  9:45     ` Jens Axboe
2002-09-19 10:08       ` Jens Axboe
2002-09-19 10:58         ` Alan Cox
2002-09-19 11:14           ` Jens Axboe
2002-09-19 13:28             ` Alan Cox
2002-09-19 13:27               ` Jens Axboe
2002-09-19 17:48                 ` Patrick Mochel
2002-09-19 18:02                   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).