diff -urN linux-2.4.29/arch/ppc/kernel/head_8xx.S linux-2.4.29-hf1/arch/ppc/kernel/head_8xx.S --- linux-2.4.29/arch/ppc/kernel/head_8xx.S 2004-02-18 14:36:30.000000000 +0100 +++ linux-2.4.29-hf1/arch/ppc/kernel/head_8xx.S 2005-02-03 19:26:23.000000000 +0100 @@ -338,13 +338,13 @@ 3: lwz r21, 0(r20) /* Get the level 1 entry */ rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */ - beq 2f /* If zero, don't try to find a pte */ /* We have a pte table, so load the MI_TWC with the attributes * for this "segment." */ tophys(r21,r21) ori r21,r21,1 /* Set valid bit */ + beq- 2f /* If zero, don't try to find a pte */ #ifdef CONFIG_8xx_CPU6 li r3, 0x2b80 stw r3, 12(r0) @@ -369,7 +369,7 @@ * set. All other Linux PTE bits control the behavior * of the MMU. */ - li r21, 0x00f0 +2: li r21, 0x00f0 rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ #ifdef CONFIG_8xx_CPU6 @@ -388,15 +388,6 @@ #endif rfi -2: mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) -#ifdef CONFIG_8xx_CPU6 - lwz r3, 8(r0) -#endif - b InstructionAccess - . = 0x1200 DataStoreTLBMiss: #ifdef CONFIG_8xx_CPU6 @@ -422,12 +413,12 @@ 3: lwz r21, 0(r20) /* Get the level 1 entry */ rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */ - beq 2f /* If zero, don't try to find a pte */ /* We have a pte table, so load fetch the pte from the table. */ tophys(r21, r21) ori r21, r21, 1 /* Set valid bit in physical L2 page */ + beq- 2f /* If zero, don't try to find a pte */ #ifdef CONFIG_8xx_CPU6 li r3, 0x3b80 stw r3, 12(r0) @@ -461,7 +452,7 @@ * set. All other Linux PTE bits control the behavior * of the MMU. */ - li r21, 0x00f0 +2: li r21, 0x00f0 rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ #ifdef CONFIG_8xx_CPU6 @@ -480,24 +471,6 @@ #endif rfi -2: - /* Copy 20 msb from MD_EPN to DAR since the dcxx instructions fail - * to update DAR when they cause a DTLB miss. - */ - mfspr r21, MD_EPN - mfspr r20, DAR - rlwimi r20, r21, 0, 0, 19 - mtspr DAR, r20 - - mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) -#ifdef CONFIG_8xx_CPU6 - lwz r3, 8(r0) -#endif - b DataAccess - /* This is an instruction TLB error on the MPC8xx. This could be due * to many reasons, such as executing guarded memory or illegal instruction * addresses. There is nothing to do but handle a big time error fault. diff -urN linux-2.4.29/arch/sparc64/lib/atomic.S linux-2.4.29-hf1/arch/sparc64/lib/atomic.S --- linux-2.4.29/arch/sparc64/lib/atomic.S 2001-12-21 18:41:53.000000000 +0100 +++ linux-2.4.29-hf1/arch/sparc64/lib/atomic.S 2005-02-03 19:26:23.000000000 +0100 @@ -7,21 +7,34 @@ #include .text - .align 64 .globl atomic_impl_begin, atomic_impl_end +atomic_impl_begin: + /* We use these stubs for the uncommon case + * of contention on the atomic value. This is + * so that we can keep the main fast path 8 + * instructions long and thus fit into a single + * L2 cache line. + */ +__atomic_add_membar: + ba,pt %xcc, __atomic_add + membar #StoreLoad | #StoreStore + +__atomic_sub_membar: + ba,pt %xcc, __atomic_sub + membar #StoreLoad | #StoreStore + .align 64 .globl __atomic_add -atomic_impl_begin: __atomic_add: /* %o0 = increment, %o1 = atomic_ptr */ lduw [%o1], %g5 add %g5, %o0, %g7 cas [%o1], %g5, %g7 cmp %g5, %g7 - bne,pn %icc, __atomic_add - membar #StoreLoad | #StoreStore + bne,pn %icc, __atomic_add_membar + add %g7, %o0, %g7 retl - add %g7, %o0, %o0 + sra %g7, 0, %o0 .globl __atomic_sub __atomic_sub: /* %o0 = increment, %o1 = atomic_ptr */ @@ -29,8 +42,8 @@ sub %g5, %o0, %g7 cas [%o1], %g5, %g7 cmp %g5, %g7 - bne,pn %icc, __atomic_sub - membar #StoreLoad | #StoreStore + bne,pn %icc, __atomic_sub_membar + sub %g7, %o0, %g7 retl - sub %g7, %o0, %o0 + sra %g7, 0, %o0 atomic_impl_end: diff -urN linux-2.4.29/drivers/char/lcd.c linux-2.4.29-hf1/drivers/char/lcd.c --- linux-2.4.29/drivers/char/lcd.c 2005-01-27 18:57:32.000000000 +0100 +++ linux-2.4.29-hf1/drivers/char/lcd.c 2005-02-03 19:26:23.000000000 +0100 @@ -386,6 +386,8 @@ int ctr=0; + if (!capable(CAP_SYS_ADMIN)) return -EPERM; + // Chip Erase Sequence WRITE_FLASH( kFlash_Addr1, kFlash_Data1 ); WRITE_FLASH( kFlash_Addr2, kFlash_Data2 ); @@ -422,6 +424,8 @@ struct lcd_display display; + if (!capable(CAP_SYS_ADMIN)) return -EPERM; + if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display))) return -EFAULT; rom = (unsigned char *) kmalloc((128),GFP_ATOMIC); @@ -434,8 +438,10 @@ save_flags(flags); for (i=0; ihdr.first_track != CDROM_LEADOUT) { /* Read the multisession information. */ - stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp, + stat = cdrom_read_tocentry(drive, 0, 0, 1, (char *)&ms_tmp, sizeof(ms_tmp), sense); if (stat) return stat; + + toc->last_session_lba = be32_to_cpu(ms_tmp.ent.addr.lba); } else { - ms_tmp.ent.addr.msf.minute = 0; - ms_tmp.ent.addr.msf.second = 2; - ms_tmp.ent.addr.msf.frame = 0; ms_tmp.hdr.first_track = ms_tmp.hdr.last_track = CDROM_LEADOUT; + toc->last_session_lba = msf_to_lba(0, 2, 0); /* 0m 2s 0f */ } #if ! STANDARD_ATAPI - if (CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd) + if (CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd) { + /* Re-read multisession information using MSF format */ + stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp, + sizeof(ms_tmp), sense); + if (stat) + return stat; + msf_from_bcd (&ms_tmp.ent.addr.msf); + toc->last_session_lba = msf_to_lba(ms_tmp.ent.addr.msf.minute, + ms_tmp.ent.addr.msf.second, + ms_tmp.ent.addr.msf.frame); + } #endif /* not STANDARD_ATAPI */ - toc->last_session_lba = msf_to_lba (ms_tmp.ent.addr.msf.minute, - ms_tmp.ent.addr.msf.second, - ms_tmp.ent.addr.msf.frame); - toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track); /* Now try to get the total cdrom capacity. */ diff -urN linux-2.4.29/drivers/md/lvm-snap.c linux-2.4.29-hf1/drivers/md/lvm-snap.c --- linux-2.4.29/drivers/md/lvm-snap.c 2004-04-14 15:05:30.000000000 +0200 +++ linux-2.4.29-hf1/drivers/md/lvm-snap.c 2005-02-03 19:26:23.000000000 +0100 @@ -119,7 +119,6 @@ unsigned long mask = lv->lv_snapshot_hash_mask; int chunk_size = lv->lv_chunk_size; lv_block_exception_t *ret; - int i = 0; hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)]; @@ -132,15 +131,9 @@ exception = list_entry(next, lv_block_exception_t, hash); if (exception->rsector_org == org_start && exception->rdev_org == org_dev) { - if (i) { - /* fun, isn't it? :) */ - list_del(next); - list_add(next, hash_table); - } ret = exception; break; } - i++; } return ret; } diff -urN linux-2.4.29/drivers/scsi/libata-scsi.c linux-2.4.29-hf1/drivers/scsi/libata-scsi.c --- linux-2.4.29/drivers/scsi/libata-scsi.c 2005-01-27 18:57:33.000000000 +0100 +++ linux-2.4.29-hf1/drivers/scsi/libata-scsi.c 2005-02-03 19:26:23.000000000 +0100 @@ -283,7 +283,8 @@ /* No immediate match */ if(err) printk(KERN_DEBUG "ata%u: no sense translation for 0x%02x\n", qc->ap->id, err); - + + i = 0; /* Fall back to interpreting status bits */ while(stat_table[i][0] != 0xFF) { diff -urN linux-2.4.29/drivers/scsi/megaraid2.c linux-2.4.29-hf1/drivers/scsi/megaraid2.c --- linux-2.4.29/drivers/scsi/megaraid2.c 2004-11-17 12:54:21.000000000 +0100 +++ linux-2.4.29-hf1/drivers/scsi/megaraid2.c 2005-02-03 19:26:23.000000000 +0100 @@ -2819,7 +2819,7 @@ } if( iter++ < MBOX_ABORT_SLEEP*1000 ) { - mdelay(1); + msleep(1); } else { printk(KERN_WARNING @@ -2899,7 +2899,7 @@ } if( iter++ < MBOX_RESET_SLEEP*1000 ) { - mdelay(1); + msleep(1); } else { printk(KERN_WARNING @@ -4040,10 +4040,10 @@ printk(KERN_INFO "megaraid: cache flush delay: "); for( i = 9; i >= 0; i-- ) { printk("\b\b\b[%d]", i); - mdelay(1000); + msleep(1000); } printk("\b\b\b[done]\n"); - mdelay(1000); + msleep(1000); return NOTIFY_DONE; } diff -urN linux-2.4.29/drivers/usb/hiddev.c linux-2.4.29-hf1/drivers/usb/hiddev.c --- linux-2.4.29/drivers/usb/hiddev.c 2004-08-08 01:26:05.000000000 +0200 +++ linux-2.4.29-hf1/drivers/usb/hiddev.c 2005-02-03 19:26:23.000000000 +0100 @@ -328,6 +328,7 @@ } schedule(); + set_current_state(TASK_INTERRUPTIBLE); } set_current_state(TASK_RUNNING); diff -urN linux-2.4.29/net/core/neighbour.c linux-2.4.29-hf1/net/core/neighbour.c --- linux-2.4.29/net/core/neighbour.c 2005-01-27 18:57:34.000000000 +0100 +++ linux-2.4.29-hf1/net/core/neighbour.c 2005-02-03 19:26:23.000000000 +0100 @@ -1469,6 +1469,7 @@ nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ndm)); ndm = NLMSG_DATA(nlh); + nlh->nlmsg_flags = pid ? NLM_F_MULTI : 0; ndm->ndm_family = n->ops->family; ndm->ndm_flags = n->flags; ndm->ndm_type = n->type; diff -urN linux-2.4.29/scripts/Configure linux-2.4.29-hf1/scripts/Configure --- linux-2.4.29/scripts/Configure 2003-06-13 16:51:39.000000000 +0200 +++ linux-2.4.29-hf1/scripts/Configure 2005-02-03 19:26:23.000000000 +0100 @@ -378,15 +378,18 @@ function hex () { old=$(eval echo "\${$2}") def=${old:-$3} - def=${def#*[x,X]} while :; do readln "$1 ($2) [$def] " "$def" "$old" - ans=${ans#*[x,X]} - if expr "$ans" : '[0-9a-fA-F][0-9a-fA-F]*$' > /dev/null; then + if expr "$ans" : '0x[0-9a-fA-F][0-9a-fA-F]*$' > /dev/null; then define_hex "$2" "$ans" break else - help "$2" + if expr "$ans" : '[0-9a-fA-F][0-9a-fA-F]*$' > /dev/null; then + define_hex "$2" "0x$ans" + break + else + help "$2" + fi fi done }