IDE/ATA: Intel i865-based mainboard, CDROM not detected
A collegue of mine has an Intel mainboard with the i865 chipset onboard (DQ965). All kernels up to and including 2.6.22-rc2 do not detect the IDE CDROM/DVDROM when booting. The SATA hard drive is found without any problems. Relevant parts from lspci: 00:1f.2 0101: 8086:2820 (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) (prog-if 8f [Master SecP SecO PriP PriO]) Subsystem: Intel Corporation Unknown device 514d Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19 00:1f.5 0101: 8086:2825 (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) (prog-if 85 [Master SecO PriO]) Subsystem: Intel Corporation Unknown device 514d Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19 What's interesting here is that 00:1f.2 and 00:1f.5 are both identified as "n port SATA" controllers even though one of them (I suspect 00:1f.5) is a PATA controller. This may just be a typo in lspci's database though. Boot messages: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx Probing IDE interface ide0... Probing IDE interface ide1... : ata_piix :00:1f.2: version 2.11 ata_piix :00:1f.2: MAP [ P0 P2 P1 P3 ] ACPI: PCI Interrupt :00:1f.2[A] -> GSI 19 (level, low) -> IRQ 19 PCI: Setting latency timer of device :00:1f.2 to 64 scsi0 : ata_piix scsi1 : ata_piix ata1: SATA max UDMA/133 cmd 0x00012138 ctl 0x00012156 bmdma 0x00012110 irq 0 ata2: SATA max UDMA/133 cmd 0x00012130 ctl 0x00012152 bmdma 0x00012118 irq 0 ata1.00: ata_hpa_resize 1: sectors = 488397168, hpa_sectors = 488397168 ata1.00: ATA-7: WDC WD2500AAJS-00RYA0, 12.01B01, max UDMA/133 ata1.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32) ata1.00: ata_hpa_resize 1: sectors = 488397168, hpa_sectors = 488397168 ata1.00: configured for UDMA/133 ATA: abnormal status 0x7F on port 0x00012137 scsi 0:0:0:0: Direct-Access ATA WDC WD2500AAJS-0 12.0 PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI disk ata_piix :00:1f.5: MAP [ P0 P2 P1 P3 ] Here the HDD is clearly detected while the CDROM/DVDROM (attached to ide0) isn't. libata is compiled into the kernel as is the non-libata PATA driver. In the libata configuration, only SATA_AHCI, ATA_PIIX and ATA_GENERIC are defined. For the non-libata side of things most options are selected including BLK_DEV_IDE, BLK_DEV_IDECD, IDE_GENERIC, BLK_DEV_IDEPCI, BLK_DEV_GENERIC, BLK_DEV_IDEDMA_PCI and BLK_DEV_PIIX. Does anyone have any ideas as to why there is a problem detecting the PATA (IDE) CDROM/DVDROM in this machine? Further information/testing can be provided if requested. Regards jonathan -- "Time is an illusion; lunchtime doubly so" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall
On 5/20/07, Andrew Morton <[EMAIL PROTECTED]> wrote: hm, OK. I hope you guys have it under control ;) With http://userweb.kernel.org/~akpm/config-vmm.txt I get drivers/built-in.o:(.data+0x5790): undefined reference to `serial8250_find_port_for_earlycon' please check this one Bjorn, I can not find fixmap.h for ia64.hope you can use ioremap instead, then we can create one dummy fixmap.h in include/asm-ia64 [PATCH]serial: make early_uart to use early_prarm instead of console_initcall Make early_uart to use early_param, so uart console can be used earlier. Make it to be bootconsole with CON_BOOT flag, so can use console handover feature. and it will switch to corresponding normal serial console automatically. new command line will be earlycon=uart,io,0x3f8,9600n8 earlycon=uart,io,0x3f8,9600n8 console=tty0 earlycon=uart,mmio,0xff5e,115200n8 it will print in very early stage Early serial console at I/O port 0x3f8 (options '9600n8') later for console it will print console handover: boot [uart0] -> real [ttyS0] Signed-off-by: <[EMAIL PROTECTED]> diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index f74dfc4..2d37850 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20); .section .init.text,"ax",@progbits #endif + /* Do an early initialization of the fixmap area */ + movl $(swapper_pg_dir - __PAGE_OFFSET), %edx + movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax + addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ + movl %eax, 4092(%edx) + #ifdef CONFIG_SMP ENTRY(startup_32_smp) cld @@ -507,6 +513,8 @@ ENTRY(_stext) .section ".bss.page_aligned","w" ENTRY(swapper_pg_dir) .fill 1024,4,0 +ENTRY(swapper_pg_pmd) + .fill 1024,4,0 ENTRY(empty_zero_page) .fill 4096,1,0 diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 1fab487..2da30ad 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -73,7 +73,11 @@ startup_64: addq %rbp, init_level4_pgt + (511*8)(%rip) addq %rbp, level3_ident_pgt + 0(%rip) + addq %rbp, level3_kernel_pgt + (510*8)(%rip) + addq %rbp, level3_kernel_pgt + (511*8)(%rip) + + addq %rbp, level2_fixmap_pgt + (506*8)(%rip) /* Add an Identity mapping if I am above 1G */ leaq _text(%rip), %rdi @@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt) .fill 510,8,0 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE - .fill 1,8,0 + .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE + +NEXT_PAGE(level2_fixmap_pgt) + .fill 506,8,0 + .quad level1_fixmap_pgt - __START_KERNEL_map + _KERNPG_TABLE + /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */ + .fill 5,8,0 + +NEXT_PAGE(level1_fixmap_pgt) + .fill 512,8,0 NEXT_PAGE(level2_ident_pgt) /* Since I easily can, map the first 1G. diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index c84dab0..5a91ac5 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2367,6 +2367,9 @@ static struct uart_ops serial8250_pops = { .request_port = serial8250_request_port, .config_port = serial8250_config_port, .verify_port = serial8250_verify_port, +#ifdef CONFIG_SERIAL_8250_CONSOLE + .find_port_for_earlycon = serial8250_find_port_for_earlycon, +#endif }; static struct uart_8250_port serial8250_ports[UART_NR]; @@ -2533,7 +2536,7 @@ static int __init serial8250_console_init(void) } console_initcall(serial8250_console_init); -static int __init find_port(struct uart_port *p) +int __init find_port_serial8250(struct uart_port *p) { int line; struct uart_port *port; @@ -2546,26 +2549,6 @@ static int __init find_port(struct uart_port *p) return -ENODEV; } -int __init serial8250_start_console(struct uart_port *port, char *options) -{ - int line; - - line = find_port(port); - if (line < 0) - return -ENODEV; - - add_preferred_console("ttyS", line, options); - printk("Adding console on ttyS%d at %s 0x%lx (options '%s')\n", - line, port->iotype == UPIO_MEM ? "MMIO" : "I/O port", - port->iotype == UPIO_MEM ? (unsigned long) port->mapbase : - (unsigned long) port->iobase, options); - if (!(serial8250_console.flags & CON_ENABLED)) { - serial8250_console.flags &= ~CON_PRINTBUFFER; - register_console(&serial8250_console); - } - return line; -} - #define SERIAL8250_CONSOLE &serial8250_console #else #define SERIAL8250_CONSOLE NULL diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c index 7e51119..0572a1c 100644 --- a/drivers/serial/8250_early.c +++ b/drivers/serial/8250_early.c @@ -17,13 +17,9 @@ * we locate the device directly by its MMIO or I/O port address. * * The user can specify the device directly, e.g., - * console=uart,io,0x3f8,9600n8 - * console=uart,mmio,0xff5e,115200n8 - * or platform code can call early_uart_console_init() to set - * the early UART device. + * earlycon=uart,io,0x3f8,9600n8 + * earlycon=uart,mmio,0xff5e,115200n8 * - * Aft
Re: [PATCH] make cancel_rearming_delayed_work() reliable
On Fri, May 18, 2007 at 03:33:49PM +0200, Tejun Heo wrote: ... > I wasn't really aiming for performance optimization. I agree that we > have to live with barriers but it's also true that they and other > synchronization constructs can be difficult to understand and thus to > verify, so IMHO, when it comes to synchronization constructs, it's best > stick to or make things look similar to more established ways, so that > people can categorize the usage and understand it more easily. Sorry, I'm not convinced by this... If we want to stick to more understanable, established ways, why don't we use a global lock (not per cpu but per work or per workqueue) for insert_work(), which would be really the simplest construct here. Probably because some compromise is needed. On the other hand many locks could be replaced with elaborate constructs with atomic operations like this. But for some reasons this usually isn't done. IMHO it's better to get used to barriers, because, as seen in this thread, even after finding better solution, the problem of execution ordering didn't disappear. Another "strange" question is: if these barriers are so tough, why Oleg managed to do them seemingly right from the very first time? But even if he would do some error here, I think it should be easier to check for this one problem only, than to risk the "stability" of the whole algorithm by changing more. Of course now, after the time was spent anyway, this new "old-way" is more attractive. > > Locked enter/leave model, where each cpu has its own lock and whatever > entity enters and leaves a cpu while holding the respective per-cpu > lock, guarantees that while holding a per-cpu lock, no one enters or > leaves the cpu. It's conceptually simple and basically the semantic > that we're all trying to achieve here. I prefer simplicity over perfomance too. But there is a question of price... These modern things like RCU or barriers are unavoidable, and probably we should get used to think the ALPHA is right and 'normal' here - not x86 (by limiting compilers and programmers with making the most of all those new caches). > > I think things can be made more similar to the locked enter/leave model > using the extra bit by putting manipulation and testing of the bit into > accesor functions, so readability was my primary concern not > performance. But, then again, we can probably make the barrier() model > readable enough too with proper accessor functions and plenty of > comments above them. Yes, the good thing is Oleg can choose between two good solutions here! (I don't envy him...) Thanks for your response, sorry for my delay & Best regards, Jarek P. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] lockdep: lock contention tracking
On Mon, May 21, 2007 at 08:08:28AM +0200, Ingo Molnar wrote: > To me it appears Peter's stuff is already a pretty complete solution on > its own, and it's a whole lot simpler (and less duplicative) than your > lockstat patch. Could you list the specific items/features that you > think Peter's stuff doesnt have? First of all, this isn't an either/or kind of thing nor should it be thought of in that way. Precise file/function/line placement for one thing. My patch is specifically for -rt which does checks that Peter's doesn't and is needed to characterize -rt better. My stuff is potentially more extensible since I have other ideas for it that really are outside of the lockdep logic currently. These can be unified, but not so that one overrides the intended features of other. That's why I was hessitant to completely unify with lockdep in the manner you suggested. bill - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: bug in 2.6.22-rc2: loop mount limited to one single iso image
On 5/20/07, Ken Chen <[EMAIL PROTECTED]> wrote: On 5/19/07, Ray Lee <[EMAIL PROTECTED]> wrote: > Yeah, that's the only one left. I was hoping it wasn't that one, as it > claimed to have been tested extensively. Guess it wasn't tested with > udev. > > Ken? Ball's in your court. As the patch isn't providing a killer > feature for 2.6.22, I'd suggest just reverting it for now until the > issues are ironed out. The real solution is to have the user space tool to create these device nodes in advance. Maybe. But requiring people upgrade their userspace tools or setup for 2.6.22 isn't a reasonable solution. The original loop patch was coded such that when we open a loop device N, the immediate adjacent device "N + 1" is created. This will keep "mount -o loop" happy because it typically does a linear scan to find a free device. This might be somewhat hackary, but certainly will be backward compatible before user space solution is deployed. Except userspace is currently expecting 8 loop nodes upon bootup. Creating n+1 when n is opened is good, but racy if userspace tries to mount serveral loop devices in parallel. If the loop device instantiates 8 (or max_loop) upon init, then we're compatible with how things are being done in 2.6.21 and earlier. However, the code was removed by Al in this commit: commit 07002e995638b83a6987180f43722a0eb39d4932 Author: Al Viro <[EMAIL PROTECTED]> Date: Sat May 12 16:23:15 2007 -0400 fix the dynamic allocation and probe in loop.c No, backing that code out wasn't good enough -- the reporter tested reverting both of Al's patches out and was still getting errors on boot. It took reverting your original one out as well to make it work. So, a compromise? Let's start with 8 (or max_loop) populated, and then we can move forward separately with teaching userspace new loop tricks. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Chaining sg lists for big IO commands v5
On Mon, May 21 2007, Jens Axboe wrote: > On Fri, May 18 2007, Badari Pulavarty wrote: > > On Fri, 2007-05-18 at 09:35 +0200, Jens Axboe wrote: > > > On Thu, May 17 2007, Badari Pulavarty wrote: > > > > On Thu, 2007-05-17 at 08:27 +0200, Jens Axboe wrote: > > > > > On Wed, May 16 2007, Badari Pulavarty wrote: > > > > > > On Tue, 2007-05-15 at 19:50 +0200, Jens Axboe wrote: > > > > > > > On Tue, May 15 2007, Badari Pulavarty wrote: > > > > > > > > On Tue, 2007-05-15 at 19:20 +0200, Jens Axboe wrote: > > > > > > > > > On Tue, May 15 2007, Badari Pulavarty wrote: > > > > > > > > > > On Fri, 2007-05-11 at 15:51 +0200, Jens Axboe wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > Updated version of the patch - this time I'll just attach > > > > > > > > > > > the patch > > > > > > > > > > > file... > > > > > > > > > > > > > > > > > > > > Missing scatterlist.h inclusions.. > > > > > > > > > > > > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c: In function > > > > > > > > > > ???sym_scatter???: > > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:385: warning: implicit > > > > > > > > > > declaration > > > > > > > > > > of function ???for_each_sg??? > > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:385: error: expected > > > > > > > > > > ???;??? before ???{??? > > > > > > > > > > token > > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:375: warning: unused > > > > > > > > > > variable ???tp??? > > > > > > > > > > make[3]: *** [drivers/scsi/sym53c8xx_2/sym_glue.o] Error 1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c: In function > > > > > > > > > > ???qla24xx_build_scsi_iocbs???: > > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c:678: warning: implicit > > > > > > > > > > declaration of > > > > > > > > > > function ???for_each_sg??? > > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c:678: error: expected > > > > > > > > > > ???;??? before ???{??? > > > > > > > > > > token > > > > > > > > > > > > > > > > > > Thanks, will fix those. What arch? I tested it here. > > > > > > > > > > > > > > > > I am playing with them on ppc64. > > > > > > > > > > > > > > Ah ok, you need the updated patch series for ppc64 support. > > > > > > > Builds fine > > > > > > > here on ppc64. See the #sglist branch of the block repo: > > > > > > > > > > > > > > git://git.kernel.dk/data/git/linux-2.6-block.git > > > > > > > > > > > > > > I can mail you an updated patch, if you want. > > > > > > > > > > > > > > > > > > Here is the whole panic stack.. > > > > > > > > > > Thanks will fix that up, the IDE part is totally untested. Can you try > > > > > and backout this patch and see if it boots? > > > > > > > > I increased max_segments to 1024 on my qla2200 attached disks and > > > > simple "dd" (direct read) resulted in following: > > > > > > > > elm3b29:/sys/block/sdd/queue # echo 1024 > max_segments > > > > elm3b29:/sys/block/sdd/queue # cat max_hw_sectors_kb > max_sectors_kb > > > > elm3b29:/mnt # dd iflag=direct if=./z of=/dev/null bs=512M > > > > > > > > Unable to handle kernel paging request at 1008 RIP: > > > > [] __rmqueue+0x6f/0x120 > > > > > > Auch, that's a bug. I don't think the oom path has been tested yet, > > > perhaps this is hitting it. > > > > > > Can you try with this debug patch, plus enable the slab debugging > > > helpers (like poisoning)? > > > > > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > > > index 7456992..a479d1e 100644 > > > --- a/drivers/scsi/scsi_lib.c > > > +++ b/drivers/scsi/scsi_lib.c > > > @@ -793,6 +793,7 @@ struct scatterlist *scsi_alloc_sgtable(struct > > > scsi_cmnd *cmd, gfp_t gfp_mask) > > > return ret; > > > enomem: > > > if (ret) { > > > + printk(KERN_ERR "scsi: failed to allocate sg table\n"); > > > /* > > >* Free entries chained off ret. Since we were trying to > > >* allocate another sglist, we know that all entries are of > > > > > > > Not much help. I get all kinds of weird panics.. This time I got (with > > the above debug). > > > > general protection fault: [1] SMP > > CPU 1 > > Modules linked in: jfs sg sd_mod qla2xxx firmware_class > > scsi_transport_fc scsi_mod vfat fat ipv6 thermal processor fan button > > battery ac dm_mod floppy parport_pc lp parport > > Pid: 56, comm: kblockd/1 Not tainted 2.6.22-rc1-sg #8 > > RIP: 0010:[] [] kmem_cache_alloc > > +0x36/0x70 > > RSP: 0018:81017abbfc10 EFLAGS: 00010002 > > RAX: RBX: 0082 RCX: 0664 > > RDX: 81019ff2b8a0 RSI: 00011220 RDI: 8068d120 > > RBP: 81017abbfc20 R08: 39f8 R09: > > R10: 81019cbee700 R11: 0188 R12: 8101df2a64e0 > > R13: 00011220 R14: 8101df2a6510 R15: 81017abbfc50 > > FS: 2b505b027f20() GS:81018021f300() > > knlGS:f7da26b0 > > CS: 0010 DS: 0018 ES: 0018 CR0: 800500
Re: [PATCH 8/12] x86-64: update iommu/dma mapping functions to sg helpers
On Thu, May 10 2007, Benny Halevy wrote: > @@ -411,12 +406,13 @@ int gart_map_sg(struct device *dev, struct scatterlist > *sg, int nents, int dir) > boundary and the new one doesn't have an offset. */ > if (!iommu_merge || !nextneed || !need || s->offset || > (ps->offset + ps->length) % PAGE_SIZE) { > - if (dma_map_cont(sg, start, i, sg+out, pages, > - need) < 0) > + if (dma_map_cont(start_sg, i - start, sg+out, > + pages, need) < 0) > goto error; > out++; > pages = 0; > - start = i; > + start = i; > + start_sg = s; > } > } > > @@ -424,7 +420,7 @@ int gart_map_sg(struct device *dev, struct scatterlist > *sg, int nents, int dir) > pages += to_pages(s->offset, s->length); > ps = s; > } > - if (dma_map_cont(sg, start, i, sg+out, pages, need) < 0) > + if (dma_map_cont(start_sg, i - start, sg+out, pages, need) < 0) > goto error; > out++; > flush_gart(); Your patch is (very) buggy, the whole premise of doing chained sg entries makes sg + int illegal! -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.21.1 on Fedora Core 6 breaks LVM/vgscan
On 21 May 2007 I wrote: > Attempting to compile a 2.6.21.1 kernel for use on a Fedora Core 6 box > results in a panic at boot because the root filesystem can't be found. I have just compiled 2.6.22-rc2 with the configuration file given in my previous post and the resulting kernel successfully boots on the machine concerned. Whatever broke LVM for this machine in between 2.6.18 and 2.6.21.1 has now been fixed. There is still a problem with the CDROM but I will follow up in another thread about that. Regards jonathan -- "Time is an illusion; lunchtime doubly so" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [rfc] increase struct page size?!
On Fri, 18 May 2007 13:37:09 -0700 "Luck, Tony" <[EMAIL PROTECTED]> wrote: > > I wonder if there are other uses for the free space? > > unsigned long moreflags; > > Nick and Hugh were just sparring over adding a couple (or perhaps 8) > flag bits. This would supply 64 new bits ... maybe that would keep > them happy for a few more years. > - page->zone free some flags bits and makes page_zone() simple. and software (fake) zone for memory control can be added ? or -page->some_memory_controler ? (I don't know whether resource controller people want this or not.) -Kame - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [BUG] local_softirq_pending storm
On Monday 21 May 2007 03:13:08 Thomas Gleixner wrote: > On Sun, 2007-05-20 at 02:53 +0530, Anant Nitya wrote: > > > 1 == TASK_INTERRUPTIBLE, so we know that ksoftirqd was not woken up. At > > > least it is not a scheduler problem. > > > > > > I work out a more complex debug patch and pester you to test once I'm > > > done. > > > > No problem :) > > You asked for it :) > > Please patch 2.6.22-rc2 with > > http://tglx.de/projects/hrtimers/2.6.22-rc2/patch-2.6.22-rc2-hrt2.patch > and > http://www.tglx.de/private/tglx/ht-debug/tracer.diff > > Compile it with the config > > http://www.tglx.de/private/tglx/ht-debug/config.debug > > You should find something like: > > ( swapper-0|#0): new 67173 us user-latency. > > along with the familiar "NOHZ .." message in your log file. > > Once that happened please do: > > $ cat /proc/latency_trace >trace.txt > > compress it and send it to me along with the full dmesg output or put > both up to some place, where I can download it. Hi Thomas Here are the links... http://cybertek.info/taitai/dmesg-2.6.22.rc2.hrt2-1.SMP.DN.LINUX.txt http://cybertek.info/taitai/trace.txt.bz2 Regards Ananitya > > Michal, > > IIRC you encountered the same P4/HT related wreckage. Can you do the > same ? > > Thanks, > > tglx -- Out of many thousands, one may endeavor for perfection, and of those who have achieved perfection, hardly one knows Me in truth. -- Gita Sutra Of Mysticism - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.22-rc2 BUG: at include/linux/slub_def.h:77 kmalloc_index()
a regression (well I switched to slub) happens on boot... ... hub 4-0:1.0: USB hub found hub 4-0:1.0: 2 ports detected ACPI: PCI Interrupt :00:1d.3[D] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device :00:1d.3 to 64 uhci_hcd :00:1d.3: UHCI Host Controller uhci_hcd :00:1d.3: new USB bus registered, assigned bus number 5 uhci_hcd :00:1d.3: irq 16, io base 0x4040 usb usb5: configuration #1 chosen from 1 choice hub 5-0:1.0: USB hub found hub 5-0:1.0: 2 ports detected usb 1-4: new high speed USB device using ehci_hcd and address 3 BUG: at include/linux/slub_def.h:77 kmalloc_index() [] get_slab+0x1c8/0x250 [] usb_get_configuration+0x854/0xfa0 [] __kmalloc_track_caller+0x1c/0x80 [] __kzalloc+0x1a/0x50 [] usb_get_configuration+0x854/0xfa0 [] usb_start_wait_urb+0x70/0xb0 [] hub_port_init+0x90/0x5f0 [] usb_new_device+0x14/0x100 [] hub_thread+0x5ab/0xc30 [] autoremove_wake_function+0x0/0x50 [] hub_thread+0x0/0xc30 [] kthread+0x42/0x70 [] kthread+0x0/0x70 [] kernel_thread_helper+0x7/0x14 === usb 1-4: configuration #1 chosen from 1 choice usb 2-2: new full speed USB device using uhci_hcd and address 2 usb 2-2: configuration #1 chosen from 1 choice usb 4-2: new full speed USB device using uhci_hcd and address 2 ... -- Sometimes, there's a moment as you're waking, when you become aware of the real world around you, but you're still dreaming. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Chaining sg lists for big IO commands v5
On Fri, May 18 2007, Badari Pulavarty wrote: > On Fri, 2007-05-18 at 09:35 +0200, Jens Axboe wrote: > > On Thu, May 17 2007, Badari Pulavarty wrote: > > > On Thu, 2007-05-17 at 08:27 +0200, Jens Axboe wrote: > > > > On Wed, May 16 2007, Badari Pulavarty wrote: > > > > > On Tue, 2007-05-15 at 19:50 +0200, Jens Axboe wrote: > > > > > > On Tue, May 15 2007, Badari Pulavarty wrote: > > > > > > > On Tue, 2007-05-15 at 19:20 +0200, Jens Axboe wrote: > > > > > > > > On Tue, May 15 2007, Badari Pulavarty wrote: > > > > > > > > > On Fri, 2007-05-11 at 15:51 +0200, Jens Axboe wrote: > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > Updated version of the patch - this time I'll just attach > > > > > > > > > > the patch > > > > > > > > > > file... > > > > > > > > > > > > > > > > > > Missing scatterlist.h inclusions.. > > > > > > > > > > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c: In function > > > > > > > > > ???sym_scatter???: > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:385: warning: implicit > > > > > > > > > declaration > > > > > > > > > of function ???for_each_sg??? > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:385: error: expected > > > > > > > > > ???;??? before ???{??? > > > > > > > > > token > > > > > > > > > drivers/scsi/sym53c8xx_2/sym_glue.c:375: warning: unused > > > > > > > > > variable ???tp??? > > > > > > > > > make[3]: *** [drivers/scsi/sym53c8xx_2/sym_glue.o] Error 1 > > > > > > > > > > > > > > > > > > > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c: In function > > > > > > > > > ???qla24xx_build_scsi_iocbs???: > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c:678: warning: implicit > > > > > > > > > declaration of > > > > > > > > > function ???for_each_sg??? > > > > > > > > > drivers/scsi/qla2xxx/qla_iocb.c:678: error: expected ???;??? > > > > > > > > > before ???{??? > > > > > > > > > token > > > > > > > > > > > > > > > > Thanks, will fix those. What arch? I tested it here. > > > > > > > > > > > > > > I am playing with them on ppc64. > > > > > > > > > > > > Ah ok, you need the updated patch series for ppc64 support. Builds > > > > > > fine > > > > > > here on ppc64. See the #sglist branch of the block repo: > > > > > > > > > > > > git://git.kernel.dk/data/git/linux-2.6-block.git > > > > > > > > > > > > I can mail you an updated patch, if you want. > > > > > > > > > > > > > > > Here is the whole panic stack.. > > > > > > > > Thanks will fix that up, the IDE part is totally untested. Can you try > > > > and backout this patch and see if it boots? > > > > > > I increased max_segments to 1024 on my qla2200 attached disks and > > > simple "dd" (direct read) resulted in following: > > > > > > elm3b29:/sys/block/sdd/queue # echo 1024 > max_segments > > > elm3b29:/sys/block/sdd/queue # cat max_hw_sectors_kb > max_sectors_kb > > > elm3b29:/mnt # dd iflag=direct if=./z of=/dev/null bs=512M > > > > > > Unable to handle kernel paging request at 1008 RIP: > > > [] __rmqueue+0x6f/0x120 > > > > Auch, that's a bug. I don't think the oom path has been tested yet, > > perhaps this is hitting it. > > > > Can you try with this debug patch, plus enable the slab debugging > > helpers (like poisoning)? > > > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > > index 7456992..a479d1e 100644 > > --- a/drivers/scsi/scsi_lib.c > > +++ b/drivers/scsi/scsi_lib.c > > @@ -793,6 +793,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd > > *cmd, gfp_t gfp_mask) > > return ret; > > enomem: > > if (ret) { > > + printk(KERN_ERR "scsi: failed to allocate sg table\n"); > > /* > > * Free entries chained off ret. Since we were trying to > > * allocate another sglist, we know that all entries are of > > > > Not much help. I get all kinds of weird panics.. This time I got (with > the above debug). > > general protection fault: [1] SMP > CPU 1 > Modules linked in: jfs sg sd_mod qla2xxx firmware_class > scsi_transport_fc scsi_mod vfat fat ipv6 thermal processor fan button > battery ac dm_mod floppy parport_pc lp parport > Pid: 56, comm: kblockd/1 Not tainted 2.6.22-rc1-sg #8 > RIP: 0010:[] [] kmem_cache_alloc > +0x36/0x70 > RSP: 0018:81017abbfc10 EFLAGS: 00010002 > RAX: RBX: 0082 RCX: 0664 > RDX: 81019ff2b8a0 RSI: 00011220 RDI: 8068d120 > RBP: 81017abbfc20 R08: 39f8 R09: > R10: 81019cbee700 R11: 0188 R12: 8101df2a64e0 > R13: 00011220 R14: 8101df2a6510 R15: 81017abbfc50 > FS: 2b505b027f20() GS:81018021f300() > knlGS:f7da26b0 > CS: 0010 DS: 0018 ES: 0018 CR0: 8005003b > CR2: 2b505b029008 CR3: 00019af73000 CR4: 06e0 > Process kblockd/1 (pid: 56, threadinfo 81017abbe000, task > 81017a571440) > Stack: 7abbfc30 81017abbfc30 > 8025d001 > 810
Re: [PATCH] lockdep: lock contention tracking
* Bill Huey <[EMAIL PROTECTED]> wrote: > On Sun, May 20, 2007 at 12:30:26PM +0200, Peter Zijlstra wrote: > > The 4 points are the first 4 unique callsites that cause lock contention > > for the specified lock class. > > > > writing a 0 to /proc/lockdep_contentions clears the stats > > We should talk about unifying it with my lockstat work for -rt so that > we have a comprehensive solution for the "world". But you know that > already :) To me it appears Peter's stuff is already a pretty complete solution on its own, and it's a whole lot simpler (and less duplicative) than your lockstat patch. Could you list the specific items/features that you think Peter's stuff doesnt have? Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: bug in 2.6.22-rc2: loop mount limited to one single iso image
On 5/19/07, Ray Lee <[EMAIL PROTECTED]> wrote: Yeah, that's the only one left. I was hoping it wasn't that one, as it claimed to have been tested extensively. Guess it wasn't tested with udev. Ken? Ball's in your court. As the patch isn't providing a killer feature for 2.6.22, I'd suggest just reverting it for now until the issues are ironed out. The real solution is to have the user space tool to create these device nodes in advance. The original loop patch was coded such that when we open a loop device N, the immediate adjacent device "N + 1" is created. This will keep "mount -o loop" happy because it typically does a linear scan to find a free device. This might be somewhat hackary, but certainly will be backward compatible before user space solution is deployed. However, the code was removed by Al in this commit: commit 07002e995638b83a6987180f43722a0eb39d4932 Author: Al Viro <[EMAIL PROTECTED]> Date: Sat May 12 16:23:15 2007 -0400 fix the dynamic allocation and probe in loop.c Signed-off-by: Al Viro <[EMAIL PROTECTED]> Acked-by: Ken Chen <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] lockdep: lock contention tracking
On Sun, May 20, 2007 at 12:30:26PM +0200, Peter Zijlstra wrote: > The 4 points are the first 4 unique callsites that cause lock contention > for the specified lock class. > > writing a 0 to /proc/lockdep_contentions clears the stats We should talk about unifying it with my lockstat work for -rt so that we have a comprehensive solution for the "world". But you know that already :) Unifying lock initializer hash key initialization functions is a key first step to that. Keep in mind, we can do more with this mechanism than just kernel locks and we should probably keep that open and not code into a corner. bill - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: system call implementation for x86_64
On Sat, 19 May 2007 04:55:12 -0700 kernel coder wrote: > hi, > > I'm trying to implement a system call for x86_64. Mine processor is > dual core opetron.There is very little material on web for > implementing system calls for x86_64 processor for 2.6 series kernel.I > tried to implement a new system call by observing the existing > implementation but to no success.Following are files names and changes > made. Your example is very CPU-independent, i.e., not x86_64-specific, so following examples of recently-added syscalls should be good enough. I used your "patch" below (with a few small modifications) on 2.6.22-rc2 and it worked fine. Linux unicorn 2.6.22-rc2 #2 SMP Sun May 20 22:22:36 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux ... [ 98.369454] new system call > // > file-> include/asm-x86_64/unistd.h > > #define __NR_newcall273 > __SYSCALL(__NR_newcall, sys_newcall) > > #define __NR_syscall_max __NR_newcall syscall_max is no longer used. > > // > file-> include/linux/syscalls.h > > asmlinkage unsigned long sys_newcall(char __user *buf); not unsigned. > > / > file--> fs/read_write.c > > asmlinkage unsigned long sys_newcall(char __user * buf){ not unsigned. > > printk("new system call \n"); > ret 0; return 0; > } > > EXPORT_SYMBOL_GPL(sys_write) EXPORT_SYMBOL_GPL(sys_newcall); > Please let me know where i'm doing wrong .Following is program which > is calling mine system call > > > #include > #include > #include #include > #include > > long int ret; >int num = 243; > char buffer=[20]; eh? does not compile. > > int main() { > > > asm ("syscall;" >: "=a" (ret) >: "0" (num), > "D" (buffer), > ); I just used the syscall() glibc interface instead of asm: ret = syscall(__NR_newcall); > return ret; > } > > When i call this ,nothing gets printed in file /var/log/messages.Am i > missing something ? Mostly typos... > Actually i wana pass a pointer to kernel from user space.Later on data > will be copied to that memory location .i am thinking of using > copy_to_user for copying data.Buffer passed through system call will > be used by kernel function as circular ring.And portions of this ring > will get updated frequently even after system call has returned. > > Is there any better way to do this? Sounds mostly OK to me. Where are the ring head, tail, size, etc. maintained? --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc1-mm1
Hi, Could you put printf's in the setup code (especially arch/i386/boot/main.c) to see how far it runs before it dies? -hpa I add some debug info to main.c, the result is that the kernel stopped in query_edd(); Then I use kernel argument edd=off, the kernel booted happilly. I will read the edd.c to see what happened. do you have some suggestion? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6][TAKE4] fallocate system call
On Fri, 2007-05-18 at 23:44 -0700, Andrew Morton wrote: > On Thu, 17 May 2007 19:41:15 +0530 "Amit K. Arora" <[EMAIL PROTECTED]> wrote: > > > fallocate() is a new system call being proposed here which will allow > > applications to preallocate space to any file(s) in a file system. > > I merged the first three patches into -mm, thanks. > > All the system call numbers got changed due to recent additions. They > may change in the future, too - nothing is stable until the code lands > in mainline. > In case you haven't realize it, the ia64 fallocate() patch comes with Amit's takes 4 fallocate patch series (3/6) missing one line change, thus fail to compile on ia64. Here is the updated one. Patch tested on ia64. (compile and fsx) fallocate() on ia64 ia64 fallocate syscall support. Signed-Off-By: Dave Chinner <[EMAIL PROTECTED]> --- arch/ia64/kernel/entry.S |1 + include/asm-ia64/unistd.h |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.22-rc1/arch/ia64/kernel/entry.S === --- linux-2.6.22-rc1.orig/arch/ia64/kernel/entry.S 2007-05-18 16:30:16.0 -0700 +++ linux-2.6.22-rc1/arch/ia64/kernel/entry.S 2007-05-18 16:32:45.0 -0700 @@ -1585,5 +1585,6 @@ data8 sys_getcpu data8 sys_epoll_pwait // 1305 data8 sys_utimensat + data8 sys_fallocate .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls Index: linux-2.6.22-rc1/include/asm-ia64/unistd.h === --- linux-2.6.22-rc1.orig/include/asm-ia64/unistd.h 2007-05-18 16:30:16.0 -0700 +++ linux-2.6.22-rc1/include/asm-ia64/unistd.h 2007-05-18 17:34:58.0 -0700 @@ -296,11 +296,12 @@ #define __NR_getcpu1304 #define __NR_epoll_pwait 1305 #define __NR_utimensat 1306 +#define __NR_fallocate 1307 #ifdef __KERNEL__ -#define NR_syscalls283 /* length of syscall table */ +#define NR_syscalls285 /* length of syscall table */ #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND > I didn't merge any of the ext4 changes as they appear to be in Ted's > devel tree. Although I didn't check that they are 100% the same in > that tree. > Since both Amit and Ted are traveling, I will jump in... Most likely it's not the same one. What in Ted's devel tree is "takes 2" patches. I have incorporated takes 4 patches in the backing ext4 patch git tree here: http://repo.or.cz/w/ext4-patch-queue.git I have tested these patch series on ia64,ppc64,x86 and x86_64. I am not sure if Ted got a chance to update his ext4 git tree from this patch queue git tree yet. > What's the plan to get some ext4 updates into mainline, btw? Things > seem to be rather gradual. Last time Ted and I discussed we all agree fallocate patches should go into mainline. Actually most patches marked before the "unstable patches" can get into mainline, especially the following patches (contains a few bug fixes patches) # New patch to fix whitespace before applying new patches whitespace.patch #New patch to remove unnecessary exported symbols ext4_remove_exported_symbles.patch # New patch to add mount option to turn off extents ext4_noextent_mount_opt.patch # Now Turn on extents feature by default ext4_extents_on_by_default.patch #New patch to propagate inode flags ext4-propagate_flags.patch #New patch to add extent sanity checks ext4-extent-sanity-checks.patch #New patch to free blocks when failed to insert an extent ext4-free-blocks-on-insert-extent-failure.patch We already missed rc-1 window, but if possible, I would like to see ext4 fallocate patches and above patches in mainline 2.6.22. The nanosecond timestamp patch is probably good to go also. Regards, Mingming > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3]x86_64: early_printk for early debug port support
add early dbgp to early_printk. kernel command line: earlyprintk=dbgp or earlyprintk=dbgp1 Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]> Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]> diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 56eaa25..f90a5ff 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -3,9 +3,19 @@ #include #include #include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#define EARLY_PRINTK +#include "../../../drivers/usb/host/ehci.h" + /* Simple VGA output */ @@ -155,6 +165,582 @@ static struct console early_serial_console = { .index = -1, }; + +static struct ehci_caps __iomem *ehci_caps; +static struct ehci_regs __iomem *ehci_regs; +static struct ehci_dbg_port __iomem *ehci_debug; +static unsigned dbgp_endpoint_out; + +#define USB_DEBUG_DEVNUM 127 + +#define DBGP_DATA_TOGGLE 0x8800 +#define DBGP_PID_UPDATE(x, tok) \ + x) ^ DBGP_DATA_TOGGLE) & 0x00) | ((tok) & 0xff)) + +#define DBGP_LEN_UPDATE(x, len) (((x) & ~0x0f) | ((len) & 0x0f)) +/* + * USB Packet IDs (PIDs) + */ + +/* token */ +#define USB_PID_OUT 0xe1 +#define USB_PID_IN 0x69 +#define USB_PID_SOF 0xa5 +#define USB_PID_SETUP 0x2d +/* handshake */ +#define USB_PID_ACK 0xd2 +#define USB_PID_NAK 0x5a +#define USB_PID_STALL 0x1e +#define USB_PID_NYET 0x96 +/* data */ +#define USB_PID_DATA0 0xc3 +#define USB_PID_DATA1 0x4b +#define USB_PID_DATA2 0x87 +#define USB_PID_MDATA 0x0f +/* Special */ +#define USB_PID_PREAMBLE 0x3c +#define USB_PID_ERR 0x3c +#define USB_PID_SPLIT 0x78 +#define USB_PID_PING 0xb4 +#define USB_PID_UNDEF_0 0xf0 + +#define USB_PID_DATA_TOGGLE 0x88 +#define DBGP_CLAIM (DBGP_OWNER | DBGP_ENABLED | DBGP_INUSE) + +#define PCI_CAP_ID_EHCI_DEBUG 0xa + +#define HUB_ROOT_RESET_TIME 50 /* times are in msec */ +#define HUB_SHORT_RESET_TIME 10 +#define HUB_LONG_RESET_TIME 200 +#define HUB_RESET_TIMEOUT 500 + +#define DBGP_MAX_PACKET 8 + +static int dbgp_wait_until_complete(void) +{ + unsigned ctrl; + int loop = 0x10; + do { + ctrl = readl(&ehci_debug->control); + /* Stop when the transaction is finished */ + if (ctrl & DBGP_DONE) + break; + } while (--loop > 0); + + if (!loop) return -1; + + /* Now that we have observed the completed transaction, + * clear the done bit. + */ + writel(ctrl | DBGP_DONE, &ehci_debug->control); + return (ctrl & DBGP_ERROR) ? -DBGP_ERRCODE(ctrl) : DBGP_LEN(ctrl); +} + +static void dbgp_mdelay(int ms) +{ + int i; + while (ms--) { + for (i = 0; i < 1000; i++) + outb(0x1, 0x80); + } +} + +static void dbgp_breath(void) +{ + /* Sleep to give the debug port a chance to breathe */ +} + +static int dbgp_wait_until_done(unsigned ctrl) +{ + unsigned pids, lpid; + int ret; + + int loop = 3; +retry: + writel(ctrl | DBGP_GO, &ehci_debug->control); + ret = dbgp_wait_until_complete(); + pids = readl(&ehci_debug->pids); + lpid = DBGP_PID_GET(pids); + + if (ret < 0) + return ret; + + /* If the port is getting full or it has dropped data + * start pacing ourselves, not necessary but it's friendly. + */ + if ((lpid == USB_PID_NAK) || (lpid == USB_PID_NYET)) + dbgp_breath(); + + /* If I get a NACK reissue the transmission */ + if (lpid == USB_PID_NAK) { + if(--loop > 0) goto retry; + } + + return ret; +} + +static void dbgp_set_data(const void *buf, int size) +{ + const unsigned char *bytes = buf; + unsigned lo, hi; + int i; + lo = hi = 0; + for (i = 0; i < 4 && i < size; i++) + lo |= bytes[i] << (8*i); + for (; i < 8 && i < size; i++) + hi |= bytes[i] << (8*(i - 4)); + writel(lo, &ehci_debug->data03); + writel(hi, &ehci_debug->data47); +} + +static void dbgp_get_data(void *buf, int size) +{ + unsigned char *bytes = buf; + unsigned lo, hi; + int i; + lo = readl(&ehci_debug->data03); + hi = readl(&ehci_debug->data47); + for (i = 0; i < 4 && i < size; i++) + bytes[i] = (lo >> (8*i)) & 0xff; + for (; i < 8 && i < size; i++) + bytes[i] = (hi >> (8*(i - 4))) & 0xff; +} + +static int dbgp_bulk_write(unsigned devnum, unsigned endpoint, const char *bytes, int size) +{ + unsigned pids, addr, ctrl; + int ret; + if (size > DBGP_MAX_PACKET) + return -1; + + addr = DBGP_EPADDR(devnum, endpoint); + + pids = readl(&ehci_debug->pids); + pids = DBGP_PID_UPDATE(pids, USB_PID_OUT); + + ctrl = readl(&ehci_debug->control); + ctrl = DBGP_LEN_UPDATE(ctrl, size); + ctrl |= DBGP_OUT; + ctrl |= DBGP_GO; + + dbgp_set_data(bytes, size); + writel(addr, &ehci_debug->address); + writel(pids, &ehci_debug->pids); + + ret = dbgp_wait_until_done(ctrl); + if (ret < 0) { + return ret; + } + return ret; +} + +static int dbgp_bulk_read(unsigned devnum, unsigned endpoint, void *data, int size) +{ + unsigned pids, addr, ctrl; + int ret; + + if (size > DBGP_MAX_PACKET) + return -1; + + addr = DBGP_EPADDR(devnum, endpoint); + + pids = readl(&ehci_debug->pids); + pids = DBGP_PID_UPDATE(pids, USB_PID_IN); + + ctrl = readl(&ehci_debug->control)
Re: [realtime kernel 2.6.21-rt2 and up] Extremely slow bootup for x86_64
On Mon, 2007-05-21 at 00:00 -0500, Frank Sorenson wrote: > I see the slow bootup as well, even with 2.6.22-rc2-hrt1. It takes at > least 5 times as long to boot, for X to start, to login, etc. Can you provide me your .config and a boot log (please enable CONFIG_PRINTK_TIME and add "apic=verbose" to the kernel command line). Can you also try with "hpet=disable" ? tglx - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3]x86_64: early init pgt for fix virtual addr in head.S
early init pgt for fix virtual addr in head.S, so can use set_fixmap before setup_arch. otherwise set_fixmap_nocache will not work for x86_64 Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]> Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]> diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 1fab487..2da30ad 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -73,7 +73,11 @@ startup_64: addq %rbp, init_level4_pgt + (511*8)(%rip) addq %rbp, level3_ident_pgt + 0(%rip) + addq %rbp, level3_kernel_pgt + (510*8)(%rip) + addq %rbp, level3_kernel_pgt + (511*8)(%rip) + + addq %rbp, level2_fixmap_pgt + (506*8)(%rip) /* Add an Identity mapping if I am above 1G */ leaq _text(%rip), %rdi @@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt) .fill 510,8,0 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE - .fill 1,8,0 + .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE + +NEXT_PAGE(level2_fixmap_pgt) + .fill 506,8,0 + .quad level1_fixmap_pgt - __START_KERNEL_map + _KERNPG_TABLE + /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */ + .fill 5,8,0 + +NEXT_PAGE(level1_fixmap_pgt) + .fill 512,8,0 NEXT_PAGE(level2_ident_pgt) /* Since I easily can, map the first 1G.
[PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
early init pgt for fix virtual addr in head.S, so can use set_fixmap before setup_arch. otherwise set_fixmap_nocache will not work for i386 Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]> Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]> diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index f74dfc4..2d37850 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20); .section .init.text,"ax",@progbits #endif + /* Do an early initialization of the fixmap area */ + movl $(swapper_pg_dir - __PAGE_OFFSET), %edx + movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax + addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ + movl %eax, 4092(%edx) + #ifdef CONFIG_SMP ENTRY(startup_32_smp) cld @@ -507,6 +513,8 @@ ENTRY(_stext) .section ".bss.page_aligned","w" ENTRY(swapper_pg_dir) .fill 1024,4,0 +ENTRY(swapper_pg_pmd) + .fill 1024,4,0 ENTRY(empty_zero_page) .fill 4096,1,0
[PATCH 0/3]x86: USB debug port early_printk support
early_printk support on x86 platform the patch was started by Eric, and I used it in LinuxBIOS, and added some timeout etc. also make it consistent to latest tree about relocated kernel feature. include three part 1. x86_64: early init pgt for fix virtual addr in head.S, so can use set_fixmap before setup_arch. 2. i386: early init pgt for fix virtual addr in head.S, so can use set_fixmap before setup_arch. 3. changes in early_printk for early debug port support. It could be good material for 2.6.23. We may need 1 for earlycon support for mmio type 8250 to use fix virtual address. YH - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sun, 20 May 2007 22:05:00 -0700 (PDT) Davide Libenzi <[EMAIL PROTECTED]> wrote: > On Sun, 20 May 2007, Andrew Morton wrote: > > > > I think it fits the rule "buffer must be big enough for at least one > > > sigingo". > > > We use the special return 0; as indicator that the process we were > > > monitoring signals, detached the sighand. > > > > > > > hm. Kernel violates proper read() semantics in many places. Looks like we > > just did it again. > > I think we can have the check that "if size == 0 return 0". The above > cited return-0-on-detch would still apply for enough sized buffers. So: > > 1) size == 0, return 0 (POSIX wants this) > > 2) size < sizeof(signalfd_siginfo), return EINVAL > > 3) size >= sizeof(signalfd_siginfo) && DETACH, return 0 > > The signalfd falls into what POSIX defined as "special file", and can > return a lower-than-size result. > hm, well. I'd suggest that we do what makes most sense, rather than warping things to try to obey the letter of posix. > > > Unless we just remove the __clear_user() altogether. Who said that "Unused > > memebers should be zero"? > > Because it is a typically used value for still-unused/reserved members? > Better than random values I think ;) > Members validity is driven by si_code & SI_MASK anyway. Sure. And it'd be a bit rude to return 128 from the read() but to only have written to a few bytes of the user's memory. otoh, only-writing-a-few-bytes will be usefully quicker than zapping the whole 128b, particularly on small-cacheline CPUs. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc2 built on ppc (3)
On Sun, May 20, 2007 at 05:49:06PM +0200, Elimar Riesebieter wrote: >On Sun, 20 May 2007 the mental interface of >WANG Cong told: > >> On Sun, May 20, 2007 at 01:11:13PM +0200, Elimar Riesebieter wrote: >> >Hi, >> > >> >FYI, building the kernel with >> >gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7) >> >on my powerbook (PPC) gives: >> > >> >... >> >fs/partitions/check.c: In function 'add_partition': >> >fs/partitions/check.c:392: warning: ignoring return value of 'kobject_add', >> >declared with attribute warn_unused_result >> >fs/partitions/check.c:395: warning: ignoring return value of >> >'sysfs_create_link', declared with attribute warn_unused_result >> >fs/partitions/check.c:403: warning: ignoring return value of >> >'sysfs_create_file', declared with attribute warn_unused_result >> >... >> > >> >If more info is needed, please contact me via PM, as I am not >> >subscribed. >> > >> >Thanks for your patience >> >Elimar >> > >> >> I don't know why these warnings are still in kernel. We have fixed them yet. >> Could you please check and try this patch? >> >> http://marc.info/?l=linux-mm-commits&m=11762433536&w=2 > > CC fs/partitions/check.o >fs/partitions/check.c: In function 'add_partition': >fs/partitions/check.c:398: error: 'struct kset' has no member named 'kset' >make[2]: *** [fs/partitions/check.o] Error 1 >^make[1]: *** [fs/partitions] Error 2 > >Elimar > Oh, bad. I think something about struct kset has changed since we made this patch. Thanks for your try. And could you pleae try this? - if (sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem")) + if (sysfs_create_link(&p->kobj, &block_subsys.kobj, "subsystem")) If that cann't help you, please ask Andrew for the corresponding patch, I believe it is still in Andrew's tree. Thanks again! Regards! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sun, 20 May 2007, Andrew Morton wrote: > > I think it fits the rule "buffer must be big enough for at least one > > sigingo". > > We use the special return 0; as indicator that the process we were > > monitoring signals, detached the sighand. > > > > hm. Kernel violates proper read() semantics in many places. Looks like we > just did it again. I think we can have the check that "if size == 0 return 0". The above cited return-0-on-detch would still apply for enough sized buffers. So: 1) size == 0, return 0 (POSIX wants this) 2) size < sizeof(signalfd_siginfo), return EINVAL 3) size >= sizeof(signalfd_siginfo) && DETACH, return 0 The signalfd falls into what POSIX defined as "special file", and can return a lower-than-size result. > Unless we just remove the __clear_user() altogether. Who said that "Unused > memebers should be zero"? Because it is a typically used value for still-unused/reserved members? Better than random values I think ;) Members validity is driven by si_code & SI_MASK anyway. - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [realtime kernel 2.6.21-rt2 and up] Extremely slow bootup for x86_64
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Gleixner wrote: > On Sun, 2007-05-20 at 14:25 +0200, Maarten Maathuis wrote: >> When i try to boot a kernel higher than 2.6.21-rt1, it boots very >> slowly. It takes minutes to even detect two cdrom players. I noticed >> in the changelog: >> >> - x86/64 high-res timers and dynticks update (Thomas Gleixner) >> >> I included the .config from 2.6.21-rt1, which i ran make oldconfig on. >> >> I cannot provide any other information, since i estimate it will take >> ages to bootup. > > Does the same problem show up with > > http://tglx.de/projects/hrtimers/2.6.22-rc2/linux-2.6.22-rc2-x86_64-highres-v1.patch > > tglx I see the slow bootup as well, even with 2.6.22-rc2-hrt1. It takes at least 5 times as long to boot, for X to start, to login, etc. Frank - -- Frank Sorenson - KD7TZK Linux Systems Engineer, DSS Engineering, UBS AG [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGUSd4aI0dwg4A47wRAog8AJ9QkOlDEweqxeLxC3Bx7C5TQbMbjACfeM6k pDJzhXJYwoH39CzIYy3eAnw= =qNW6 -END PGP SIGNATURE- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc1-mm1
young dave wrote: > Hi, > > I tried the vga option , and the selection menu appeared, then I > select 0(80x25) and nothing happened. > OK. Could you put printf's in the setup code (especially arch/i386/boot/main.c) to see how far it runs before it dies? -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] sysfs: fix race condition around sd->s_dentry, take#2
On Thu, May 17, 2007 at 08:16:10PM +0200, Tejun Heo wrote: > Allowing attribute and symlink dentries to be reclaimed means > sd->s_dentry can change dynamically. However, updates to the field > are unsynchronized leading to race conditions. This patch adds > sysfs_lock and use it to synchronize updates to sd->s_dentry. > > Due to the locking around ->d_iput, the check in sysfs_drop_dentry() > is complex. sysfs_lock only protect sd->s_dentry pointer itself. The > validity of the dentry is protected by dcache_lock, so whether dentry > is alive or not can only be tested while holding both locks. > > This is minimal backport of sysfs_drop_dentry() rewrite in devel > branch. > > DONT APPLY JUST YET Looks ok to me.. I have tested it it but unfortunately I couldn't recreate the race without the patch also. It would be helpful if people actually seeing the race, provide the test results. Greg, please merge this one once we have some test results. Regards, Maneesh > --- > Moving sysfs_drop_dentry() and sysfs_put() calls out of mutex isn't > necessary, so this is the minimal one but there shouldn't be > any difference functionality-wise. > > fs/sysfs/dir.c | 22 -- > fs/sysfs/inode.c | 18 +- > fs/sysfs/sysfs.h |1 + > 3 files changed, 38 insertions(+), 3 deletions(-) > > Index: work/fs/sysfs/dir.c > === > --- work.orig/fs/sysfs/dir.c > +++ work/fs/sysfs/dir.c > @@ -13,14 +13,26 @@ > #include "sysfs.h" > > DECLARE_RWSEM(sysfs_rename_sem); > +spinlock_t sysfs_lock = SPIN_LOCK_UNLOCKED; > > static void sysfs_d_iput(struct dentry * dentry, struct inode * inode) > { > struct sysfs_dirent * sd = dentry->d_fsdata; > > if (sd) { > - BUG_ON(sd->s_dentry != dentry); > - sd->s_dentry = NULL; > + /* sd->s_dentry is protected with sysfs_lock. This > + * allows sysfs_drop_dentry() to dereference it. > + */ > + spin_lock(&sysfs_lock); > + > + /* The dentry might have been deleted or another > + * lookup could have happened updating sd->s_dentry to > + * point the new dentry. Ignore if it isn't pointing > + * to this dentry. > + */ > + if (sd->s_dentry == dentry) > + sd->s_dentry = NULL; > + spin_unlock(&sysfs_lock); > sysfs_put(sd); > } > iput(inode); > @@ -238,7 +250,10 @@ static int sysfs_attach_attr(struct sysf > } > > dentry->d_fsdata = sysfs_get(sd); > + /* protect sd->s_dentry against sysfs_d_iput */ > + spin_lock(&sysfs_lock); > sd->s_dentry = dentry; > + spin_unlock(&sysfs_lock); > error = sysfs_create(dentry, (attr->mode & S_IALLUGO) | S_IFREG, init); > if (error) { > sysfs_put(sd); > @@ -260,7 +275,10 @@ static int sysfs_attach_link(struct sysf > int err = 0; > > dentry->d_fsdata = sysfs_get(sd); > + /* protect sd->s_dentry against sysfs_d_iput */ > + spin_lock(&sysfs_lock); > sd->s_dentry = dentry; > + spin_unlock(&sysfs_lock); > err = sysfs_create(dentry, S_IFLNK|S_IRWXUGO, init_symlink); > if (!err) { > dentry->d_op = &sysfs_dentry_ops; > Index: work/fs/sysfs/inode.c > === > --- work.orig/fs/sysfs/inode.c > +++ work/fs/sysfs/inode.c > @@ -244,9 +244,23 @@ static inline void orphan_all_buffers(st > */ > void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) > { > - struct dentry * dentry = sd->s_dentry; > + struct dentry *dentry = NULL; > struct inode *inode; > > + /* We're not holding a reference to ->s_dentry dentry but the > + * field will stay valid as long as sysfs_lock is held. > + */ > + spin_lock(&sysfs_lock); > + spin_lock(&dcache_lock); > + > + /* dget dentry if it's still alive */ > + if (sd->s_dentry && sd->s_dentry->d_inode) > + dentry = dget_locked(sd->s_dentry); > + > + spin_unlock(&dcache_lock); > + spin_unlock(&sysfs_lock); > + > + /* drop dentry */ > if (dentry) { > spin_lock(&dcache_lock); > spin_lock(&dentry->d_lock); > @@ -266,6 +280,8 @@ void sysfs_drop_dentry(struct sysfs_dire > spin_unlock(&dentry->d_lock); > spin_unlock(&dcache_lock); > } > + > + dput(dentry); > } > } > > Index: work/fs/sysfs/sysfs.h > === > --- work.orig/fs/sysfs/sysfs.h > +++ work/fs/sysfs/sysfs.h > @@ -32,6 +32,7 @@ extern const unsigned char * sysfs_get_n > extern void sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry > *parent); > extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); > > +extern spinlock_t sys
Re: 2.6.22-rc1-mm1
Hi, I tried the vga option , and the selection menu appeared, then I select 0(80x25) and nothing happened. 2007/5/21, H. Peter Anvin <[EMAIL PROTECTED]>: young dave wrote: > Hi, > My cpu is Intel(R) Pentium(R) D CPU 2.80GHz, below are the lspci > output and kernel Could you please try booting with "vga=ask", and see if you get the video mode selection menu? -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [2.6.22-rc1-mm1] section mismatch.
On Mon, May 21, 2007 at 07:01:48AM +0400, Dan Kruchinin wrote: > Hi. > > Section mismatch: > -- > WARNING: init/built-in.o - Section mismatch: reference to .init.text: > from .text between 'rest_init' (at offset 0x11e) and 'try_name' > WARNING: arch/i386/mach-generic/built-in.o - Section mismatch: reference > to .init.text: from .data between 'apic_bigsmp' (at offset 0xc4) and > 'cpu.5773' > WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference > to .init.text:amd_init_mtrr from .text between 'mtrr_bp_init' (at offset > 0xe3ea) and 'ipi_handler' > WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference > to .init.text:cyrix_init_mtrr from .text between 'mtrr_bp_init' (at > offset 0xe3ef) and 'ipi_handler' > WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference > to .init.text:centaur_init_mtrr from .text between 'mtrr_bp_init' (at > offset 0xe3f4) and 'ipi_handler' > -- Patches for all these are queued up for next -mm. But thank you for reporting anyway. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall
On Sun, 20 May 2007 21:29:20 -0700 "Yinghai Lu" <[EMAIL PROTECTED]> wrote: > On 5/20/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > I'll queue this up for some testing, but I'd be a bit reluctant to send it > > into Linus due to my poor understanding of what it actually does. What > > _is_ an early console, and how does it differ from a non-early one? > > > > Someone help, please. > > > > Coudl you please provide a patch against > > Documentation/kernel-parameters.txt as well? > > > the story: > Bjorn refer to andi's early_printk to create one early_uart. it took > console=uart,io,0x3f8,9600n8 > or console=uart,mem,0xfxxx,115200n8. > and it is called via console_init. --- it is not really early uart for > platform other than ia64. > ia64 call early_serial_console_init explicitly, so it is some early. > but it needs to late_initcall to do console switch. > > Gerd's patch (console handover) was merged into mainline. it will > switch from early_printk to normal console in register_console via > CON_BOOT flags.. ===> only for x86 > > I produced one patch to change early_uart calling from console_init to > early_param. So to make early_uart to real early_uart for all other > platform in addition to ia64. > it will take > earlycon=uart,io,0x3f8,9600n8 console=ttyS0,9600n8 > > but Bjorn said that don't let the customer to key two times about > console command line. > Then come this patch. will take > earlycon=uart,io,0x3f8,9600n8 > and it will switch to console ttyS0 automatically. by calling > add_preferred_console. > > Still need Bjorn to: > 1. remove early_serial_console_init call in ia64 setup_arch. > 2. verify mem io 8250 compatiable card. > > for 2, in x86 platform we need to use fix_to_virt and fix map to give > it one fixed virtual address. == like Eric did for usb debug port > console. > > I will send out another in email about updated early dbgp console with > current tree. hm, OK. I hope you guys have it under control ;) With http://userweb.kernel.org/~akpm/config-vmm.txt I get drivers/built-in.o:(.data+0x5790): undefined reference to `serial8250_find_port_for_earlycon' - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Factor out common MODULE_INFO content from module*.h files.
> > under the circumstances, is there *any* cleanup worth doing WRT to > this issue? because of the fact that module.h currently includes > moduleparam.h, developers have been able to get away with being > incredibly sloppy in their includes. It is wortwhile to make module.h independent of moduleparam.h. The MODULE_INFO stuff has nothing to do with module parameters. But keep the include so you do not break the > 500 drivers. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc1-mm1
young dave wrote: > Hi, > My cpu is Intel(R) Pentium(R) D CPU 2.80GHz, below are the lspci > output and kernel Could you please try booting with "vga=ask", and see if you get the video mode selection menu? -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -stable] sysfs: disable reclamation by default
On Thu, May 17, 2007 at 07:49:31PM +0200, Tejun Heo wrote: > Maneesh Soni wrote: > > On Thu, May 17, 2007 at 05:04:23AM -0700, Greg KH wrote: > >> On Wed, May 16, 2007 at 08:31:00PM +0200, Tejun Heo wrote: > >>> sd->s_dentry updates made by dentry/inode reclamation are racy and can > >>> lead to BUG() or oops. This is already fixed in -mm and the fix is > >>> scheduled to be merged into upstream for 2.6.23 but the fix > >>> reimplements sysfs dentry dropping and is too risky for -stable > >>> kernels. > >>> > > > > But was the synchronization fix tested by people facing the race? I still > > don't understand the racy code path. The last google problem I saw had > > s_dentry field as NULL. > > Please take a look at the following message. > > http://article.gmane.org/gmane.linux.kernel/521729 > > I could reproduce both races on my test machine fairly reliable with > parallel find, cat, mount/mount while repeatedly ins/rmmoding a libata > driver. > Thanks for the pointer.. earlier it got buried in the fat rework.. > >>> This is an interim solution for -stable kernels. sysfs reclamation is > >>> disabled by default and can be enabled by using sysfs.enable_reclaim > >>> kernel parameter. Note that dentries are still created on demand, so > >>> attribute and symlinks nodes aren't allocated on creation. They're > >>> allocated on first lookup and deallocated when the sysfs node is > >>> removed. > >> Ick, this is going to kill memory on big boxes (s390 and others) and I > >> don't really want to apply this it if at all possible. > >> > > At least not make it default. This might create boot issues with these > > boxes. > > Which makes oopsing the default. Fun! :-) > but.. avoid oops by not booting at all is more fun !! ;-) > >> Maneesh, any other thoughts? > >> > > I actually wanted to investigate this oops but left it considering the > > rework being done by Tejun. If this still make sense we can have some > > more debug code stuffed there or get a crashdump (kdump) to get better > > understanding of the race. > > The above message contains analysis of both races. I just ported the > fixes. I have a different test machine now and can't reproduce the > races with this one yet so I couldn't verify whether the patches > actually fix the problem. I'll post the patches anyway. If anyone can > reproduce these races, please verify the posted patches fix the problem. > I would prefer fixing the race instead of making attributes non-reclaimable. Thanks Maneesh -- Maneesh Soni Linux Technology Center, IBM India Systems and Technology Lab, Bangalore, India - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()
On Thu, May 17, 2007 at 07:52:53PM +0200, Tejun Heo wrote: > The condition check doesn't make much sense as it basically always > succeeds. This causes NULL dereferencing on certain cases. It seems > that parentheses are put in the wrong place. Fix it. > > DON'T APPLY JUST YET > --- > > Maneesh, is this correct? > Yes. > fs/sysfs/inode.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: work/fs/sysfs/inode.c > === > --- work.orig/fs/sysfs/inode.c > +++ work/fs/sysfs/inode.c > @@ -250,7 +250,7 @@ void sysfs_drop_dentry(struct sysfs_dire > if (dentry) { > spin_lock(&dcache_lock); > spin_lock(&dentry->d_lock); > - if (!(d_unhashed(dentry) && dentry->d_inode)) { > + if (!d_unhashed(dentry) && dentry->d_inode) { > inode = dentry->d_inode; > spin_lock(&inode->i_lock); > __iget(inode); Ack'ed Thanks Maneesh -- Maneesh Soni Linux Technology Center, IBM India Systems and Technology Lab, Bangalore, India - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall
On 5/20/07, Andrew Morton <[EMAIL PROTECTED]> wrote: I'll queue this up for some testing, but I'd be a bit reluctant to send it into Linus due to my poor understanding of what it actually does. What _is_ an early console, and how does it differ from a non-early one? Someone help, please. Coudl you please provide a patch against Documentation/kernel-parameters.txt as well? the story: Bjorn refer to andi's early_printk to create one early_uart. it took console=uart,io,0x3f8,9600n8 or console=uart,mem,0xfxxx,115200n8. and it is called via console_init. --- it is not really early uart for platform other than ia64. ia64 call early_serial_console_init explicitly, so it is some early. but it needs to late_initcall to do console switch. Gerd's patch (console handover) was merged into mainline. it will switch from early_printk to normal console in register_console via CON_BOOT flags.. ===> only for x86 I produced one patch to change early_uart calling from console_init to early_param. So to make early_uart to real early_uart for all other platform in addition to ia64. it will take earlycon=uart,io,0x3f8,9600n8 console=ttyS0,9600n8 but Bjorn said that don't let the customer to key two times about console command line. Then come this patch. will take earlycon=uart,io,0x3f8,9600n8 and it will switch to console ttyS0 automatically. by calling add_preferred_console. Still need Bjorn to: 1. remove early_serial_console_init call in ia64 setup_arch. 2. verify mem io 8250 compatiable card. for 2, in x86 platform we need to use fix_to_virt and fix map to give it one fixed virtual address. == like Eric did for usb debug port console. I will send out another in email about updated early dbgp console with current tree. YH - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sun, 20 May 2007 21:14:38 -0700 (PDT) Davide Libenzi <[EMAIL PROTECTED]> wrote: > On Sun, 20 May 2007, Andrew Morton wrote: > > > If 'count' is not a multiple of sizeof(struct signalfd_siginfo)), the read() > > will return the next smallest multiple of `count'. > > > > That is, unless `count' happens to be less than 1*sizeof(struct > > signalfd_siginfo)), in which case we return -EINVAL. > > > > This seems inconsistent. > > I think it fits the rule "buffer must be big enough for at least one sigingo". > We use the special return 0; as indicator that the process we were > monitoring signals, detached the sighand. > hm. Kernel violates proper read() semantics in many places. Looks like we just did it again. > > > Also, I'm desperately hunting for the place where we zero out that local > > siginfo_t, and I ain't finding it. Someone please convince me that we're > > not leaking bits of kernel memory out to userspace in that thing. > > Hmm, __clear_user()? oic, yes, that thing. Usually we'd zero out the on-stack struct, assemble it then copy out the whole thing. I guess doing it the way you have saves a few instructions. But it's the cache hit against *uinfo which will have most of the cost, and we can't do anything about that. Unless we just remove the __clear_user() altogether. Who said that "Unused memebers should be zero"? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sun, 20 May 2007, Davide Libenzi wrote: > I think it fits the rule "buffer must be big enough for at least one sigingo". ^^^ /me wonders what sizeof(sigingo) is :) - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] i2o: fix notifiers when max_drivers is configured
On Sun, 20 May 2007 23:27:28 +0900 Akinobu Mita <[EMAIL PROTECTED]> wrote: > Maxinum number of I2O drivers which could be registered is > configurable by max_drivers module parameter. > > But the module parameter is ignored and default value (I2O_MAX_DRIVERS = 8) > is used in the loops to notify all registered drivers. > > Cc: Markus Lidel <[EMAIL PROTECTED]> > Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]> > > --- > drivers/message/i2o/driver.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > Index: 2.6-mm/drivers/message/i2o/driver.c > === > --- 2.6-mm.orig/drivers/message/i2o/driver.c > +++ 2.6-mm/drivers/message/i2o/driver.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include "core.h" > > #define OSM_NAME "i2o" > @@ -260,7 +261,7 @@ void i2o_driver_notify_controller_add_al > int i; > struct i2o_driver *drv; > > - for (i = 0; i < I2O_MAX_DRIVERS; i++) { > + for (i = 0; i < i2o_max_drivers; i++) { > drv = i2o_drivers[i]; > > if (drv) > @@ -280,7 +281,7 @@ void i2o_driver_notify_controller_remove > int i; > struct i2o_driver *drv; > > - for (i = 0; i < I2O_MAX_DRIVERS; i++) { > + for (i = 0; i < i2o_max_drivers; i++) { > drv = i2o_drivers[i]; > > if (drv) > @@ -299,7 +300,7 @@ void i2o_driver_notify_device_add_all(st > int i; > struct i2o_driver *drv; > > - for (i = 0; i < I2O_MAX_DRIVERS; i++) { > + for (i = 0; i < i2o_max_drivers; i++) { > drv = i2o_drivers[i]; > > if (drv) > @@ -318,7 +319,7 @@ void i2o_driver_notify_device_remove_all > int i; > struct i2o_driver *drv; > > - for (i = 0; i < I2O_MAX_DRIVERS; i++) { > + for (i = 0; i < i2o_max_drivers; i++) { > drv = i2o_drivers[i]; > > if (drv) > @@ -340,8 +341,7 @@ int __init i2o_driver_init(void) > spin_lock_init(&i2o_drivers_lock); > > if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64) || > - ((i2o_max_drivers ^ (i2o_max_drivers - 1)) != > - (2 * i2o_max_drivers - 1))) { > + !is_power_of_2(i2o_max_drivers)) { > osm_warn("max_drivers set to %d, but must be >=2 and <= 64 and " >"a power of 2\n", i2o_max_drivers); > i2o_max_drivers = I2O_MAX_DRIVERS; > @@ -349,7 +349,7 @@ int __init i2o_driver_init(void) > osm_info("max drivers = %d\n", i2o_max_drivers); > > i2o_drivers = > - kzalloc(i2o_max_drivers * sizeof(*i2o_drivers), GFP_KERNEL); > + kcalloc(i2o_max_drivers, sizeof(*i2o_drivers), GFP_KERNEL); > if (!i2o_drivers) > return -ENOMEM; > Is there any particular reason why i2o_max_drivers must be a power of two? It seems a peculiar constraint. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: joydev.c and saitek cyborg evo force
On Friday 18 May 2007 09:54, Renato Golin wrote: > Hi, > > I'm a kernel newbie so please, pardon my French. > > I have a Saitek Cyborg Evo Force, a very good joystick with force- > feedback. Problem is, on Windows it works well (its drivers know its > own idiosyncrasies) but on Linux it gets a bit fuzzy. > > The behaviour is that, all axis are working fine, except up/down > (elevator) and left/right (aileron) that gives me "random" > signed/unsigned values. > > A smaller problem is that it's reporting 8 axis but have 6 only and 13 > buttons but have only 12 and the 12th button is always pressed, > messing fgjs setup utility. > > Digging drivers/input/joydev.c I found out that if I remove the > correction (setting > JS_CORR_NONE) the values come correct, in a range from 0 to 4096. > > Problem is, on joydev_connect, when defining the corrections for every > axis, the joystick is reporting dev->absmax = 127 and dev->absmin = > -127 for both axis 0 and 1, so the correction is based on a signed > range when the joystick is actually sending an unsigned range. > > Also, because the module was expecting up to 127 on value and is getting > 4094, when the correction does a left shift it might be setting the > signal bit (leftmost) and that could explain why I'm getting random > signed/unsigned values. > > The only way to know what is the real range is when you're actually > pushing and pulling the stick so the change I'm willing to make is to > recalibrate (ie. redefine the correction) whenever the raw value goes > off limits. But that would only extend 127 to 4096 but won't change -127 > to 0. > > Another alternative is to do a dynamic calibration whenever you move the > stick from the beginning and not do it based on what the joystick is > telling you to (ie. at connect time). But that might be a lot of useless > work when the control gives you the correct range in the first place. > > At last, hardcoding "if (saitek)" is quite ugly but can be done for the > sake of performance. > I think we need to make HID driver to report real range for Saitek. Jiri, any ideas? -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sun, 20 May 2007, Andrew Morton wrote: > If 'count' is not a multiple of sizeof(struct signalfd_siginfo)), the read() > will return the next smallest multiple of `count'. > > That is, unless `count' happens to be less than 1*sizeof(struct > signalfd_siginfo)), in which case we return -EINVAL. > > This seems inconsistent. I think it fits the rule "buffer must be big enough for at least one sigingo". We use the special return 0; as indicator that the process we were monitoring signals, detached the sighand. > Also, I'm desperately hunting for the place where we zero out that local > siginfo_t, and I ain't finding it. Someone please convince me that we're > not leaking bits of kernel memory out to userspace in that thing. Hmm, __clear_user()? - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] signalfd: retrieve multiple signals with one read() call
On Sat, 19 May 2007 21:07:11 -0300 Davi Arnaut <[EMAIL PROTECTED]> wrote: > Hi, > > Gathering signals in bulk enables server applications to drain a signal > queue (almost full of realtime signals) more efficiently by reducing the > syscall and file look-up overhead. > > Very similar to the sigtimedwait4() call described by Niels Provos, > Chuck Lever, and Stephen Tweedie in a paper entitled "Analyzing the > Overload Behavior of a Simple Web Server". The paper lists more details > and advantages. > static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct signalfd_ctx *ctx = file->private_data; struct signalfd_siginfo __user *siginfo; int nonblock = file->f_flags & O_NONBLOCK; ssize_t ret, total = 0; siginfo_t info; count /= sizeof(struct signalfd_siginfo); if (!count) return -EINVAL; siginfo = (struct signalfd_siginfo __user *) buf; do { ret = signalfd_dequeue(ctx, &info, nonblock); if (unlikely(ret <= 0)) break; ret = signalfd_copyinfo(siginfo, &info); if (ret < 0) break; siginfo++; total += ret; nonblock = 1; } while (--count); return total ? total : ret; } If 'count' is not a multiple of sizeof(struct signalfd_siginfo)), the read() will return the next smallest multiple of `count'. That is, unless `count' happens to be less than 1*sizeof(struct signalfd_siginfo)), in which case we return -EINVAL. This seems inconsistent. Also, I'm desperately hunting for the place where we zero out that local siginfo_t, and I ain't finding it. Someone please convince me that we're not leaking bits of kernel memory out to userspace in that thing. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc1-mm1 [cannot change thermal trip points]
On Saturday 19 May 2007 15:56, Thomas Renninger wrote: > On Thu, 2007-05-17 at 15:17 -0400, Len Brown wrote: > > On Thursday 17 May 2007 05:23, Pavel Machek wrote: > > > > > > ACPI: thermal trip points are read-only > > > > > > What was the rationale? Can we get this one reverted? > > > > > > Some machines (HP omnibook xe3) have broken trip points -- too high -- > > > so machine will overheat and trigger hw shutdown before starting > > > passive cooling. > > > > > > That's really broken, and write to trip points is reasonable way to > > > 'fix' that. (I'd understand if you only ever let trip points to > > > decrease... but otoh root should be able to shoot himself) > > > > No, writing trip-points is neither a fix, nor it is reasonable. > > It is a workaround at best, and it is a dangerous and mis-leading hack. > Yes it is a workaround for critical ACPI bugs like that or similar: > https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/22336 Thanks for pointing that out -- it is a great example of how powerful mis-information can be. The fact that the trip-points are writable has obscured, rather than clarified, the actual causes of the failures. No less than 4 people in that bug report declared that cleaning the dust out of their fan fixed the root cause. A bunch more said that the issues went away when they stopped using ubuntu's user-space power save daemon. There are a couple more with broken active fan control -- which also gets obscured rather than clarified by over-riding trip points. And finally, there are probably some with clean fans that are working properly, but are thermally challenged systems. I'll venture that Windows is NOT modifying or disabling the critical trip point to work around this issue. I'll venture that their thermal throttling is working and ours may not be. perhaps it was the recently fixed mod_timer() bug in thermal.c, or perhaps it is one that we don't know about yet... > It's also convenient to e.g. lower passive trip point to avoid fan > noise. nope, the OS can't reliably override the processor passive trip point. That is what _SCP and cooling_mode are for. The reason is that the BIOS can send us a trip-point changed event at any time, the kernel will evaluate _PSV, and wipe out the modified OS version. if you want to change the state of the fans, then poke /proc/acpi/fan/ directly. This will have effect until the next trip point changes its state. > Some people are used to it, I already wanted to write a little userspace > prog to use them as it is really easy to fake cooling_mode (trip points > are modified by BIOS) and eliminate fan noise and other things by e.g. > reducing passsive or whatever trip point. please save this effort for a non-ACPI system. > This is at least a major sysfs interface change, has this been discussed > somewhere before or declared deprecated? it went out on linux-acpi, but I don't recall any discussion about it. > It's there for a long time, why is this "a dangerous and mis-leading > hack." now? It has been dangerous and misleading since the day it went in. If the user doesn't enable polling, then they are effectively writing random numbers that have absolutely no effect on the operation of the system, and hiding the numbers that do control the operation of the system. > I'd suggest to revert this and I can come with something like "only > allow lower values > than BIOS provides" patch if the current implementation is considered > dangerous. That simply will not address the issue. Indeed, all the entries in the ubuntu bug report are about hitting the critical temperature and having a critical shutdown when it isn't wanted. These people want to RAISE the critical shutdown trip-point. Their cooling problems must be fixed -- raising critical trip points causes them instead to be ignored. For folks with the reverse problem -- active cooling where the fans kick in early than they'd like, they should just turn off the fans via /proc/acpi/fan and not mess with the trip points at all. If they make a mistake, they will be forgiven when the system reaches the next trip point and turns the fan back on. thanks, -Len > > The OS has no capability to actually change the ACPI trip points > > that are used by the BIOS. Changing the OS copy of them > > to make the user think that trip events will actually > > happen when the temperature crosses the OS copy is crazy. > > > > If there are systems with broken thermals and the > > ACPI thermal control needs and over-ride to turn > > on the fan, then that is fine -- but using > > fake trip-points and giving the user the impression > > that they are real is not viable. > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)
On Sat, 19 May 2007 12:33:04 +0200 (MEST) Andrea Righi <[EMAIL PROTECTED]> wrote: > Bernd Eckenfels wrote: > > In article <[EMAIL PROTECTED]> you wrote: > >>printk("%s/%d: potentially unexpected fatal signal %d.\n", > >>current->comm, current->pid, signr); > > > > can we have both KERN_WARNING please? > > > > Gruss > > Bernd > > Depends on print_fatal_signals patch. > > --- > > Limit the rate of print_fatal_signal() to avoid potential denial-of-service > attacks. > > Signed-off-by: Andrea Righi <[EMAIL PROTECTED]> > > diff -urpN linux-2.6.22-rc1-mm1/kernel/signal.c > linux-2.6.22-rc1-mm1-vm-log-enomem/kernel/signal.c > --- linux-2.6.22-rc1-mm1/kernel/signal.c 2007-05-19 11:25:24.0 > +0200 > +++ linux-2.6.22-rc1-mm1-vm-log-enomem/kernel/signal.c2007-05-19 > 11:30:00.0 +0200 > @@ -790,7 +790,10 @@ static void print_vmas(void) > > static void print_fatal_signal(struct pt_regs *regs, int signr) > { > - printk("%s/%d: potentially unexpected fatal signal %d.\n", > + if (unlikely(!printk_ratelimit())) > + return; > + > + printk(KERN_WARNING "%s/%d: potentially unexpected fatal signal %d.\n", > current->comm, current->pid, signr); > > #ifdef __i386__ Well OK. But vdso-print-fatal-signals.patch is designated not-for-mainline anyway. I think the DoS which you identify has been available for a very long time on ia64, x86_64 and perhaps others. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] log out-of-virtual-memory events (was: [RFC] log out-of-virtual-memory events)
On Sat, 19 May 2007 12:34:01 +0200 (MEST) Andrea Righi <[EMAIL PROTECTED]> wrote: > Print informations about userspace processes that fail to allocate new virtual > memory. Why is this useful? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall
On Fri, 18 May 2007 19:00:16 -0700 Yinghai Lu <[EMAIL PROTECTED]> wrote: > [PATCH]serial: make early_uart to use early_prarm instead of console_initcall > > Make early_uart to use early_param, so uart console can be used earlier. > Make it to be bootconsole with CON_BOOT flag, so can use console handover > feature. and it will switch to corresponding normal serial console > automatically. > new command line will be > > earlycon=uart,io,0x3f8,9600n8 > earlycon=uart,io,0x3f8,9600n8 console=tty0 > > it will print in very early stage > Early serial console at I/O port 0x3f8 (options '9600n8') > later for console it will print > console handover: boot [uart0] -> real [ttyS0] I'll queue this up for some testing, but I'd be a bit reluctant to send it into Linus due to my poor understanding of what it actually does. What _is_ an early console, and how does it differ from a non-early one? Someone help, please. Coudl you please provide a patch against Documentation/kernel-parameters.txt as well? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: kconfig - scan all Kconfig files
On Mon, 21 May 2007 03:43:45 +0200 (CEST) Roman Zippel wrote: > Hi, > > On Sun, 20 May 2007, Sam Ravnborg wrote: > > > I did a quick hack so kconfig could scan all Kconfig files > > in the kernel tree. > > By scanning all Kconfig files we gain the following: > > > > -> kconfig can report when a depends on refer to an undefined symbol > > -> kconfig can report when a select refer to an undefined symbol > > > > Later we can push a lot of common stuff to the top-level Kconfig file. > > And that may in the end result in a better structure overall for > > Kconfig files. > > Well, some of that stuff should already happen earlier (and included from > the arch Kconfig files), but that doesn't work for everything. > I don't think that simply allowing to parse a file multiple times is the > right answer, as it duplicates a lot of data. A simple example would be > help texts, right now they are per symbol, but they should really be per > menu, so archs can provide different help texts for something. > "source" should become a bit more intelligent and parse a file only once > and link the data into the menu structure. > > > All the "choice values currently only support a single prompt" are caused > > by using the same config symbol in a choice list for several architectures. > > That will be the biggest challenge to fix before we can introduce this > > patch. > > Maybe we can extend kconfig to accept it??? > > Define "accept". > The basic rule for choice values must not be violated - none of them may > depend on another value in the same group. The dependency tree allows for > no loops, these choice groups allow for the only exception, but it has to > stay within that group. > One option I'm thinking about is to extend that group by naming the choice > option, so kconfig knows they are related. This won't work for everything, > so quite some renaming may be needed. how about something that I mentioned a few days ago (in another mail thread): Make this work: (-ENOPATCH) if S390 include "some s390-specific Kconfig file" endif and if ARCH!=S390, don't read that file. Actually it should be any kconfig-language statements inside the if-block /methinks. I understand that *conf treats all kconfig symbols as variable, but ARCH=blah isn't really variable after it has been set. --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Race free attributes in sysfs
On Sunday 20 May 2007 07:01, Pierre Ossman wrote: > Hi Greg, > > I'm reworking the sysfs stuff in the MMC layer to be a bit more flexible, but > there is one thing that has me baffled; how do you add attributes to an object > in a race free manner when you have a dynamic set of attributes. > > I've looked at other parts of the kernel and they all use: > > 1. Add object. > 2. Add attributes. > > To me, it seems like there's a window between 1 and 2 where the object is in > /sys but doesn't have the proper attributes. Life for user space gets very > annoying if it has to add artificial delays to avoid this window. > > So how do I do this properly? Something like this would, from my point of > view, > be the sane method: > > 1. Add hidden object. > 2. Add attributes. > 3. Show object. > 1. dev->uevent_suppress = 1; 2. device_register(dev); 3. device_create_file(dev, ...); 4. dev->uevent_suppress = 0; 5. kobject_uevent(&dev->kobj, KOBJ_ADD); -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic: rmmod/0x00000001/4568
Hello, with gregkh-usb-usb-ehci-cpufreq-fix.patch removing ehci-hcd causes the following BUG: [ 459.800033] BUG: scheduling while atomic: rmmod/0x0001/4568 [ 459.800045] [] dump_trace+0x63/0x1ec [ 459.800055] [] show_trace_log_lvl+0x1a/0x30 [ 459.800066] [] show_trace+0x12/0x14 [ 459.800099] [] dump_stack+0x16/0x18 [ 459.800135] [] __sched_text_start+0x56/0x7db [ 459.800142] [] wait_for_completion+0x65/0x9b [ 459.800147] [] synchronize_rcu+0x2d/0x33 [ 459.800154] [] synchronize_srcu+0x23/0x5f [ 459.800160] [] srcu_notifier_chain_unregister+0x43/0x4d [ 459.800185] [] cpufreq_unregister_notifier+0x22/0x32 [ 459.800203] [] ehci_stop+0x4f/0xb7 [ehci_hcd] [ 459.800248] [] usb_remove_hcd+0x97/0xd7 [usbcore] [ 459.800280] [] usb_hcd_pci_remove+0x18/0x6a [usbcore] [ 459.800317] [] pci_device_remove+0x1c/0x3d [ 459.800324] [] __device_release_driver+0x74/0x90 [ 459.800332] [] driver_detach+0x81/0xc2 [ 459.800337] [] bus_remove_driver+0x5d/0x7c [ 459.800342] [] driver_unregister+0xb/0xd [ 459.800347] [] pci_unregister_driver+0x13/0x65 [ 459.800351] [] ehci_hcd_cleanup+0x10/0x12 [ehci_hcd] [ 459.800360] [] sys_delete_module+0x187/0x1ae [ 459.800367] [] sysenter_past_esp+0x5f/0x85 [ 459.800373] [] 0xe410 [ 459.800384] === static void ehci_stop (struct usb_hcd *hcd) { ... spin_lock_irq(&ehci->lock); if (HC_IS_RUNNING (hcd->state)) ehci_quiesce (ehci); #ifdef CONFIG_CPU_FREQ cpufreq_unregister_notifier(&ehci->cpufreq_transition, CPUFREQ_TRANSITION_NOTIFIER); #endif -- mattia :wq! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] fix compiler warning in dd.c
This patch had been suggested by Indan Zupancic on May 13 but is not in 2.6.22-rc2 so I'm re-sending it. Prior to Indan's e-mail, I had sent the same patch to the kernel janitors list. I don't care whether you credit the patch to me or Indan. Denver -- Forwarded message -- From: Denver Gingerich <[EMAIL PROTECTED]> Date: May 9, 2007 9:29 PM Subject: [PATCH] fix compiler warning in dd.c To: [EMAIL PROTECTED] Correct the following compiler warning: warning: 'device_probe_drivers' defined but not used Verified that there are no device_probe_drivers() calls in the kernel tree. Signed-off-by: Denver Gingerich <[EMAIL PROTECTED]> --- --- linux-2.6.21/drivers/base/dd.c.000 2007-05-09 18:56:24.0 -0400 +++ linux-2.6.21/drivers/base/dd.c 2007-05-09 20:38:12.0 -0400 @@ -207,19 +207,6 @@ static int __device_attach(struct device return driver_probe_device(drv, dev); } -static int device_probe_drivers(void *data) -{ - struct device *dev = data; - int ret = 0; - - if (dev->bus) { - down(&dev->sem); - ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); - up(&dev->sem); - } - return ret; -} - /** * device_attach - try to attach device to a driver. * @dev: device. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] fix compiler warnings in acorn.c
-- Forwarded message -- From: Denver Gingerich <[EMAIL PROTECTED]> Date: May 9, 2007 9:22 PM Subject: [PATCH] fix compiler warnings in acorn.c To: [EMAIL PROTECTED] Correct the following compiler warnings: warning: 'adfs_partition' defined but not used warning: 'riscix_partition' defined but not used warning: 'linux_partition' defined but not used Signed-off-by: Denver Gingerich <[EMAIL PROTECTED]> --- --- linux-2.6.21/fs/partitions/acorn.c.000 2007-05-09 18:56:41.0 -0400 +++ linux-2.6.21/fs/partitions/acorn.c 2007-05-09 20:44:04.0 -0400 @@ -25,6 +25,8 @@ #define PARTITION_RISCIX_SCSI 2 #define PARTITION_LINUX9 +#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \ + defined(CONFIG_ACORN_PARTITION_ADFS) static struct adfs_discrecord * adfs_partition(struct parsed_partitions *state, char *name, char *data, unsigned long first_sector, int slot) @@ -48,6 +50,7 @@ adfs_partition(struct parsed_partitions put_partition(state, slot, first_sector, nr_sects); return dr; } +#endif #ifdef CONFIG_ACORN_PARTITION_RISCIX @@ -65,6 +68,8 @@ struct riscix_record { struct riscix_part part[8]; }; +#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \ + defined(CONFIG_ACORN_PARTITION_ADFS) static int riscix_partition(struct parsed_partitions *state, struct block_device *bdev, unsigned long first_sect, int slot, unsigned long nr_sects) @@ -105,6 +110,7 @@ riscix_partition(struct parsed_partition return slot; } #endif +#endif #define LINUX_NATIVE_MAGIC 0xdeafa1de #define LINUX_SWAP_MAGIC 0xdeafab1e @@ -115,6 +121,8 @@ struct linux_part { __le32 nr_sects; }; +#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \ + defined(CONFIG_ACORN_PARTITION_ADFS) static int linux_partition(struct parsed_partitions *state, struct block_device *bdev, unsigned long first_sect, int slot, unsigned long nr_sects) @@ -146,6 +154,7 @@ linux_partition(struct parsed_partitions put_dev_sector(sect); return slot; } +#endif #ifdef CONFIG_ACORN_PARTITION_CUMANA int - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] fix compiler warning in fixed.c
-- Forwarded message -- From: Denver Gingerich <[EMAIL PROTECTED]> Date: May 9, 2007 9:26 PM Subject: [PATCH] fix compiler warning in fixed.c To: [EMAIL PROTECTED] Correct the following compiler warning (and warnings resulting from the correction): warning: 'fixed_mdio_register_device' defined but not used Signed-off-by: Denver Gingerich <[EMAIL PROTECTED]> --- --- linux-2.6.21/drivers/net/phy/fixed.c.0002007-05-09 18:56:33.0 -0400 +++ linux-2.6.21/drivers/net/phy/fixed.c2007-05-09 21:07:35.0 -0400 @@ -89,6 +89,7 @@ EXPORT_SYMBOL(fixed_mdio_set_link_update /*- * This is used for updating internal mii regs from the status *-*/ +#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) static int fixed_mdio_update_regs(struct fixed_info *fixed) { u16 *regs = fixed->regs; @@ -165,6 +166,7 @@ static int fixed_mii_reset(struct mii_bu /*nothing here - no way/need to reset it*/ return 0; } +#endif static int fixed_config_aneg(struct phy_device *phydev) { @@ -194,6 +196,7 @@ static struct phy_driver fixed_mdio_driv * number is used to create multiple fixed PHYs, so that several devices can * utilize them simultaneously. *-*/ +#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) static int fixed_mdio_register_device(int number, int speed, int duplex) { struct mii_bus *new_bus; @@ -301,6 +304,7 @@ device_create_fail: return err; } +#endif MODULE_DESCRIPTION("Fixed PHY device & driver for PAL"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [2.6.22-rc1-mm1] vaio laptop (SZ72B) immediately resumes after STR
On Sun, May 20, 2007 at 06:22:23PM -0700, David Brownell wrote: > On Sunday 20 May 2007, Mattia Dongili wrote: > > > > $ cat /proc/acpi/wakeup > > Device S-state Status Sysfs node > > PWRB S4*enabled > > S1F0 S4 disabled > > S1F1 S4 disabled > > S1F2 S4 disabled > > S1F3 S4 disabled > > S1F4 S4 disabled > > S1F5 S4 disabled > > S1F6 S4 disabled > > S1F7 S4 disabled > > TLAN S3 disabled pci::07:00.0 > > DLAN S3 disabled > > S6F0 S4 disabled > > S6F1 S4 disabled > > S6F2 S4 disabled > > S6F3 S4 disabled > > S6F4 S4 disabled > > S6F5 S4 disabled > > S6F6 S4 disabled > > S6F7 S4 disabled > > USB1 S3 disabled pci::00:1d.0 > > USB2 S3 disabled pci::00:1d.1 > > USB3 S3 disabled pci::00:1d.2 > > USB4 S3 disabled pci::00:1d.3 > > USB7 S3 disabled pci::00:1d.7 > > SLT0 S4 disabled > > LANC S3 disabled > > EC0 S5 disabled > > That's strangely busy ... what ARE all those devices? :) the S[16]F* are tons of acpi devices... don't know what they are, they are attached to the PCI-E port 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02) if you're interested the DSDT is here: http://www.linux.it/~malattia/sony-laptop/DSDT.sz72b.type3.dsl > But only the PCI ones -- or certain devices connected to USB > root hubs -- could be affected by that patch. > > So another experiment you could do, if you want faster info > than "git bisect" can provide, is building drivers for those > PCI devices as modules (ehci-hcd, uhci-hcd, sky2) and then > finding which one causes the trouble by removing them before > STR. it's ehci-hcd! and apart from the fact that removing it causes a BUG in cpufreq no the system stays correctly asleep when suspended. ... > > > My suspicion, based on the dmesg and seeing what drivers actually > > > try to enable wakeup, would be the 'sky2' driver. The other two > > > > FWIW the sky2 is never functional upon resume, I need to ifdown, rmmod, > > modprobe and ifup again to get some networking... > > Try "rmmod sky2" *before* suspend, to see if that matters. > > Also "rmmod uhci-hcd", which will keep USB from doing anything > with that biometric thingie. > > I suspect one or the other of those will be the issue. very close :) -- mattia :wq! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC] linux-2.6.22-rc2. SLUB report[kzalloc(0)]
Hi. There is a BUG message from SLUB during boot process: -- May 21 05:39:10 midgard kernel: [ 31.177484] BUG: at include/linux/slub_def.h:77 kmalloc_index() May 21 05:39:10 midgard kernel: [ 31.178355] [] show_trace_log_lvl+0x1a/0x30 May 21 05:39:10 midgard kernel: [ 31.179263] [] show_trace +0x12/0x20 May 21 05:39:10 midgard kernel: [ 31.180177] [] dump_stack +0x16/0x20 May 21 05:39:10 midgard kernel: [ 31.181094] [] get_slab +0x1cd/0x260 May 21 05:39:10 midgard kernel: [ 31.182024] [] __kmalloc_track_caller+0x19/0xa0 May 21 05:39:10 midgard kernel: [ 31.183019] [] __kzalloc +0x19/0x50 May 21 05:39:10 midgard kernel: [ 31.184012] [] usb_get_configuration+0x9de/0x11c0 [usbcore] May 21 05:39:10 midgard kernel: [ 31.185115] [] usb_new_device+0x17/0x190 [usbcore] May 21 05:39:10 midgard kernel: [ 31.186181] [] hub_thread +0x79a/0xfd0 [usbcore] May 21 05:39:10 midgard kernel: [ 31.187185] [] kthread +0x42/0x70 May 21 05:39:10 midgard kernel: [ 31.188190] [] kernel_thread_helper+0x7/0x10 -- kzalloc(0, GFP_KERNEL) occurs in drivers/usb/core/config.c in usb_get_configuration function. I already wrote about this slub bug report and offered a patch(http://www.uwsg.iu.edu/hypermail/linux/kernel/0705.1/0154.html). I don't know, may be it is not major thing, if it is, just ignore it. I just think, that -- length = ncfg * sizeof(struct usb_host_config); dev->config = kzalloc(length, GFP_KERNEL); -- isn't clear, because ncfg - in my case - is 0 and I suppose, that size of the leastest slab cache can become(in future) smaller than sizeof(struct usb_host_config). Thanks for attention. -- Dan Kruchinin <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] documentation: Documentation/initrd.txt
Final clearification of the pivot_root mechanism, which brings this document really up-to-date. Signed-off-by: Domenico Andreoli <[EMAIL PROTECTED]> --- Documentation/initrd.txt | 74 - 1 files changed, 46 insertions(+), 28 deletions(-) diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt index 15f1b35..61e3111 100644 --- a/Documentation/initrd.txt +++ b/Documentation/initrd.txt @@ -27,16 +27,20 @@ When using initrd, the system typically boots as follows: 1) the boot loader loads the kernel and the initial RAM disk 2) the kernel converts initrd into a "normal" RAM disk and frees the memory used by initrd - 3) initrd is mounted read-write as root - 4) /linuxrc is executed (this can be any valid executable, including + 3) if the root device is not /dev/ram0, the old (deprecated) + change_root procedure is followed. see the "Obsolete root change + mechanism" section below. + 4) root device is mounted. if it is /dev/ram0, the initrd image is + then mounted as root + 5) /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything - init can do) - 5) linuxrc mounts the "real" root file system - 6) linuxrc places the root file system at the root directory using the + init can do). + 6) init mounts the "real" root file system + 7) init places the root file system at the root directory using the pivot_root system call - 7) the usual boot sequence (e.g. invocation of /sbin/init) is performed - on the root file system - 8) the initrd file system is removed + 8) init execs the /sbin/init on the new root filesystem, performing + the usual boot sequence + 9) the initrd file system is removed Note that changing the root directory does not involve unmounting it. It is therefore possible to leave processes running on initrd during that @@ -70,7 +74,7 @@ initrd adds the following new options: root=/dev/ram0 initrd is mounted as root, and the normal boot procedure is followed, -with the RAM disk still mounted as root. +with the RAM disk mounted as root. Compressed cpio images -- @@ -137,11 +141,11 @@ We'll describe the loopback device method: # mkdir /mnt/dev # mknod /mnt/dev/console c 5 1 5) copy all the files that are needed to properly use the initrd -environment. Don't forget the most important file, /linuxrc -Note that /linuxrc's permissions must include "x" (execute). +environment. Don't forget the most important file, /sbin/init +Note that /sbin/init's permissions must include "x" (execute). 6) correct operation the initrd environment can frequently be tested even without rebooting with the command -# chroot /mnt /linuxrc +# chroot /mnt /sbin/init This is of course limited to initrds that do not interfere with the general system state (e.g. by reconfiguring network interfaces, overwriting mounted devices, trying to start already running demons, @@ -154,7 +158,7 @@ We'll describe the loopback device method: # gzip -9 initrd For experimenting with initrd, you may want to take a rescue floppy and -only add a symbolic link from /linuxrc to /bin/sh. Alternatively, you +only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you can try the experimental newlib environment [2] to create a small initrd. @@ -163,15 +167,14 @@ boot loaders support initrd. Since the boot process is still compatible with an older mechanism, the following boot command line parameters have to be given: - root=/dev/ram0 init=/linuxrc rw + root=/dev/ram0 rw (rw is only necessary if writing to the initrd file system.) With LOADLIN, you simply execute LOADLIN initrd= -e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 - init=/linuxrc rw +e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 rw With LILO, you add the option INITRD= to either the global section or to the section of the respective kernel in /etc/lilo.conf, and pass @@ -179,7 +182,7 @@ the options using APPEND, e.g. image = /bzImage initrd = /boot/initrd.gz -append = "root=/dev/ram0 init=/linuxrc rw" +append = "root=/dev/ram0 rw" and run /sbin/lilo @@ -191,7 +194,7 @@ Now you can boot and enjoy using initrd. Changing the root device -When finished with its duties, linuxrc typically changes the root device +When finished with its duties, init typically changes the root device and proceeds with starting the Linux system on the "real" root device. The procedure involves the following steps: @@ -217,7 +220,7 @@ must exist before calling pivot_root. Example: # mkdir initrd # pivot_root . initrd -Now, the linuxrc process may still access the old root via its +Now, the init process may still access the old root via its executable, shared librar
Re: 2.6.22-rc2 built on ppc (2)
Hi, On Sun, 20 May 2007, Andrew Morton wrote: > On Sun, 20 May 2007 13:08:15 +0200 Elimar Riesebieter <[EMAIL PROTECTED]> > wrote: > > > FYI, building 2.6.22-rc2 with > > gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7) > > on my powerbook (PPC) gives: > > > > ... > > kernel/time/ntp.c: In function 'do_adjtimex': > > kernel/time/ntp.c:307: warning: comparison of distinct pointer types lacks > > a cast > > kernel/time/ntp.c:310: warning: comparison of distinct pointer types lacks > > a cast > > hm, do_div() is defined as operating on a u64, but ntp is passing it an s64 > and the asm-generic implementation of do_div() is warning about that. > > Fixing that would be simple but a bit ugly. The correct fix would be to clean up that API and provide a signed do_div(), so ntp doesn't have to work around for the lack of it. It's on my todo list for ages, but I haven't gotten to it yet. bye, Roman - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: kconfig - scan all Kconfig files
Hi, On Sun, 20 May 2007, Sam Ravnborg wrote: > I did a quick hack so kconfig could scan all Kconfig files > in the kernel tree. > By scanning all Kconfig files we gain the following: > > -> kconfig can report when a depends on refer to an undefined symbol > -> kconfig can report when a select refer to an undefined symbol > > Later we can push a lot of common stuff to the top-level Kconfig file. > And that may in the end result in a better structure overall for > Kconfig files. Well, some of that stuff should already happen earlier (and included from the arch Kconfig files), but that doesn't work for everything. I don't think that simply allowing to parse a file multiple times is the right answer, as it duplicates a lot of data. A simple example would be help texts, right now they are per symbol, but they should really be per menu, so archs can provide different help texts for something. "source" should become a bit more intelligent and parse a file only once and link the data into the menu structure. > All the "choice values currently only support a single prompt" are caused > by using the same config symbol in a choice list for several architectures. > That will be the biggest challenge to fix before we can introduce this patch. > Maybe we can extend kconfig to accept it??? Define "accept". The basic rule for choice values must not be violated - none of them may depend on another value in the same group. The dependency tree allows for no loops, these choice groups allow for the only exception, but it has to stay within that group. One option I'm thinking about is to extend that group by naming the choice option, so kconfig knows they are related. This won't work for everything, so quite some renaming may be needed. bye, Roman - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 007 of 7] md: Change bitmap_unplug and others to void functions.
bitmap_unplug only ever returns 0, so it may as well be void. Two callers try to print a message if it returns non-zero, but that message is already printed by bitmap_file_kick. write_page returns an error which is not consistently checked. It always causes BITMAP_WRITE_ERROR to be set on an error, and that can more conveniently be checked. When the return of write_page is checked, an error causes bitmap_file_kick to be called - so move that call into write_page - and protect against recursive calls into bitmap_file_kick. bitmap_update_sb returns an error that is never checked. So make these 'void' and be consistent about checking the bit. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> ### Diffstat output ./drivers/md/bitmap.c | 144 +- ./drivers/md/md.c |3 ./drivers/md/raid1.c |3 ./drivers/md/raid10.c |3 ./include/linux/raid/bitmap.h |6 - 5 files changed, 80 insertions(+), 79 deletions(-) diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c --- .prev/drivers/md/bitmap.c 2007-05-21 11:18:22.0 +1000 +++ ./drivers/md/bitmap.c 2007-05-21 11:18:23.0 +1000 @@ -305,10 +305,11 @@ static int write_sb_page(struct bitmap * return 0; } +static void bitmap_file_kick(struct bitmap *bitmap); /* * write out a page to a file */ -static int write_page(struct bitmap *bitmap, struct page *page, int wait) +static void write_page(struct bitmap *bitmap, struct page *page, int wait) { struct buffer_head *bh; @@ -316,27 +317,26 @@ static int write_page(struct bitmap *bit switch (write_sb_page(bitmap, page, wait)) { case -EINVAL: bitmap->flags |= BITMAP_WRITE_ERROR; - return -EIO; } - return 0; - } + } else { - bh = page_buffers(page); + bh = page_buffers(page); - while (bh && bh->b_blocknr) { - atomic_inc(&bitmap->pending_writes); - set_buffer_locked(bh); - set_buffer_mapped(bh); - submit_bh(WRITE, bh); - bh = bh->b_this_page; - } + while (bh && bh->b_blocknr) { + atomic_inc(&bitmap->pending_writes); + set_buffer_locked(bh); + set_buffer_mapped(bh); + submit_bh(WRITE, bh); + bh = bh->b_this_page; + } - if (wait) { - wait_event(bitmap->write_wait, - atomic_read(&bitmap->pending_writes)==0); - return (bitmap->flags & BITMAP_WRITE_ERROR) ? -EIO : 0; + if (wait) { + wait_event(bitmap->write_wait, + atomic_read(&bitmap->pending_writes)==0); + } } - return 0; + if (bitmap->flags & BITMAP_WRITE_ERROR) + bitmap_file_kick(bitmap); } static void end_bitmap_write(struct buffer_head *bh, int uptodate) @@ -456,17 +456,17 @@ out: */ /* update the event counter and sync the superblock to disk */ -int bitmap_update_sb(struct bitmap *bitmap) +void bitmap_update_sb(struct bitmap *bitmap) { bitmap_super_t *sb; unsigned long flags; if (!bitmap || !bitmap->mddev) /* no bitmap for this array */ - return 0; + return; spin_lock_irqsave(&bitmap->lock, flags); if (!bitmap->sb_page) { /* no superblock */ spin_unlock_irqrestore(&bitmap->lock, flags); - return 0; + return; } spin_unlock_irqrestore(&bitmap->lock, flags); sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); @@ -474,7 +474,7 @@ int bitmap_update_sb(struct bitmap *bitm if (!bitmap->mddev->degraded) sb->events_cleared = cpu_to_le64(bitmap->mddev->events); kunmap_atomic(sb, KM_USER0); - return write_page(bitmap, bitmap->sb_page, 1); + write_page(bitmap, bitmap->sb_page, 1); } /* print out the bitmap file superblock */ @@ -603,20 +603,22 @@ enum bitmap_mask_op { MASK_UNSET }; -/* record the state of the bitmap in the superblock */ -static void bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits, - enum bitmap_mask_op op) +/* record the state of the bitmap in the superblock. Return the old value */ +static int bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits, +enum bitmap_mask_op op) { bitmap_super_t *sb; unsigned long flags; + int old; spin_lock_irqsave(&bitmap->lock, flags); if (!bitmap->sb_page) { /* can't set the state */ spin_unlock_irqrestore(&bitmap->lock, flags); - return; + return 0; } spin_unlock_irqrest
[PATCH 005 of 7] md: Improve the is_mddev_idle test fix
Don't use 'unsigned' variable to track sync vs non-sync IO, as the only thing we want to do with them is a signed comparison, and fix up the comment which had become quite wrong. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> ### Diffstat output ./drivers/md/md.c | 35 ++- ./include/linux/raid/md_k.h |2 +- 2 files changed, 23 insertions(+), 14 deletions(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-05-21 11:17:57.0 +1000 +++ ./drivers/md/md.c 2007-05-21 11:18:00.0 +1000 @@ -5092,7 +5092,7 @@ static int is_mddev_idle(mddev_t *mddev) mdk_rdev_t * rdev; struct list_head *tmp; int idle; - unsigned long curr_events; + long curr_events; idle = 1; ITERATE_RDEV(mddev,rdev,tmp) { @@ -5100,20 +5100,29 @@ static int is_mddev_idle(mddev_t *mddev) curr_events = disk_stat_read(disk, sectors[0]) + disk_stat_read(disk, sectors[1]) - atomic_read(&disk->sync_io); - /* The difference between curr_events and last_events -* will be affected by any new non-sync IO (making -* curr_events bigger) and any difference in the amount of -* in-flight syncio (making current_events bigger or smaller) -* The amount in-flight is currently limited to -* 32*64K in raid1/10 and 256*PAGE_SIZE in raid5/6 -* which is at most 4096 sectors. -* These numbers are fairly fragile and should be made -* more robust, probably by enforcing the -* 'window size' that md_do_sync sort-of uses. + /* sync IO will cause sync_io to increase before the disk_stats +* as sync_io is counted when a request starts, and +* disk_stats is counted when it completes. +* So resync activity will cause curr_events to be smaller than +* when there was no such activity. +* non-sync IO will cause disk_stat to increase without +* increasing sync_io so curr_events will (eventually) +* be larger than it was before. Once it becomes +* substantially larger, the test below will cause +* the array to appear non-idle, and resync will slow +* down. +* If there is a lot of outstanding resync activity when +* we set last_event to curr_events, then all that activity +* completing might cause the array to appear non-idle +* and resync will be slowed down even though there might +* not have been non-resync activity. This will only +* happen once though. 'last_events' will soon reflect +* the state where there is little or no outstanding +* resync requests, and further resync activity will +* always make curr_events less than last_events. * -* Note: the following is an unsigned comparison. */ - if ((long)curr_events - (long)rdev->last_events > 4096) { + if (curr_events - rdev->last_events > 4096) { rdev->last_events = curr_events; idle = 0; } diff .prev/include/linux/raid/md_k.h ./include/linux/raid/md_k.h --- .prev/include/linux/raid/md_k.h 2007-05-21 11:17:57.0 +1000 +++ ./include/linux/raid/md_k.h 2007-05-21 11:18:00.0 +1000 @@ -51,7 +51,7 @@ struct mdk_rdev_s sector_t size; /* Device size (in blocks) */ mddev_t *mddev; /* RAID array if running */ - unsigned long last_events; /* IO event timestamp */ + long last_events; /* IO event timestamp */ struct block_device *bdev; /* block device handle */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 006 of 7] md: Check that internal bitmap does not overlap other data.
We current completely trust user-space to set up metadata describing an consistant array. In particlar, that the metadata, data, and bitmap do not overlap. But userspace can be buggy, and it is better to report an error than corrupt data. So put in some appropriate checks. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> ### Diffstat output ./drivers/md/bitmap.c | 35 +-- ./drivers/md/md.c | 22 +- 2 files changed, 54 insertions(+), 3 deletions(-) diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c --- .prev/drivers/md/bitmap.c 2007-05-21 11:17:57.0 +1000 +++ ./drivers/md/bitmap.c 2007-05-21 11:18:22.0 +1000 @@ -268,6 +268,31 @@ static int write_sb_page(struct bitmap * if (page->index == bitmap->file_pages-1) size = roundup(bitmap->last_page_size, bdev_hardsect_size(rdev->bdev)); + /* Just make sure we aren't corrupting data or +* metadata +*/ + if (bitmap->offset < 0) { + /* DATA BITMAP METADATA */ + if (bitmap->offset + + page->index * (PAGE_SIZE/512) + + size/512 > 0) + /* bitmap runs in to metadata */ + return -EINVAL; + if (rdev->data_offset + mddev->size*2 + > rdev->sb_offset*2 + bitmap->offset) + /* data runs in to bitmap */ + return -EINVAL; + } else if (rdev->sb_offset*2 < rdev->data_offset) { + /* METADATA BITMAP DATA */ + if (rdev->sb_offset*2 + + bitmap->offset + + page->index*(PAGE_SIZE/512) + size/512 + > rdev->data_offset) + /* bitmap runs in to data */ + return -EINVAL; + } else { + /* DATA METADATA BITMAP - no problems */ + } md_super_write(mddev, rdev, (rdev->sb_offset<<1) + bitmap->offset + page->index * (PAGE_SIZE/512), @@ -287,8 +312,14 @@ static int write_page(struct bitmap *bit { struct buffer_head *bh; - if (bitmap->file == NULL) - return write_sb_page(bitmap, page, wait); + if (bitmap->file == NULL) { + switch (write_sb_page(bitmap, page, wait)) { + case -EINVAL: + bitmap->flags |= BITMAP_WRITE_ERROR; + return -EIO; + } + return 0; + } bh = page_buffers(page); diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-05-21 11:18:00.0 +1000 +++ ./drivers/md/md.c 2007-05-21 11:18:22.0 +1000 @@ -3176,13 +3176,33 @@ static int do_md_run(mddev_t * mddev) * Drop all container device buffers, from now on * the only valid external interface is through the md * device. -* Also find largest hardsector size */ ITERATE_RDEV(mddev,rdev,tmp) { if (test_bit(Faulty, &rdev->flags)) continue; sync_blockdev(rdev->bdev); invalidate_bdev(rdev->bdev); + + /* perform some consistency tests on the device. +* We don't want the data to overlap the metadata, +* Internal Bitmap issues has handled elsewhere. +*/ + if (rdev->data_offset < rdev->sb_offset) { + if (mddev->size && + rdev->data_offset + mddev->size*2 + > rdev->sb_offset*2) { + printk("md: %s: data overlaps metadata\n", + mdname(mddev)); + return -EINVAL; + } + } else { + if (rdev->sb_offset*2 + rdev->sb_size/512 + > rdev->data_offset) { + printk("md: %s: metadata overlaps data\n", + mdname(mddev)); + return -EINVAL; + } + } } md_probe(mddev->unit, NULL, NULL); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.k
[PATCH 002 of 7] md: Don't write more than is required of the last page of a bitmap
It is possible that real data or metadata follows the bitmap without full page alignment. So limit the last write to be only the required number of bytes, rounded up to the hard sector size of the device. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] ### Diffstat output ./drivers/md/bitmap.c | 17 - ./include/linux/raid/bitmap.h |1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c --- .prev/drivers/md/bitmap.c 2007-05-18 11:49:18.0 +1000 +++ ./drivers/md/bitmap.c 2007-05-18 11:49:18.0 +1000 @@ -255,19 +255,25 @@ static struct page *read_sb_page(mddev_t } -static int write_sb_page(mddev_t *mddev, long offset, struct page *page, int wait) +static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) { mdk_rdev_t *rdev; struct list_head *tmp; + mddev_t *mddev = bitmap->mddev; ITERATE_RDEV(mddev, rdev, tmp) if (test_bit(In_sync, &rdev->flags) - && !test_bit(Faulty, &rdev->flags)) + && !test_bit(Faulty, &rdev->flags)) { + int size = PAGE_SIZE; + if (page->index == bitmap->file_pages-1) + size = roundup(bitmap->last_page_size, + bdev_hardsect_size(rdev->bdev)); md_super_write(mddev, rdev, - (rdev->sb_offset<<1) + offset + (rdev->sb_offset<<1) + bitmap->offset + page->index * (PAGE_SIZE/512), - PAGE_SIZE, + size, page); + } if (wait) md_super_wait(mddev); @@ -282,7 +288,7 @@ static int write_page(struct bitmap *bit struct buffer_head *bh; if (bitmap->file == NULL) - return write_sb_page(bitmap->mddev, bitmap->offset, page, wait); + return write_sb_page(bitmap, page, wait); bh = page_buffers(page); @@ -923,6 +929,7 @@ static int bitmap_init_from_disk(struct } bitmap->filemap[bitmap->file_pages++] = page; + bitmap->last_page_size = count; } paddr = kmap_atomic(page, KM_USER0); if (bitmap->flags & BITMAP_HOSTENDIAN) diff .prev/include/linux/raid/bitmap.h ./include/linux/raid/bitmap.h --- .prev/include/linux/raid/bitmap.h 2007-05-18 11:49:18.0 +1000 +++ ./include/linux/raid/bitmap.h 2007-05-18 11:49:18.0 +1000 @@ -232,6 +232,7 @@ struct bitmap { struct page **filemap; /* list of cache pages for the file */ unsigned long *filemap_attr; /* attributes associated w/ filemap pages */ unsigned long file_pages; /* number of pages in the file */ + int last_page_size; /* bytes in the last page */ unsigned long flags; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 003 of 7] md: Fix bug with linear hot-add and elsewhere.
Adding a drive to a linear array seems to have stopped working, due to changes elsewhere in md, and insufficient ongoing testing... So the patch to make linear hot-add work in the first place introduced a subtle bug elsewhere that interracts poorly with older version of mdadm. This fixes it all up. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> ### Diffstat output ./drivers/md/linear.c | 10 +- ./drivers/md/md.c | 20 ++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff .prev/drivers/md/linear.c ./drivers/md/linear.c --- .prev/drivers/md/linear.c 2007-05-21 11:13:25.0 +1000 +++ ./drivers/md/linear.c 2007-05-21 11:13:39.0 +1000 @@ -139,8 +139,6 @@ static linear_conf_t *linear_conf(mddev_ if (!conf) return NULL; - mddev->private = conf; - cnt = 0; conf->array_size = 0; @@ -232,7 +230,7 @@ static linear_conf_t *linear_conf(mddev_ * First calculate the device offsets. */ conf->disks[0].offset = 0; - for (i=1; iraid_disks; i++) + for (i=1; i < raid_disks; i++) conf->disks[i].offset = conf->disks[i-1].offset + conf->disks[i-1].size; @@ -244,7 +242,7 @@ static linear_conf_t *linear_conf(mddev_ curr_offset < conf->array_size; curr_offset += conf->hash_spacing) { - while (i < mddev->raid_disks-1 && + while (i < raid_disks-1 && curr_offset >= conf->disks[i+1].offset) i++; @@ -299,9 +297,11 @@ static int linear_add(mddev_t *mddev, md */ linear_conf_t *newconf; - if (rdev->raid_disk != mddev->raid_disks) + if (rdev->saved_raid_disk != mddev->raid_disks) return -EINVAL; + rdev->raid_disk = rdev->saved_raid_disk; + newconf = linear_conf(mddev,mddev->raid_disks+1); if (!newconf) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-05-21 11:13:25.0 +1000 +++ ./drivers/md/md.c 2007-05-21 11:14:54.0 +1000 @@ -1298,8 +1298,9 @@ static void super_1_sync(mddev_t *mddev, ITERATE_RDEV(mddev,rdev2,tmp) if (rdev2->desc_nr+1 > max_dev) max_dev = rdev2->desc_nr+1; - - sb->max_dev = cpu_to_le32(max_dev); + + if (max_dev > le32_to_cpu(sb->max_dev)) + sb->max_dev = cpu_to_le32(max_dev); for (i=0; idev_roles[i] = cpu_to_le16(0xfffe); @@ -1365,10 +1366,14 @@ static int bind_rdev_to_array(mdk_rdev_t } /* make sure rdev->size exceeds mddev->size */ if (rdev->size && (mddev->size == 0 || rdev->size < mddev->size)) { - if (mddev->pers) - /* Cannot change size, so fail */ - return -ENOSPC; - else + if (mddev->pers) { + /* Cannot change size, so fail +* If mddev->level <= 0, then we don't care +* about aligning sizes (e.g. linear) +*/ + if (mddev->level > 0) + return -ENOSPC; + } else mddev->size = rdev->size; } @@ -2142,6 +2147,9 @@ static void analyze_sbs(mddev_t * mddev) rdev->desc_nr = i++; rdev->raid_disk = rdev->desc_nr; set_bit(In_sync, &rdev->flags); + } else if (rdev->raid_disk >= mddev->raid_disks) { + rdev->raid_disk = -1; + clear_bit(In_sync, &rdev->flags); } } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 004 of 7] md: Improve message about invalid superblock during autodetect.
People try to use raid auto-detect with version-1 superblocks (which is not supported) and get confused when they are told they have an invalid superblock. So be more explicit, and say it it is not a valid v0.90 superblock. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> ### Diffstat output ./drivers/md/md.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-05-21 11:14:54.0 +1000 +++ ./drivers/md/md.c 2007-05-21 11:16:16.0 +1000 @@ -2073,9 +2073,11 @@ static mdk_rdev_t *md_import_device(dev_ err = super_types[super_format]. load_super(rdev, NULL, super_minor); if (err == -EINVAL) { - printk(KERN_WARNING - "md: %s has invalid sb, not importing!\n", - bdevname(rdev->bdev,b)); + printk(KERN_WARNING + "md: %s does not have a valid v%d.%d " + "superblock, not importing!\n", + bdevname(rdev->bdev,b), + super_format, super_minor); goto abort_free; } if (err < 0) { @@ -5772,7 +5774,7 @@ static void autostart_arrays(int part) for (i = 0; i < dev_cnt; i++) { dev_t dev = detected_devices[i]; - rdev = md_import_device(dev,0, 0); + rdev = md_import_device(dev,0, 90); if (IS_ERR(rdev)) continue; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 001 of 7] md: Avoid overflow in raid0 calculation with large components.
If a raid0 has a component device larger than 4TB, and is accessed on a 32bit machines, then as 'chunk' is unsigned lock, chunk << chunksize_bits can overflow (this can be as high as the size of the device in KB). chunk itself will not overflow (without triggering a BUG). So change 'chunk' to be 'sector_t, and get rid of the 'BUG' as it becomes impossible to hit. Cc: "Jeff Zheng" <[EMAIL PROTECTED]> Signed-off-by: Neil Brown <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] ### Diffstat output ./drivers/md/raid0.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff .prev/drivers/md/raid0.c ./drivers/md/raid0.c --- .prev/drivers/md/raid0.c2007-05-18 11:48:57.0 +1000 +++ ./drivers/md/raid0.c2007-05-18 11:48:57.0 +1000 @@ -415,7 +415,7 @@ static int raid0_make_request (request_q raid0_conf_t *conf = mddev_to_conf(mddev); struct strip_zone *zone; mdk_rdev_t *tmp_dev; - unsigned long chunk; + sector_t chunk; sector_t block, rsect; const int rw = bio_data_dir(bio); @@ -470,7 +470,6 @@ static int raid0_make_request (request_q sector_div(x, zone->nb_dev); chunk = x; - BUG_ON(x != (sector_t)chunk); x = block >> chunksize_bits; tmp_dev = zone->dev[sector_div(x, zone->nb_dev)]; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 000 of 7] md: Introduction EXPLAIN PATCH SET HERE
Following are 7 patches for md in current main-line. The first two fix bugs that can cause data corruption, and so are suitable for -stable. The next fixes some problems with hot-adding a device to a linear array. As has not been tested by my test-suite until now, it hasn't worked properly until now :-( The remainder are mainly cleaning up code and comments. They could wait for 2.6.23, but are probably safe to go into 2.6.22 (maybe sit a week in -mm??) Thanks, NeilBrown [PATCH 001 of 7] md: Avoid overflow in raid0 calculation with large components. [PATCH 002 of 7] md: Don't write more than is required of the last page of a bitmap [PATCH 003 of 7] md: Fix bug with linear hot-add and elsewhere. [PATCH 004 of 7] md: Improve message about invalid superblock during autodetect. [PATCH 005 of 7] md: Improve the is_mddev_idle test fix [PATCH 006 of 7] md: Check that internal bitmap does not overlap other data. [PATCH 007 of 7] md: Change bitmap_unplug and others to void functions. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC] enhancing the kernel's graphics subsystem
Jon Smirl wrote: This design still requires a global server app since the heads share a single device. I am always concerned that the root priv code in the X server is a potential security hole. I would like to move away from a model where there is a global controlling app. I don't think we need a global controlling app at all. If you have multiple "controlling" apps competing for a single device, that either implies complexity in each app for sharing control, or moving even more code into the kernel for 2D and 3D. I don't think the kernel community is yet interested in moving everything of consequence into the kernel. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [2.6.22-rc1-mm1] vaio laptop (SZ72B) immediately resumes after STR
On Sunday 20 May 2007, Mattia Dongili wrote: > > $ cat /proc/acpi/wakeup > DeviceS-state Status Sysfs node > PWRBS4*enabled > S1F0S4 disabled > S1F1S4 disabled > S1F2S4 disabled > S1F3S4 disabled > S1F4S4 disabled > S1F5S4 disabled > S1F6S4 disabled > S1F7S4 disabled > TLANS3 disabled pci::07:00.0 > DLANS3 disabled > S6F0S4 disabled > S6F1S4 disabled > S6F2S4 disabled > S6F3S4 disabled > S6F4S4 disabled > S6F5S4 disabled > S6F6S4 disabled > S6F7S4 disabled > USB1S3 disabled pci::00:1d.0 > USB2S3 disabled pci::00:1d.1 > USB3S3 disabled pci::00:1d.2 > USB4S3 disabled pci::00:1d.3 > USB7S3 disabled pci::00:1d.7 > SLT0S4 disabled > LANCS3 disabled > EC0 S5 disabled That's strangely busy ... what ARE all those devices? :) But only the PCI ones -- or certain devices connected to USB root hubs -- could be affected by that patch. So another experiment you could do, if you want faster info than "git bisect" can provide, is building drivers for those PCI devices as modules (ehci-hcd, uhci-hcd, sky2) and then finding which one causes the trouble by removing them before STR. > $ cat /proc/bus/usb/devices > > T: Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 > B: Alloc= 45/900 us ( 5%), #Int= 1, #Iso= 1 > D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > P: Vendor= ProdID= Rev= 2.06 > S: Manufacturer=Linux 2.6.22-rc1-mm1-bisect uhci_hcd > S: Product=UHCI Host Controller > S: SerialNumber=:00:1d.3 > C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA ^^ Just FYI, any USB device with the 0x20 bit set could in some cases become a wakeup event source. All hubs (root and otherwise) set that. So do a couple of the devices you show ... > I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub > E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms > > ... > > T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 > D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=0483 ProdID=2016 Rev= 0.01 > S: Manufacturer=STMicroelectronics > S: Product=Biometric Coprocessor > C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA ^^ This one does. I seem to recall hearing about some trouble associated with this and sleep/wakeup processing, but I forget about the details. > I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) > E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms > E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms > E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=20ms > > ... > > > $ sudo ethtool eth0 > Settings for eth0: > Supported ports: [ TP ] > Supported link modes: 10baseT/Half 10baseT/Full > 100baseT/Half 100baseT/Full > 1000baseT/Half 1000baseT/Full > Supports auto-negotiation: Yes > Advertised link modes: 10baseT/Half 10baseT/Full > 100baseT/Half 100baseT/Full > Advertised auto-negotiation: Yes > Speed: 100Mb/s > Duplex: Full > Port: Twisted Pair > PHYAD: 0 > Transceiver: internal > Auto-negotiation: on > Supports Wake-on: pg > Wake-on: d So wake-on-LAN is disabled here ... it *should* avoid turning on the PCI wake mechanisms. On the other hand, a quick look at that driver shows that it's rather broken in how it calls pci_enable_wake(). > Current message level: 0x00ff (255) > Link detected: yes > > $ sudo ethtool -i eth0 > driver: sky2 > version: 1.14 > firmware-version: N/A > bus-info: :07:00.0 > > > And, for a bit more info, the output of the appended script. > >on acpi_system:00/device:00/PNP0C0C:00 >on pci:00/:00:1d.7/usb1 >on pci:00/:00:1d.7 >on pci:00/:00:1d.3/usb5 >on pci:00/:00:1d.3 >on pci:00/:00:1d.2/usb4/4-1 >on pci:00/:00:1d.2/usb4 >on pci:00/:00:1d.2 >on pci:00/:00:1d.1/usb3 >on pci:00/:00:1d.1 >on pci:00/:00:1d.0/usb2 >on pci:00/:00:1d.0 >on pci:00/:00:1c.2/:07:00.0 Other than the curious lack of labeling on the USB and network nodes there (maybe the script cares about the legacy sysfs files? it's a couple years old now) that doesn't say anything new. > > My suspicion, based on the dmesg and seeing what drivers actually > > try to enable wakeup, would be the 'sky2' driver. The other two > > FWIW the sky2 is never functional upon resume, I need to ifdown, rmmod, > modprobe and ifup again to get some networking... Try
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v7
On Fri, 18 May 2007 00:09:53 +0200, Thomas Gleixner said: > Broken out version is available here: > http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v7.patches.tar.bz2 By the time I got there, you'd put the -v8 version out there. It applied to a 2.6.22-rc1-mm1 tree with only minor bashing (basically, the patches clocksource-fix-mismerge.diff and clocksource-watchdog-resumed-lockless.patch appear to already be in -rc1-mm1, and hpet-check-counter.diff in a ever-so slightly different form). I also threw on the 22-rc1 patch from linuxpowertop to tweak some timeouts in the kernel... Boots and runs on a Dell Latitude D820 laptop with an Intel Core2 T7200. Intel's 'powertop' was reporting as low as 25 wakeups/sec in single-user mode, even with CONFIG_HZ=1000. This is looking like a good -mm candidate... Some 'powertop' results (I'm not at all clear why it's reporting 3000+ wakeups/ sec on the non-NOHZ kernels with HZ=1000. I can see 1000, or 2000 because it's a dual-core, but 3000?). It doesn't look like NOHZ gains me a *lot* of extra battery time, but a bit (I believe the wattages to be reasonably accurate, the 'hours left' to be a crock...). -rc1-mm1 with X desktop running: Cn Avg residency (5s) Long term residency avg C0 (cpu running)(18.8%) C10.0ms ( 0.0%) 0.0ms C20.3ms ( 2.6%) 0.3ms C30.5ms (78.6%) 0.5ms Wakeups-from-idle per second : 3183.2 Power usage (ACPI estimate) : 27.4 W (2.7 hours left) Top causes for wakeups: 16.4% (62.4): nvidia 13.2% (50.0) S06cpuspeed : queue_delayed_work_on (delayed_work_timer_ 12.6% (48.0) esd : schedule_timeout (process_timeout) 8.4% (31.8) gkrellm : schedule_timeout (process_timeout) 7.7% (29.2): uhci_hcd:usb4 6.6% (25.2) Xorg : do_setitimer (it_real_fn) 6.6% (25.0): uhci_hcd:usb3, HDA Intel 5.3% (20.0)gyachi : schedule_timeout (process_timeout) 3.3% (12.6) e16 : schedule_timeout (process_timeout) 2.6% (10.0) : ehci_work (ehci_watchdog) Suggestion: Enable the CONFIG_NO_HZ kernel configuration option. -rc1-mm1-hrt8 with X desktop running: Cn Avg residency (5s) Long term residency avg C0 (cpu running)( 8.5%) C10.0ms ( 0.0%) 0.0ms C20.8ms ( 8.3%) 1.0ms C31.5ms (83.2%) 1.5ms Wakeups-from-idle per second : 1290.0 Power usage (ACPI estimate) : 26.8 W (2.7 hours left) Top causes for wakeups: 23.8% (62.0): nvidia 15.8% (41.2) S06cpuspeed : queue_delayed_work_on (delayed_work_timer_ 14.6% (38.0) gkrellm : schedule_timeout (process_timeout) 8.7% (22.6) Xorg : do_setitimer (it_real_fn) 7.6% (19.8)gyachi : schedule_timeout (process_timeout) 3.8% (10.0) : ehci_work (ehci_watchdog) 3.4% ( 8.8) e16 : schedule_timeout (process_timeout) 3.2% ( 8.4) firefox-bin : futex_wait (hrtimer_wakeup) 3.1% ( 8.0) : usb_hcd_poll_rh_status (rh_timer_func) 2.5% ( 6.6) pcscd : schedule_timeout (process_timeout) -rc1-mm1 single-user: C0 (cpu running)(10.0%) C10.0ms ( 0.0%) 0.0ms C20.5ms ( 0.0%) 0.6ms C30.6ms (90.0%) 0.6ms Wakeups-from-idle per second : 3003.0 Power usage (ACPI estimate) : 24.5 W (3.1 hours left) Top causes for wakeups: 42.1% ( 8.0) : usb_hcd_poll_rh_status (rh_timer_func) 26.3% ( 5.0) : fbcon_add_cursor_timer (cursor_timer_handl 14.7% ( 2.8) : queue_delayed_work_on (delayed_work_timer_ 6.3% ( 1.2): libata 5.3% ( 1.0) kedac : schedule_timeout (process_timeout) 1.1% ( 0.2) init : schedule_timeout (process_timeout) 1.1% ( 0.2) : page_writeback_init (wb_timer_fn) 1.1% ( 0.2) pdflush : blk_plug_device (blk_unplug_timeout) 1.1% ( 0.2) : neigh_table_init_no_netlink (neigh_periodi 1.1% ( 0.2)rc.sysinit : start_this_handle (commit_timeout) Suggestion: Enable the CONFIG_NO_HZ kernel configuration option. -rc1-mm1-hrt8 single-user: Cn Avg residency (5s) Long term residency avg C0 (cpu running)( 0.1%) C10.0ms ( 0.0%) 0.0ms C21.9ms ( 0.2%) 1.9ms C3 58.6ms (99.7%) 58.6ms Wakeups-from-idle per second : 36.0 Power usage (ACPI estimate) : 23.2 W (2.9 hours left) Top causes for wakeups: 48.2% ( 8.0) : usb_hcd_poll_rh_status (rh_timer_func) 30.1% ( 5.0) : fbcon_add_cursor_timer (cursor_timer_handl 12.0% ( 2.0) : queue_delayed_work_on (delayed_work_timer_ 6.0% ( 1.0) kedac : schedule_
[PATCH] rm_inter-arch Kconfig dep. (was Re: building i386 requires s390: "driver/crypto/Kconfig" sourcing s390 arch)
Heiko Carstens wrote: > Send a patch. The following seems to work for me. Hope the form is ok. How does one include source if one wants to compose using Firefox? Seems to eat the tabs... :-( Are "text/plain" attachments ok to send to the list? Haven't seen any, but maybe it is not a necessary restrictly? Anyway...whatever...here it is... Linda --- diff -rNu linux-2.6.21.1/arch/s390/crypto/Kconfig linux-2.6.21.1-new/arch/s390/crypto/Kconfig --- linux-2.6.21.1/arch/s390/crypto/Kconfig 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1-new/arch/s390/crypto/Kconfig 1969-12-31 16:00:00.0 -0800 @@ -1,60 +0,0 @@ -config CRYPTO_SHA1_S390 - tristate "SHA1 digest algorithm" - depends on S390 - select CRYPTO_ALGAPI - help - This is the s390 hardware accelerated implementation of the - SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). - -config CRYPTO_SHA256_S390 - tristate "SHA256 digest algorithm" - depends on S390 - select CRYPTO_ALGAPI - help - This is the s390 hardware accelerated implementation of the - SHA256 secure hash standard (DFIPS 180-2). - - This version of SHA implements a 256 bit hash with 128 bits of - security against collision attacks. - -config CRYPTO_DES_S390 - tristate "DES and Triple DES cipher algorithms" - depends on S390 - select CRYPTO_ALGAPI - select CRYPTO_BLKCIPHER - help - This us the s390 hardware accelerated implementation of the - DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3). - -config CRYPTO_AES_S390 - tristate "AES cipher algorithms" - depends on S390 - select CRYPTO_ALGAPI - select CRYPTO_BLKCIPHER - help - This is the s390 hardware accelerated implementation of the - AES cipher algorithms (FIPS-197). AES uses the Rijndael - algorithm. - - Rijndael appears to be consistently a very good performer in - both hardware and software across a wide range of computing - environments regardless of its use in feedback or non-feedback - modes. Its key setup time is excellent, and its key agility is - good. Rijndael's very low memory requirements make it very well - suited for restricted-space environments, in which it also - demonstrates excellent performance. Rijndael's operations are - among the easiest to defend against power and timing attacks. - - On s390 the System z9-109 currently only supports the key size - of 128 bit. - -config S390_PRNG - tristate "Pseudo random number generator device driver" - depends on S390 - default "m" - help - Select this option if you want to use the s390 pseudo random number - generator. The PRNG is part of the cryptograhic processor functions - and uses triple-DES to generate secure random numbers like the - ANSI X9.17 standard. The PRNG is usable via the char device - /dev/prandom. diff -rNu linux-2.6.21.1/drivers/crypto/Kconfig linux-2.6.21.1-new/drivers/crypto/Kconfig --- linux-2.6.21.1/drivers/crypto/Kconfig 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1-new/drivers/crypto/Kconfig 2007-05-20 16:41:44.215406026 -0700 @@ -51,7 +51,66 @@ If unsure say M. The compiled module will be called padlock-sha.ko -source "arch/s390/crypto/Kconfig" +config CRYPTO_SHA1_S390 + tristate "SHA1 digest algorithm" + depends on S390 + select CRYPTO_ALGAPI + help + This is the s390 hardware accelerated implementation of the + SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). + +config CRYPTO_SHA256_S390 + tristate "SHA256 digest algorithm" + depends on S390 + select CRYPTO_ALGAPI + help + This is the s390 hardware accelerated implementation of the + SHA256 secure hash standard (DFIPS 180-2). + + This version of SHA implements a 256 bit hash with 128 bits of + security against collision attacks. + +config CRYPTO_DES_S390 + tristate "DES and Triple DES cipher algorithms" + depends on S390 + select CRYPTO_ALGAPI + select CRYPTO_BLKCIPHER + help + This us the s390 hardware accelerated implementation of the + DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3). + +config CRYPTO_AES_S390 + tristate "AES cipher algorithms" + depends on S390 + select CRYPTO_ALGAPI + select CRYPTO_BLKCIPHER + help + This is the s390 hardware accelerated implementation of the + AES cipher algorithms (FIPS-197). AES uses the Rijndael + algorithm. + + Rijndael appears to be consistently a very good performer in + both hardware and software across a wide range of computing + environments regardless of its use in feedback or non-feedback + m
Re: [PATCH 4/8] Force detect and enable HPET on ICH
On Mon, 7 May 2007 13:31:28 -0700 Venki Pallipadi (VP) wrote: VP> Force detect and/or enable HPET on ICH chipsets. This patch just handles the VP> detection part and following patches use this information. VP> VP> Signed-off-by: Venkatesh Pallipadi <[EMAIL PROTECTED]> Venki, Is there any reason your patch only enables HPET on ICH6 and beyond? HPET can be enabled on earlier ICH by setting bit 17 in GEN_CNTL on PCI dev 31, func 0, offset d0. This seems to work for ICH3/4/5. Are there any errata affecting these ICHs? Cheers, - Udo -- Dipl.-Inf. Udo Steinberg Technische Universität Dresden http://os.inf.tu-dresden.de/~us15 Institute for System ArchitectureTel: +49 351 463 38401 D-01062 Dresden Fax: +49 351 463 38284 signature.asc Description: PGP signature
Re: [RFC] enhancing the kernel's graphics subsystem
On 5/20/07, Jesse Barnes <[EMAIL PROTECTED]> wrote: With the interfaces implemented here, a userspace application can create a multiseat environment either with a single graphics card with multiple outputs or multiple cards. It could do this by creating several frame buffer objects and associating them with whatever CRTCs were available, and managing input via existing APIs. I don't know of anyone that's done this yet though... This design still requires a global server app since the heads share a single device. I am always concerned that the root priv code in the X server is a potential security hole. I would like to move away from a model where there is a global controlling app. I don't think we need a global controlling app at all. By making one device per head it becomes possible to assign ownership of the device to the specific user and let them do whatever they want to it. It's then up to the device driver to sort everything out. fbdev has already been designed with this in mind and I believe the Matrox driver implements it. This model easily expands from one to N heads. Merged-fb modes are handled by including them in the allowable modes list on both heads. If you own both heads you can set a merged-fb mode and the other device will just return EBUSY. How are you reconciling the introduction of a new mode setting API with the 90 existing fbdev drivers? We clearly don't want two competing APIs in the kernel. What's the plan for converting all of the existing drivers? -- Jon Smirl [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [2.6.22-rc1-mm1] vaio laptop (SZ72B) immediately resumes after STR
On Sun, May 20, 2007 at 11:38:04AM -0700, David Brownell wrote: > On Saturday 19 May 2007, Mattia Dongili wrote: > > On Sat, May 19, 2007 at 12:04:13AM -0700, Andrew Morton wrote: > > > On Sat, 19 May 2007 15:48:29 +0900 Mattia Dongili <[EMAIL PROTECTED]> > > > wrote: > > > > > > > On Fri, May 18, 2007 at 12:22:40AM -0700, Andrew Morton wrote: > > > > > On Fri, 18 May 2007 16:15:24 +0900 Mattia Dongili <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > Hello, > > > > > > > > > > > > After finally catching fw-{ohci,core} to be problematic during > > > > > > resume, > > > > > > I'm now experiencing an immediate resume after suspending. > > > > > > > > > > > > 2.6.21-rc7-mm* didn't even suspend, my last known > > > > > > suspend-and-resuming > > > > > > kernel was 2.6.21-rc5-mm3 (I know one other vaio SZ user could STR > > > > > > with > > > > > > 2.6.21-rc6-mm* after the cpuidle fixes). > > > > > > > > > > > > my .config is: > > > > > > http://oioio.altervista.org/linux/config-2.6.22-rc1-mm1-1 > > > > > > and a str cycle with PM_DEBUG=y: > > > > > > http://oioio.altervista.org/linux/dmesg-SRT-immediately-resumes.txt > > Can you also provide /proc/acpi/wakeup and /proc/bus/usb/devices? > Plus "ethool eth0" and "ethtool -i eth0"? here we go: $ cat /proc/acpi/wakeup Device S-state Status Sysfs node PWRB S4*enabled S1F0 S4 disabled S1F1 S4 disabled S1F2 S4 disabled S1F3 S4 disabled S1F4 S4 disabled S1F5 S4 disabled S1F6 S4 disabled S1F7 S4 disabled TLAN S3 disabled pci::07:00.0 DLAN S3 disabled S6F0 S4 disabled S6F1 S4 disabled S6F2 S4 disabled S6F3 S4 disabled S6F4 S4 disabled S6F5 S4 disabled S6F6 S4 disabled S6F7 S4 disabled USB1 S3 disabled pci::00:1d.0 USB2 S3 disabled pci::00:1d.1 USB3 S3 disabled pci::00:1d.2 USB4 S3 disabled pci::00:1d.3 USB7 S3 disabled pci::00:1d.7 SLT0 S4 disabled LANC S3 disabled EC0 S5 disabled $ cat /proc/bus/usb/devices T: Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 45/900 us ( 5%), #Int= 1, #Iso= 1 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor= ProdID= Rev= 2.06 S: Manufacturer=Linux 2.6.22-rc1-mm1-bisect uhci_hcd S: Product=UHCI Host Controller S: SerialNumber=:00:1d.3 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms T: Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=054c ProdID=01bb Rev= 1.28 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms T: Bus=05 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=044e ProdID=300c Rev=19.15 S: Manufacturer=ALPS S: Product=UGX C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none) T: Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor= ProdID= Rev= 2.06 S: Manufacturer=Linux 2.6.22-rc1-mm1-bisect uhci_hcd S: Product=UHCI Host Controller S: SerialNumber=:00:1d.2 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms T: Bus=04 Lev=01 Prnt=01 Port=0
Re: RFC: kconfig select warnings bogus?
Hi, On Sat, 19 May 2007, Sam Ravnborg wrote: > We see a lot of these lately: > GEN /home/bor/build/linux-2.6.22/Makefile > scripts/kconfig/conf -s arch/i386/Kconfig > drivers/macintosh/Kconfig:116:warning: 'select' used by config symbol > 'PMAC_APM_EMU' refers to undefined symbol 'SYS_SUPPORTS_APM_EMULATION' > drivers/net/Kconfig:2283:warning: 'select' used by config symbol 'UCC_GETH' > refers to undefined symbol 'UCC_FAST' > drivers/input/keyboard/Kconfig:170:warning: 'select' used by config symbol > 'KEYBOARD_ATARI' refers to undefined symbol 'ATARI_KBD_CORE' > drivers/input/mouse/Kconfig:182:warning: 'select' used by config symbol > 'MOUSE_ATARI' refers to undefined symbol 'ATARI_KBD_CORE' > > > Do this warning really add any value or should we just ignore them like this? The problem is that a select operation on a non bool/tristate symbol is undefined. A runtime error would probably be even more ignored than this. "Proving" that this select can't be activated is theoretically possible, but not really practical. An alternative might be to reverse the dependency again and let it act like a "depends on". Just removing the warning is definitely not the right answer. bye, Roman - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Use of SIGXFSZ outside of soft limits
Micah Cowan wrote: > Alan Cox wrote: >>> [XSI] [Option Start] If the request would cause the file size to >>> exceed the soft file size limit for the process and there is no room >>> for any bytes to be written, the request shall fail and the >>> implementation shall generate the SIGXFSZ signal for the thread. >>> [Option End] >>> >>> >> >> This all depends which document and version you review. AIX for example >> has or had the same behaviour as Linux which comes from the Large File >> Summit and indeed our implementation was carefully tested to pass the >> test suite of the time. >> >> SUSv3 seems to subsume the older LFS standards, and has adjusted them >> somewhat in the merging so there may well be a good case for normalizing >> our behaviour to match SUSv3. Run some tests and send patches. >> >> Alan > > Thanks very much for this response, Alan. > > I kind of suspected it might be something like this. I'm relieved to > know that the original reasons for signaling that on other cases may no > longer apply. > > I'll plan to be back with patches, then! :) > > -Micah > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ Sorry it's taken this long. The patch seems to work well, and the changes are _quite_ trivial. diff -ru linux-2.6.20.6-orig/fs/ncpfs/file.c linux-2.6.20.6/fs/ncpfs/file.c --- linux-2.6.20.6-orig/fs/ncpfs/file.c 2007-04-06 13:02:48.0 -0700 +++ linux-2.6.20.6/fs/ncpfs/file.c 2007-04-14 11:16:56.0 -0700 @@ -203,7 +203,6 @@ if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) { if (pos >= MAX_NON_LFS) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } if (count > MAX_NON_LFS - (u32)pos) { @@ -212,7 +211,6 @@ } if (pos >= inode->i_sb->s_maxbytes) { if (count || pos > inode->i_sb->s_maxbytes) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } } diff -ru linux-2.6.20.6-orig/fs/reiserfs/file.c linux-2.6.20.6/fs/reiserfs/file.c --- linux-2.6.20.6-orig/fs/reiserfs/file.c 2007-04-06 13:02:48.0 -0700 +++ linux-2.6.20.6/fs/reiserfs/file.c 2007-04-14 11:17:46.0 -0700 @@ -1323,7 +1323,6 @@ if (get_inode_item_key_version (inode) == KEY_FORMAT_3_5 && *ppos + count > MAX_NON_LFS) { if (*ppos >= MAX_NON_LFS) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } if (count > MAX_NON_LFS - (unsigned long)*ppos) diff -ru linux-2.6.20.6-orig/mm/filemap.c linux-2.6.20.6/mm/filemap.c --- linux-2.6.20.6-orig/mm/filemap.c2007-04-06 13:02:48.0 -0700 +++ linux-2.6.20.6/mm/filemap.c 2007-04-14 11:14:20.0 -0700 @@ -1971,7 +1971,6 @@ if (unlikely(*pos + *count > MAX_NON_LFS && !(file->f_flags & O_LARGEFILE))) { if (*pos >= MAX_NON_LFS) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } if (*count > MAX_NON_LFS - (unsigned long)*pos) { @@ -1989,7 +1988,6 @@ if (likely(!isblk)) { if (unlikely(*pos >= inode->i_sb->s_maxbytes)) { if (*count || *pos > inode->i_sb->s_maxbytes) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } /* zero-length writes at ->s_maxbytes are OK */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC] enhancing the kernel's graphics subsystem
On Sunday, May 20, 2007, Jon Smirl wrote: > On Thu, 17 May 2007 14:23:45 -0700, Jesse Barnes wrote: > > In collaboration with the FB guys, we've been working on enhancing the > > kernel's graphics subsystem in an attempt to bring some sanity to the > > Linux graphics world and avoid the situation we have now where several > > kernel and userspace drivers compete for control of graphics devices. > > How is supporting different users logged into each head going to work? > The original model for this was to give each head its own fbdev device. > It is important that each user be able to set their own mode without > being root. With the interfaces implemented here, a userspace application can create a multiseat environment either with a single graphics card with multiple outputs or multiple cards. It could do this by creating several frame buffer objects and associating them with whatever CRTCs were available, and managing input via existing APIs. I don't know of anyone that's done this yet though... Jesse - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [rfc] increase struct page size?!
On Sat, May 19, 2007 at 10:53:20AM -0700, William Lee Irwin III wrote: > On Fri, May 18, 2007 at 04:42:10PM +0100, Hugh Dickins wrote: > > Sooner rather than later, don't we need those 8 bytes to expand from > > atomic_t to atomic64_t _count and _mapcount? Not that we really need > > all 64 bits of both, but I don't know how to work atomically with less. > > (Why do I have this sneaking feeling that you're actually wanting > > to stick something into the lower bits of page->virtual?) > > I wonder how close we get to overflow on ->_mapcount and ->_count. > (untested/uncompiled). I think the problem is that an attacker can deliberately overflow ->_count, not that it can happen innocuously. By mmaping, say, the page of libc that contains memcpy() several million times, and forking enough, can't you make ->_mapcount hit 0? I'm not a VM guy, I just vaguely remember people talking about this before. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Badness at include/linux/slub_def.h
hi there, yet another[0] badness, again from this very iBook running vanilla 2.6.22-rc1-git8: [41653.487050] Badness at include/linux/slub_def.h:77 [41653.487060] Call Trace: [41653.487068] [ecafbcb0] [c0008d00] show_stack+0x3c/0x194 (unreliable) [41653.487097] [ecafbce0] [c01426d4] report_bug+0x84/0xf4 [41653.487116] [ecafbcf0] [c0010280] program_check_exception+0xbc/0x530 [41653.487137] [ecafbd20] [c0011f8c] ret_from_except_full+0x0/0x4c [41653.487154] --- Exception: 700 at get_slab+0x248/0x260 [41653.487168] LR = __kmalloc+0x1c/0x9c [41653.487176] [ecafbde0] [101dfbc8] 0x101dfbc8 (unreliable) [41653.487213] [ecafbe10] [c0080398] __kmalloc+0x1c/0x9c [41653.487227] [ecafbe30] [c01c2150] drm_rmdraw+0x26c/0x29c [41653.487243] [ecafbe80] [c01c2b74] drm_ioctl+0xe0/0x250 [41653.487257] [ecafbeb0] [c00924a0] do_ioctl+0x9c/0xa8 [41653.487273] [ecafbed0] [c0092530] vfs_ioctl+0x84/0x490 [41653.487287] [ecafbf10] [c009297c] sys_ioctl+0x40/0x74 [41653.487301] [ecafbf40] [c0011930] ret_from_syscall+0x0/0x38 [41653.487315] --- Exception: c01 at 0xfd132a8 [41653.487327] LR = 0xfd13240 This happens when I execute glxinfo(1) - but it happens only once. The second time the message is not printed. As with the other reports, the command actually works, DRI is working too and the system remains stable. Please see http://nerdbynature.de/bits/2.6.22-rc1-git8/ for more details. Thanks, Christian. [0] http://ozlabs.org/pipermail/linuxppc-dev/2007-May/036466.html http://ozlabs.org/pipermail/linuxppc-dev/2007-May/036468.html -- BOFH excuse #334: 50% of the manual is in .pdf readme files - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
On Mon, May 21, 2007 at 12:24:22AM +0200, Andi Kleen wrote: > > > But I think your list is far too long anyways. > > > > So, which ones would you like to have removed then? > > SIGFPE at least and the accounting signals are dubious too. SIGQUIT can > be also relatively common. And SIGSEGV and SIGBUS - UML catches these internally and handles them. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: something strange in libata-core.c for kernel 2.6.22-rc3
Tejun Heo wrote: [EMAIL PROTECTED] wrote: Mybe I am wrong, but if you are detecting 40-wire cable to set them to DMA/33, why the check includes also 80-wire cables configuring them to DMA/33 too? With this patch my nvidia4 IDE controllers detects correctly and configure correctly DMA/100 for my HD and DMA/33 for my DVD (the first uses a 80-wire cable, the second a 40-wire cable). Am I wrong somewhere? That's the drive side verification of 80c cable check, so if the condition triggers we downgrade 80c or unknown to 40c. Cable detection on nvidia PATA is a disaster. You're supposed to do some ACPI dancing and drive side detection is completely bogus. Eeeek Alan, did you have a chance to test the ACPI cable detection? It just didn't work when I tried it. It always returned 80c on my machine. Hopefully when we get that support in and working it will solve a lot of these issues (and others, like the laptops that have a short 40-wire cable that is good for high UDMA speeds which we presently have to hard-code detection for specific models). -- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from [EMAIL PROTECTED] Home Page: http://www.roberthancock.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sd_resume redundant? [was: [PATCH] libata: implement ata_wait_after_reset()]
Randy Dunlap wrote: On Sun, 20 May 2007 11:45:03 -0600 Robert Hancock wrote: Indan Zupancic wrote: Everything seems to work fine without sd_resume(), so why is it needed? Because not all disks spin up without being told to do so and like it or not spinning disks up on resume is the default behavior. As I wrote in the other reply, it would be worthwhile to make it configurable. Not even after they receive a read command? Ugh. ATA disks are supposed to spin up, yes. SCSI disks require a command to tell them to spin up if they're in the "stopped" state. Good info, but linux-ide was dropped. Is that due to lack of reply-to-all or is it a newsgroup thing or what? That would be a newsgroup thing. It seems that sometimes CCs get dropped when the posts are forwarded to fa.linux.kernel where I normally read them. -- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from [EMAIL PROTECTED] Home Page: http://www.roberthancock.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Badness at include/linux/slub_def.h
On Sun, 2007-05-20 at 23:10 +0100, Christian Kujau wrote: > hi there, > > yet another[0] badness, again from this very iBook running vanilla > 2.6.22-rc1-git8: Just another kmalloc(0)... report this one to the DRI folks, it's not powerpc specific. Cheers, Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
On Sun, 20 May 2007 23:20:36 +0200, Folkert van Heusden wrote: > > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > + case SIGSYS: > > > + case SIGSTKFLT: > > > > Unconditional? That's definitely a very bad idea. If anything only unhandled > > signals should be printed this way because some programs use them > > internally. > > Use these signals internally? Afaik these are fatal, stopping the > process. So using them internally would be a little tricky. Tricky for Joe Programmer, perhaps. I've been personally involved with writing SIGFPE-handling code in a major telco application framework, for several different CPU architectures and operating systems. SIGSEGV is used by some garbage collectors, some JITs, and I believe also some software distributed shared memory implementations. I've heard of at least one Lisp implementation that used SIGBUS instead of dynamic type checks in some operations (e.g. to catch CAR of a non-CONS). Handled signals should not be logged. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Who is currently usb.ids maintainer?
CIJOML wrote: > Hi guys, > > can anybody help me find current usb.ids maintainer? David Brownell is not > responding and latest official version is 5 mounths old. > > I could take ownership if nobody takes care. > > Thanks for reply > > Michal farragut.flameeyes.is-a-geek.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Who is currently usb.ids maintainer?
On Sun, 20 May 2007, CIJOML wrote: > can anybody help me find current usb.ids maintainer? David Brownell is > not responding and latest official version is 5 mounths old. I could > take ownership if nobody takes care. Official maintainer is afaik still Vojtech. -- Jiri Kosina - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Linux 2.6.22-rc2
On Fri, 18 May 2007 22:17:14 -0700 (PDT) Linus Torvalds <[EMAIL PROTECTED]> wrote: > Stephen Hemminger (7): > [TCP] slow start: Make comments and code logic clearer. > *** sky2: remove Gigabyte 88e8056 restriction *** > sky2: PHY register settings > sky2: keep track of receive alloc failures > sky2: MIB counter overflow handling > sky2: remove dual port workaround > sky2: memory barriers change > I tested this and it's still horribly broken for me with Gigabyte 88E8056 onboard LAN. Same symptom as before, it works for several seconds and then dies. Relevant portion of logs: May 20 15:57:48 cramit kernel: sky2 :04:00.0: v1.14 addr 0xf800 irq 16 Yukon-EC Ultra (0xb4) rev 2 May 20 15:57:48 cramit kernel: sky2 eth0: addr 00:16:e6:da:f3:b5 May 20 15:57:48 cramit kernel: sky2 eth0: enabling interface May 20 15:57:48 cramit kernel: sky2 eth0: ram buffer 0K May 20 15:57:48 cramit kernel: ACPI: PCI Interrupt :00:1b.0[A] -> GSI 22 (level, low) -> IRQ 18 May 20 15:57:48 cramit kernel: PCI: Setting latency timer of device :00:1b.0 to 64 May 20 15:57:50 cramit kernel: sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both Attempt to ftp a file to another box on LAN and about 1.5 megabytes into the transfer: May 20 16:01:43 cramit kernel: sky2 eth0: hw error interrupt status 0x8 May 20 16:01:43 cramit kernel: sky2 eth0: MAC parity error May 20 16:01:43 cramit kernel: sky2 :04:00.0: error interrupt status=0x8000 May 20 16:01:43 cramit kernel: sky2 eth0: hw error interrupt status 0x8 May 20 16:01:43 cramit kernel: sky2 eth0: MAC parity error Transfer stalls and that's all she wrote. If interested in seeing kernel config: http://www.mikeserv.org/files/config-2.6.22-rc2 Oh well, back to trusty rtl8139 based PCI card for now. Thanks for working on this stuff, Mike Houston - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Freezeable workqueues [Was: 2.6.22-rc1: Broken suspend on SMP with tifm]
On Sunday, 20 May 2007 23:06, Oleg Nesterov wrote: > On 05/20, Rafael J. Wysocki wrote: > > > > On Sunday, 20 May 2007 21:54, Oleg Nesterov wrote: > > > > > > I am a bit afraid of too many yes/no options for the freezer, a couple of > > > naive > > > questions. > > > > > > 1. Can't we make all wqs freezable? I still can't see the reason to have > > > both > > >freezable and not freezable wqs. > > > > The reason might be the same as for having freezable and nonfreezable kernel > > threads in general. For example, there are some kernel threads that we need > > for saving the image and I don't see why there shouldn't be any such > > workqueues. > > OK, I see. > > > > 2. Why do we need CPU_TASKS_FROZEN? Can't we change cpu-hotplug to always > > >freeze tasks right now, without any additional changes? > > > > In principle, we can, but for this purpose we'd have to modify all NOFREEZE > > tasks. > > Why? Ah, sorry, I didn't understand the question correctly. > >That wouldn't fly, I'm afraid. > > > > >Any subsystem should handle correctly the case when _cpu_down() (say) > > >is called with tasks_frozen == 1 anyway. So, why can't we simplify > > >things and do > > > > > > _cpu_down(int tasks_frozen) > > > > > > if (!tasks_frozen) > > > freeze_processes(); > > > ... > > > > > > right now? Yes, we can do this, I think. > > But we call _cpu_down() after device_suspend(), so many tasks are already > > frozen at this point. We'd only need to freeze those that are not frozen > > and > > in _cpu_up() we'd have to thaw them. > > Not sure I understand. When we call _cpu_down() after device_suspend(), we > check tasks_frozen == 1, and do not call freeze_processes(). If the task > could be frozen, it is already frozen. > > When _cpu_down() sees tasks_frozen = 0, it does freeze_processes() itself, > and thaw_tasks() on return. > > IOW, we never send (say) CPU_DEAD, always CPU_DEAD_FROZEN. Yes, that seems reasonable. This means that every user of freezable kernel threads who installs a CPU hotplug notifier will have to assume that its kernel threads are frozen when the notifier is called. Greetings, Rafael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.22-rc2 built on ppc (2)
On Sun, 20 May 2007 13:08:15 +0200 Elimar Riesebieter <[EMAIL PROTECTED]> wrote: > FYI, building 2.6.22-rc2 with > gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7) > on my powerbook (PPC) gives: > > ... > kernel/time/ntp.c: In function 'do_adjtimex': > kernel/time/ntp.c:307: warning: comparison of distinct pointer types lacks a > cast > kernel/time/ntp.c:310: warning: comparison of distinct pointer types lacks a > cast hm, do_div() is defined as operating on a u64, but ntp is passing it an s64 and the asm-generic implementation of do_div() is warning about that. Fixing that would be simple but a bit ugly. The code around there needs to be taught about min_t and max_t, too.. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [BUG] local_softirq_pending storm
On Sun, 2007-05-20 at 02:53 +0530, Anant Nitya wrote: > > 1 == TASK_INTERRUPTIBLE, so we know that ksoftirqd was not woken up. At > > least it is not a scheduler problem. > > > > I work out a more complex debug patch and pester you to test once I'm > > done. > No problem :) You asked for it :) Please patch 2.6.22-rc2 with http://tglx.de/projects/hrtimers/2.6.22-rc2/patch-2.6.22-rc2-hrt2.patch and http://www.tglx.de/private/tglx/ht-debug/tracer.diff Compile it with the config http://www.tglx.de/private/tglx/ht-debug/config.debug You should find something like: ( swapper-0|#0): new 67173 us user-latency. along with the familiar "NOHZ .." message in your log file. Once that happened please do: $ cat /proc/latency_trace >trace.txt compress it and send it to me along with the full dmesg output or put both up to some place, where I can download it. Michal, IIRC you encountered the same P4/HT related wreckage. Can you do the same ? Thanks, tglx - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
On Sun, May 20, 2007 at 11:20:36PM +0200, Folkert van Heusden wrote: > > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > + case SIGSYS: > > > + case SIGSTKFLT: > > > > Unconditional? That's definitely a very bad idea. If anything only unhandled > > signals should be printed this way because some programs use them > > internally. > > Use these signals internally? Afaik these are fatal, stopping the > process. So using them internally would be a little tricky. All of them are catchable. > > > But I think your list is far too long anyways. > > So, which ones would you like to have removed then? SIGFPE at least and the accounting signals are dubious too. SIGQUIT can be also relatively common. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.21-rt2] PowerPC: decrementer clockevent driver
On Sun, 2007-05-20 at 18:02 +0200, Segher Boessenkool wrote: > > In fact, while it's never worded explicitely in the spec, it's always > > been strongly in the "spirit" of the architecture that the timebase and > > decrementer have a constant frequency. > > The architecture mentions varying time base frequencies, > and how to deal with this, actually. It makes no > recommendations one way or the other. I might be mixing up with PAPR... anyway, it's very stupid to vary it imho. And as I just said, I have about 0 plan to imlement support for such a contraption. > Fixed frequencies are easier for almost everything of > course :-) Yup. > > This is why processors like the > > 970 allow for an external sourcing for when they are used in setups > > where the various clocks are slewed for power management. > > Clock spreading on the core clock is the bigger problem, > lack of accuracy on the order of 1% is unacceptable for > certain applications. That too. Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.21-rt2] PowerPC: decrementer clockevent driver
> So.. if we get enough clocksources into the tree, can any of those > parts of the code be reworked to use clocksources/clockevents and > hrtimers quickly and easily? I noticed the patch just posted does > some of it.. but not as much as Ben just mentioned. Well, some of these are expected to be small & fast and work in all sort of crazy circumstances, like udelay etc... I'd rather keep that on top of the TB. Do we have actual examples where the TB freq is changing ? Beside, on powerpc, we don't have another clock source that is as fast to access and we have userland using the TB for gettimeofday via the vdso, so I'd say bad idea ... Just keep the damn thing fixed frequency. > Or is it a development nightmare? > > I'm fairly sure on a PPC970 box even though the decrementer is > monotonic and never changes frequency, one day it just might, and > it would be better to anticipate this (and allow people to > distribute their timing requirements across an entire system > and not just the CPU core anyway, which I think is probably a > good thing from a system integration and possibly the point of > view of redundancy..) On a -sane- 970 box (which seems to be the case of all of them that matter so far), the TB is sourced externally specifically for that reason : to avoid it changing, The DEC is always derived the TB, so it's not changing. I don't have any plan to support somebody coming up with a HW design broken enough to have a variable TB/DEC speed. If they do it, they support it and they come up with patches that are acceptable (hint: that will be hard !). Beside, it means the vDSO will not be useable for gettimeofday on such a platform, which means it will have to fallback to the syscall which is much slower. Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] Char: isicom, cleanup locking
isicom, cleanup locking don't spin processor when not needed (use sleep instead of delay). Don't release the lock when needed in next iteration -- this actually fixes a bug -- missing braces Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> --- commit af05316f4ba7503ae531f3afdb5264c10e3b8e2c tree 2fac39ab09e16f20329fc785beeb7607b6ed8bc9 parent a9dbc0b98956d548b1aee3f55b3799a12946ace4 author Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 21:32:42 +0200 committer Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 21:32:42 +0200 drivers/char/isicom.c | 65 - 1 files changed, 27 insertions(+), 38 deletions(-) diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 761f777..b133b92 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -243,17 +243,18 @@ static inline int WaitTillCardIsFree(u16 base) static int lock_card(struct isi_board *card) { - charretries; unsigned long base = card->base; + unsigned int retries, a; - for (retries = 0; retries < 100; retries++) { + for (retries = 0; retries < 10; retries++) { spin_lock_irqsave(&card->card_lock, card->flags); - if (inw(base + 0xe) & 0x1) { - return 1; - } else { - spin_unlock_irqrestore(&card->card_lock, card->flags); - udelay(1000); /* 1ms */ + for (a = 0; a < 10; a++) { + if (inw(base + 0xe) & 0x1) + return 1; + udelay(10); } + spin_unlock_irqrestore(&card->card_lock, card->flags); + msleep(10); } printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", card->base); @@ -261,23 +262,6 @@ static int lock_card(struct isi_board *card) return 0; /* Failed to acquire the card! */ } -static int lock_card_at_interrupt(struct isi_board *card) -{ - unsigned char retries; - unsigned long base = card->base; - - for (retries = 0; retries < 200; retries++) { - spin_lock_irqsave(&card->card_lock, card->flags); - - if (inw(base + 0xe) & 0x1) - return 1; - else - spin_unlock_irqrestore(&card->card_lock, card->flags); - } - /* Failing in interrupt is an acceptable event */ - return 0; /* Failed to acquire the card! */ -} - static void unlock_card(struct isi_board *card) { spin_unlock_irqrestore(&card->card_lock, card->flags); @@ -415,6 +399,8 @@ static inline int __isicom_paranoia_check(struct isi_port const *port, static void isicom_tx(unsigned long _data) { + unsigned long flags; + unsigned int retries; short count = (BOARD_COUNT-1), card, base; short txcount, wrd, residue, word_count, cnt; struct isi_port *port; @@ -435,32 +421,34 @@ static void isicom_tx(unsigned long _data) count = isi_card[card].port_count; port = isi_card[card].ports; base = isi_card[card].base; + + spin_lock_irqsave(&isi_card[card].card_lock, flags); + for (retries = 0; retries < 100; retries++) { + if (inw(base + 0xe) & 0x1) + break; + udelay(2); + } + if (retries >= 100) + goto unlock; + for (;count > 0;count--, port++) { - if (!lock_card_at_interrupt(&isi_card[card])) - continue; /* port not active or tx disabled to force flow control */ if (!(port->flags & ASYNC_INITIALIZED) || !(port->status & ISI_TXOK)) - unlock_card(&isi_card[card]); continue; tty = port->tty; - - if (tty == NULL) { - unlock_card(&isi_card[card]); + if (tty == NULL) continue; - } txcount = min_t(short, TX_SIZE, port->xmit_cnt); - if (txcount <= 0 || tty->stopped || tty->hw_stopped) { - unlock_card(&isi_card[card]); + if (txcount <= 0 || tty->stopped || tty->hw_stopped) continue; - } - if (!(inw(base + 0x02) & (1 << port->channel))) { - unlock_card(&isi_card[card]); + + if (!(inw(base + 0x02) & (1 << port->channel))) continue; - } + pr_dbg("txing %d bytes, port%d.\n", txcount, port->channel + 1); outw((port->channel << isi_card[card].shift_count) | txcount, @@ -508,9 +496,10 @@ static void isicom_tx(unsigned long _data) port->status &= ~ISI_TXOK; if (port->xmit_cnt <= WAKEUP_CHARS)
[PATCH 2/3] Char: isicom, del_timer at exit
isicom, del_timer at exit Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> --- commit 017f1314b3de8cf20bfff7df0d3d55e6498de104 tree 938fec328f3b24588575540771f65c8fadeaf961 parent af05316f4ba7503ae531f3afdb5264c10e3b8e2c author Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 21:43:42 +0200 committer Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 21:43:42 +0200 drivers/char/isicom.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index b133b92..2f8aaf8 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -171,9 +171,6 @@ static struct pci_driver isicom_driver = { static int prev_card = 3; /* start servicing isi_card[0] */ static struct tty_driver *isicom_normal; -static DECLARE_COMPLETION(isi_timerdone); -static char re_schedule = 1; - static void isicom_tx(unsigned long _data); static void isicom_start(struct tty_struct *tty); @@ -502,11 +499,6 @@ unlock: spin_unlock_irqrestore(&isi_card[card].card_lock, flags); /* schedule another tx for hopefully in about 10ms */ sched_again: - if (!re_schedule) { - complete(&isi_timerdone); - return; - } - mod_timer(&tx, jiffies + msecs_to_jiffies(10)); } @@ -1890,9 +1882,7 @@ error: static void __exit isicom_exit(void) { - re_schedule = 0; - - wait_for_completion_timeout(&isi_timerdone, HZ); + del_timer_sync(&tx); pci_unregister_driver(&isicom_driver); tty_unregister_driver(isicom_normal); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] Char: isicom, proper variables types
isicom, proper variables types irq is int, base is unsigned long Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> --- commit 2c1fb6b2f7c17ab752e56220a0b7e84fbe6d3448 tree 1b4ceff6aacaae2ad1548c2efa202d7d0c3d92ba parent 017f1314b3de8cf20bfff7df0d3d55e6498de104 author Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 23:20:41 +0200 committer Jiri Slaby <[EMAIL PROTECTED]> Sun, 20 May 2007 23:20:41 +0200 drivers/char/isicom.c | 18 +++--- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 2f8aaf8..77a7a4a 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -184,7 +184,7 @@ static signed char linuxb_to_isib[] = { struct isi_board { unsigned long base; - unsigned char irq; + int irq; unsigned char port_count; unsigned short status; unsigned short port_status; /* each bit for each port */ @@ -224,7 +224,7 @@ static struct isi_port isi_ports[PORT_COUNT]; * it wants to talk. */ -static inline int WaitTillCardIsFree(u16 base) +static inline int WaitTillCardIsFree(unsigned long base) { unsigned int count = 0; unsigned int a = in_atomic(); /* do we run under spinlock? */ @@ -396,9 +396,9 @@ static inline int __isicom_paranoia_check(struct isi_port const *port, static void isicom_tx(unsigned long _data) { - unsigned long flags; + unsigned long flags, base; unsigned int retries; - short count = (BOARD_COUNT-1), card, base; + short count = (BOARD_COUNT-1), card; short txcount, wrd, residue, word_count, cnt; struct isi_port *port; struct tty_struct *tty; @@ -1730,17 +1730,13 @@ static unsigned int card_count; static int __devinit isicom_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { - unsigned int ioaddr, signature, index; + unsigned int signature, index; int retval = -EPERM; - u8 pciirq; struct isi_board *board = NULL; if (card_count >= BOARD_COUNT) goto err; - ioaddr = pci_resource_start(pdev, 3); - /* i.e at offset 0x1c in the PCI configuration register space. */ - pciirq = pdev->irq; dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device); /* allot the first empty slot in the array */ @@ -1751,8 +1747,8 @@ static int __devinit isicom_probe(struct pci_dev *pdev, } board->index = index; - board->base = ioaddr; - board->irq = pciirq; + board->base = pci_resource_start(pdev, 3); + board->irq = pdev->irq; card_count++; pci_set_drvdata(pdev, board); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
> > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > + case SIGSYS: > > > + case SIGSTKFLT: > > Unconditional? That's definitely a very bad idea. If anything only unhandled > > signals should be printed this way because some programs use them > > internally. > Use these signals internally? Afaik these are fatal, stopping the > process. So using them internally would be a little tricky. > > But I think your list is far too long anyways. > > So, which ones would you like to have removed then? (and why, of course, to enlighten me: some are educated guesses) Folkert van Heusden -- MultiTail ist eine flexible Applikation um Logfiles und Kommando Eingaben zu überprüfen. Inkl. Filter, Farben, Zusammenführen, Ansichten etc. http://www.vanheusden.com/multitail/ -- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
> > + switch(sig) { > > + case SIGQUIT: > > + case SIGILL: > > + case SIGTRAP: > > + case SIGABRT: > > + case SIGBUS: > > + case SIGFPE: > > + case SIGSEGV: > > + case SIGXCPU: > > + case SIGXFSZ: > > + case SIGSYS: > > + case SIGSTKFLT: > > Unconditional? That's definitely a very bad idea. If anything only unhandled > signals should be printed this way because some programs use them internally. Use these signals internally? Afaik these are fatal, stopping the process. So using them internally would be a little tricky. > But I think your list is far too long anyways. So, which ones would you like to have removed then? Folkert van Heusden -- To MultiTail einai ena polymorfiko ergaleio gia ta logfiles kai tin eksodo twn entolwn. Prosferei: filtrarisma, xrwmatismo, sygxwneysi, diaforetikes provoles. http://www.vanheusden.com/multitail/ -- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 01/10] SLUB: add support for kmem_cache_ops
Christoph Lameter wrote: Yeah earlier versions did this but then I have to do a patch that changes all destructors and all kmem_cache_create calls in the kernel. Yes, please ;-) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Factor out common MODULE_INFO content from module*.h files.
On Sun, 20 May 2007, Sam Ravnborg wrote: > On Sun, May 20, 2007 at 04:06:40PM -0400, Robert P. J. Day wrote: > > On Sun, 20 May 2007, Sam Ravnborg wrote: > > > > > On Sun, May 20, 2007 at 03:06:15PM -0400, Robert P. J. Day wrote: > > > > > > > > In order to eventually break the interdependency between the module.h > > > > and moduleparam.h header files, factor out the common MODULE_INFO > > > > content into a new header file. > > > > > > The moduleinfo.h file looks redundant at first look. Why not push > > > relevant parts from moduleparam.h (the MODULE_INFO bits) to module.h > > > and let go of the include of moduleparam.h in module.h (when you > > > have fixed the users)? > > > > > > In this way we do not add an extra .h file. And files that needs > > > moduleparam.h will anyway always need module.h. But not the other > > > way around. > > > > crap, now i remember why i did it the way i did it. > > > > yes, the way you describe it is a simpler solution, but it would break > > all of the files in the tree that use module parameters and have > > included *only* module.h, and have been getting away with it all this > > time only because module.h currently includes moduleparam.h. > > > > based on a simple script i have, there are currently 583 files under > > the drivers/ directory *alone* that are like that. that is, 583 files > > that would need to include moduleparam.h instead of module.h simply to > > continue to compile if the obvious header file fix were made. > The pain is too high for this. Is seems worthwhile to make the > change to module.h but adding an additional include to > 500 drivers > is not worth it. under the circumstances, is there *any* cleanup worth doing WRT to this issue? because of the fact that module.h currently includes moduleparam.h, developers have been able to get away with being incredibly sloppy in their includes. based on a short script i wrote, here are some stats for the drivers/ directory: $ . ../moduleparam.sh drivers Number of source files found: 5042 Number of files that include module.h: 3788 Number of files that include moduleparam.h: 358 Number of files that include both: 347 Number of files that include ONLY module.h: 3440 Number of files that include ONLY moduleparam.h: 10 Number of files needing moduleparam.h: 583 Number of files with unnecessary moduleparam.h: 45 interpreting the above: * there are 347 files that include both module.h and moduleparam.h when (at the moment) they need to include only the former, * there are 10 files that include *only* moduleparam.h (which does not include module.h, so how the heck *those* still build is a mystery), * there are 583 files that use module parameters in some way that don't include moduleparam.h, and * conversely, there are 45 source files that unnecessarily include moduleparam.h when they don't use module parameters at all. at this point, you may be right. trying to fix this may be more grief than it's worth. rday -- Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: signals logged / [RFC] log out-of-virtual-memory events
> + switch(sig) { > + case SIGQUIT: > + case SIGILL: > + case SIGTRAP: > + case SIGABRT: > + case SIGBUS: > + case SIGFPE: > + case SIGSEGV: > + case SIGXCPU: > + case SIGXFSZ: > + case SIGSYS: > + case SIGSTKFLT: Unconditional? That's definitely a very bad idea. If anything only unhandled signals should be printed this way because some programs use them internally. But I think your list is far too long anyways. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/