]> err.no Git - linux-2.6/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 26 Oct 2006 03:20:41 +0000 (20:20 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 26 Oct 2006 03:20:41 +0000 (20:20 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] users: Select ECB/CBC where needed

72 files changed:
arch/arm/mach-ixp2000/ixdp2400.c
arch/arm/mach-lh7a40x/Kconfig
arch/powerpc/boot/Makefile
arch/powerpc/configs/cell_defconfig
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/module_32.c
arch/powerpc/kernel/module_64.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vdso32/vdso32.lds.S
arch/powerpc/kernel/vdso64/gettimeofday.S
arch/powerpc/kernel/vdso64/vdso64.lds.S
arch/powerpc/oprofile/op_model_power4.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/cell/spufs/hw_ops.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/powermac/sleep.S
arch/powerpc/sysdev/i8259.c
arch/powerpc/sysdev/ipic.c
arch/powerpc/sysdev/qe_lib/ucc.c
arch/powerpc/sysdev/qe_lib/ucc_fast.c
arch/powerpc/sysdev/qe_lib/ucc_slow.c
arch/powerpc/sysdev/tsi108_dev.c
arch/ppc/boot/simple/relocate.S
arch/ppc/kernel/misc.S
arch/ppc/kernel/setup.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/mconsole_user.c
arch/um/include/mconsole.h
drivers/atm/horizon.c
drivers/misc/Kconfig
drivers/misc/ioc4.c
drivers/mmc/tifm_sd.c
drivers/net/wireless/bcm43xx/bcm43xx_dma.h
drivers/video/backlight/corgi_bl.c
include/asm-arm/arch-pxa/irqs.h
include/asm-powerpc/asm-compat.h
include/asm-powerpc/cputable.h
include/asm-powerpc/firmware.h
include/asm-powerpc/i8259.h
include/asm-powerpc/ppc_asm.h
include/asm-powerpc/prom.h
include/asm-powerpc/reg.h
include/asm-powerpc/time.h
include/asm-powerpc/timex.h
net/dccp/Kconfig
net/dccp/ackvec.c
net/dccp/ackvec.h
net/dccp/ccids/Kconfig
net/dccp/ccids/ccid2.c
net/dccp/ccids/ccid3.c
net/dccp/dccp.h
net/dccp/input.c
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/options.c
net/ipv4/ipconfig.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_rt.c
net/xfrm/xfrm_state.c
scripts/mod/modpost.c
sound/pci/intel8x0.c

index 9ee63834e6031839a7776492adaa734d5a27347b..0fdd03ab36e6c4cbbcfd7da57a7cb8c4d8684c68 100644 (file)
@@ -135,11 +135,11 @@ static void ixdp2400_pci_postinit(void)
        if (ixdp2x00_master_npu()) {
                dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
                pci_remove_bus_device(dev);
-               pci_dev_put(dev)
+               pci_dev_put(dev);
        } else {
                dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN);
                pci_remove_bus_device(dev);
-               pci_dev_put(dev)
+               pci_dev_put(dev);
 
                ixdp2x00_slave_pci_postinit();
        }
index 558a34f53b1c7f8bcdbce50bcad11f9f8c14b48b..147b01928a9b49b612e7ae3bf16c3d2d84f816c6 100644 (file)
@@ -14,7 +14,7 @@ config MACH_LPD7A400
        bool "LPD7A400 Card Engine"
        select ARCH_LH7A400
 #      select IDE_POLL
-       select HAS_TOUCHSCREEN_ADS7843_LH7
+#      select HAS_TOUCHSCREEN_ADS7843_LH7
        help
          Say Y here if you are using Logic Product Development's
          LPD7A400 CardEngine.  For the time being, the LPD7A400 and
@@ -24,7 +24,7 @@ config MACH_LPD7A404
        bool "LPD7A404 Card Engine"
        select ARCH_LH7A404
 #      select IDE_POLL
-       select HAS_TOUCHSCREEN_ADC_LH7
+#      select HAS_TOUCHSCREEN_ADC_LH7
        help
          Say Y here if you are using Logic Product Development's
          LPD7A404 CardEngine. For the time being, the LPD7A400 and
index 37ddfcab000330ab360e3a6727ee26d22ef638f1..4b2be611f77f350c44304731ccf0a065520d7702 100644 (file)
@@ -115,7 +115,7 @@ endif
 quiet_cmd_wrap = WRAP    $@
       cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) vmlinux
 quiet_cmd_wrap_initrd = WRAP    $@
-      cmd_wrap_initrd =$(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
+      cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
                                -i $(obj)/ramdisk.image.gz vmlinux
 
 $(obj)/zImage.chrp: vmlinux $(wrapperbits)
index 892d5dd3254e3dc1ced10e570f7e478599e7eb7f..0aba06d7d2eccad8215c096e2b9e8502d96c49f2 100644 (file)
@@ -254,6 +254,7 @@ CONFIG_SYN_COOKIES=y
 CONFIG_INET_TUNNEL=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+# CONFIG_INET_XFRM_MODE_BEET is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -275,7 +276,9 @@ CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
 CONFIG_INET6_XFRM_MODE_TRANSPORT=y
 CONFIG_INET6_XFRM_MODE_TUNNEL=y
+# CONFIG_INET6_XFRM_MODE_BEET is not set
 # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
 CONFIG_IPV6_TUNNEL=m
 # CONFIG_IPV6_SUBTREES is not set
 # CONFIG_IPV6_MULTIPLE_TABLES is not set
@@ -405,6 +408,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -738,7 +747,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -802,6 +810,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -809,15 +818,10 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -923,6 +927,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -930,6 +935,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1129,6 +1135,7 @@ CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_FORCED_INLINING is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
index 95382f99440475b097420a322031b5293858492a..bfd499ee37530807a070886409b03a504ccca8e9 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <asm/oprofile_impl.h>
 #include <asm/cputable.h>
+#include <asm/prom.h>          /* for PTRRELOC on ARCH=ppc */
 
 struct cpu_spec* cur_cpu_spec = NULL;
 EXPORT_SYMBOL(cur_cpu_spec);
@@ -73,7 +74,7 @@ extern void __restore_cpu_ppc970(void);
 #define PPC_FEATURE_SPE_COMP   0
 #endif
 
-struct cpu_spec        cpu_specs[] = {
+static struct cpu_spec cpu_specs[] = {
 #ifdef CONFIG_PPC64
        {       /* Power3 */
                .pvr_mask               = 0xffff0000,
@@ -227,6 +228,21 @@ struct cpu_spec    cpu_specs[] = {
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .platform               = "ppc970",
        },
+       {       /* PPC970GX */
+               .pvr_mask               = 0xffff0000,
+               .pvr_value              = 0x00450000,
+               .cpu_name               = "PPC970GX",
+               .cpu_features           = CPU_FTRS_PPC970,
+               .cpu_user_features      = COMMON_USER_POWER4 |
+                       PPC_FEATURE_HAS_ALTIVEC_COMP,
+               .icache_bsize           = 128,
+               .dcache_bsize           = 128,
+               .num_pmcs               = 8,
+               .cpu_setup              = __setup_cpu_ppc970,
+               .oprofile_cpu_type      = "ppc64/970",
+               .oprofile_type          = PPC_OPROFILE_POWER4,
+               .platform               = "ppc970",
+       },
        {       /* Power5 GR */
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x003a0000,
@@ -1152,3 +1168,71 @@ struct cpu_spec  cpu_specs[] = {
 #endif /* !CLASSIC_PPC */
 #endif /* CONFIG_PPC32 */
 };
+
+struct cpu_spec *identify_cpu(unsigned long offset)
+{
+       struct cpu_spec *s = cpu_specs;
+       struct cpu_spec **cur = &cur_cpu_spec;
+       unsigned int pvr = mfspr(SPRN_PVR);
+       int i;
+
+       s = PTRRELOC(s);
+       cur = PTRRELOC(cur);
+
+       if (*cur != NULL)
+               return PTRRELOC(*cur);
+
+       for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
+               if ((pvr & s->pvr_mask) == s->pvr_value) {
+                       *cur = cpu_specs + i;
+#ifdef CONFIG_PPC64
+                       /* ppc64 expects identify_cpu to also call setup_cpu
+                        * for that processor. I will consolidate that at a
+                        * later time, for now, just use our friend #ifdef.
+                        * we also don't need to PTRRELOC the function pointer
+                        * on ppc64 as we are running at 0 in real mode.
+                        */
+                       if (s->cpu_setup) {
+                               s->cpu_setup(offset, s);
+                       }
+#endif /* CONFIG_PPC64 */
+                       return s;
+               }
+       BUG();
+       return NULL;
+}
+
+void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+{
+       struct fixup_entry {
+               unsigned long   mask;
+               unsigned long   value;
+               long            start_off;
+               long            end_off;
+       } *fcur, *fend;
+
+       fcur = fixup_start;
+       fend = fixup_end;
+
+       for (; fcur < fend; fcur++) {
+               unsigned int *pstart, *pend, *p;
+
+               if ((value & fcur->mask) == fcur->value)
+                       continue;
+
+               /* These PTRRELOCs will disappear once the new scheme for
+                * modules and vdso is implemented
+                */
+               pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
+               pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
+
+               for (p = pstart; p < pend; p++) {
+                       *p = 0x60000000u;
+                       asm volatile ("dcbst 0, %0" : : "r" (p));
+               }
+               asm volatile ("sync" : : : "memory");
+               for (p = pstart; p < pend; p++)
+                       asm volatile ("icbi 0,%0" : : "r" (p));
+               asm volatile ("sync; isync" : : : "memory");
+       }
+}
index 645c7f10fb28300b782334e4c264602d80718877..291e3629b5046e67caea8b9dbbbbbb70ca1eca15 100644 (file)
@@ -1580,11 +1580,6 @@ _STATIC(__start_initialization_iSeries)
        li      r0,0
        stdu    r0,-STACK_FRAME_OVERHEAD(r1)
 
-       LOAD_REG_IMMEDIATE(r3,cpu_specs)
-       LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)
-       li      r5,0
-       bl      .identify_cpu
-
        LOAD_REG_IMMEDIATE(r2,__toc_start)
        addi    r2,r2,0x4000
        addi    r2,r2,0x4000
@@ -1646,6 +1641,8 @@ _GLOBAL(__start_initialization_multiplatform)
        cmpwi   r0,0x3c         /* 970FX */
        beq     1f
        cmpwi   r0,0x44         /* 970MP */
+       beq     1f
+       cmpwi   r0,0x45         /* 970GX */
        bne     2f
 1:     bl      .__cpu_preinit_ppc970
 2:
@@ -1964,13 +1961,6 @@ _STATIC(start_here_multiplatform)
        addi    r2,r2,0x4000
        add     r2,r2,r26
 
-       LOAD_REG_IMMEDIATE(r3, cpu_specs)
-       add     r3,r3,r26
-       LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)
-       add     r4,r4,r26
-       mr      r5,r26
-       bl      .identify_cpu
-
        /* Do very early kernel initializations, including initial hash table,
         * stab and slb setup before we turn on relocation.     */
 
@@ -2000,13 +1990,6 @@ _STATIC(start_here_common)
        li      r0,0
        stdu    r0,-STACK_FRAME_OVERHEAD(r1)
 
-       /* Apply the CPUs-specific fixups (nop out sections not relevant
-        * to this CPU
-        */
-       li      r3,0
-       bl      .do_cpu_ftr_fixups
-       bl      .do_fw_ftr_fixups
-
        /* ptr to current */
        LOAD_REG_IMMEDIATE(r4, init_task)
        std     r4,PACACURRENT(r13)
index 88fd73fdf048aea647974a694f033653e93cd4f8..412bea3cf813279bd64d8820ed12e593327fa457 100644 (file)
@@ -101,80 +101,6 @@ _GLOBAL(reloc_got2)
        mtlr    r11
        blr
 
-/*
- * identify_cpu,
- * called with r3 = data offset and r4 = CPU number
- * doesn't change r3
- */
-_GLOBAL(identify_cpu)
-       addis   r8,r3,cpu_specs@ha
-       addi    r8,r8,cpu_specs@l
-       mfpvr   r7
-1:
-       lwz     r5,CPU_SPEC_PVR_MASK(r8)
-       and     r5,r5,r7
-       lwz     r6,CPU_SPEC_PVR_VALUE(r8)
-       cmplw   0,r6,r5
-       beq     1f
-       addi    r8,r8,CPU_SPEC_ENTRY_SIZE
-       b       1b
-1:
-       addis   r6,r3,cur_cpu_spec@ha
-       addi    r6,r6,cur_cpu_spec@l
-       sub     r8,r8,r3
-       stw     r8,0(r6)
-       blr
-
-/*
- * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
- * and writes nop's over sections of code that don't apply for this cpu.
- * r3 = data offset (not changed)
- */
-_GLOBAL(do_cpu_ftr_fixups)
-       /* Get CPU 0 features */
-       addis   r6,r3,cur_cpu_spec@ha
-       addi    r6,r6,cur_cpu_spec@l
-       lwz     r4,0(r6)
-       add     r4,r4,r3
-       lwz     r4,CPU_SPEC_FEATURES(r4)
-
-       /* Get the fixup table */
-       addis   r6,r3,__start___ftr_fixup@ha
-       addi    r6,r6,__start___ftr_fixup@l
-       addis   r7,r3,__stop___ftr_fixup@ha
-       addi    r7,r7,__stop___ftr_fixup@l
-
-       /* Do the fixup */
-1:     cmplw   0,r6,r7
-       bgelr
-       addi    r6,r6,16
-       lwz     r8,-16(r6)      /* mask */
-       and     r8,r8,r4
-       lwz     r9,-12(r6)      /* value */
-       cmplw   0,r8,r9
-       beq     1b
-       lwz     r8,-8(r6)       /* section begin */
-       lwz     r9,-4(r6)       /* section end */
-       subf.   r9,r8,r9
-       beq     1b
-       /* write nops over the section of code */
-       /* todo: if large section, add a branch at the start of it */
-       srwi    r9,r9,2
-       mtctr   r9
-       add     r8,r8,r3
-       lis     r0,0x60000000@h /* nop */
-3:     stw     r0,0(r8)
-       andi.   r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
-       beq     2f
-       dcbst   0,r8            /* suboptimal, but simpler */
-       sync
-       icbi    0,r8
-2:     addi    r8,r8,4
-       bdnz    3b
-       sync                    /* additional sync needed on g4 */
-       isync
-       b       1b
-
 /*
  * call_setup_cpu - call the setup_cpu function for this cpu
  * r3 = data offset, r24 = cpu number
index c70e20708a1f625347139f9a7caec7410544266f..21fd2c662a9913cc9ef8f3d0efe421c4907b8929 100644 (file)
@@ -246,130 +246,6 @@ _GLOBAL(__flush_dcache_icache)
        isync
        blr
 
-/*
- * identify_cpu and calls setup_cpu
- * In: r3 = base of the cpu_specs array
- *     r4 = address of cur_cpu_spec
- *     r5 = relocation offset
- */
-_GLOBAL(identify_cpu)
-       mfpvr   r7
-1:
-       lwz     r8,CPU_SPEC_PVR_MASK(r3)
-       and     r8,r8,r7
-       lwz     r9,CPU_SPEC_PVR_VALUE(r3)
-       cmplw   0,r9,r8
-       beq     1f
-       addi    r3,r3,CPU_SPEC_ENTRY_SIZE
-       b       1b
-1:
-       sub     r0,r3,r5
-       std     r0,0(r4)
-       ld      r4,CPU_SPEC_SETUP(r3)
-       cmpdi   0,r4,0
-       add     r4,r4,r5
-       beqlr
-       ld      r4,0(r4)
-       add     r4,r4,r5
-       mtctr   r4
-       /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
-       mr      r4,r3
-       mr      r3,r5
-       bctr
-
-/*
- * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
- * and writes nop's over sections of code that don't apply for this cpu.
- * r3 = data offset (not changed)
- */
-_GLOBAL(do_cpu_ftr_fixups)
-       /* Get CPU 0 features */
-       LOAD_REG_IMMEDIATE(r6,cur_cpu_spec)
-       sub     r6,r6,r3
-       ld      r4,0(r6)
-       sub     r4,r4,r3
-       ld      r4,CPU_SPEC_FEATURES(r4)
-       /* Get the fixup table */
-       LOAD_REG_IMMEDIATE(r6,__start___ftr_fixup)
-       sub     r6,r6,r3
-       LOAD_REG_IMMEDIATE(r7,__stop___ftr_fixup)
-       sub     r7,r7,r3
-       /* Do the fixup */
-1:     cmpld   r6,r7
-       bgelr
-       addi    r6,r6,32
-       ld      r8,-32(r6)      /* mask */
-       and     r8,r8,r4
-       ld      r9,-24(r6)      /* value */
-       cmpld   r8,r9
-       beq     1b
-       ld      r8,-16(r6)      /* section begin */
-       ld      r9,-8(r6)       /* section end */
-       subf.   r9,r8,r9
-       beq     1b
-       /* write nops over the section of code */
-       /* todo: if large section, add a branch at the start of it */
-       srwi    r9,r9,2
-       mtctr   r9
-       sub     r8,r8,r3
-       lis     r0,0x60000000@h /* nop */
-3:     stw     r0,0(r8)
-       andi.   r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
-       beq     2f
-       dcbst   0,r8            /* suboptimal, but simpler */
-       sync
-       icbi    0,r8
-2:     addi    r8,r8,4
-       bdnz    3b
-       sync                    /* additional sync needed on g4 */
-       isync
-       b       1b
-
-/*
- * do_fw_ftr_fixups - goes through the list of firmware feature fixups
- * and writes nop's over sections of code that don't apply for this firmware.
- * r3 = data offset (not changed)
- */
-_GLOBAL(do_fw_ftr_fixups)
-       /* Get firmware features */
-       LOAD_REG_IMMEDIATE(r6,powerpc_firmware_features)
-       sub     r6,r6,r3
-       ld      r4,0(r6)
-       /* Get the fixup table */
-       LOAD_REG_IMMEDIATE(r6,__start___fw_ftr_fixup)
-       sub     r6,r6,r3
-       LOAD_REG_IMMEDIATE(r7,__stop___fw_ftr_fixup)
-       sub     r7,r7,r3
-       /* Do the fixup */
-1:     cmpld   r6,r7
-       bgelr
-       addi    r6,r6,32
-       ld      r8,-32(r6)      /* mask */
-       and     r8,r8,r4
-       ld      r9,-24(r6)      /* value */
-       cmpld   r8,r9
-       beq     1b
-       ld      r8,-16(r6)      /* section begin */
-       ld      r9,-8(r6)       /* section end */
-       subf.   r9,r8,r9
-       beq     1b
-       /* write nops over the section of code */
-       /* todo: if large section, add a branch at the start of it */
-       srwi    r9,r9,2
-       mtctr   r9
-       sub     r8,r8,r3
-       lis     r0,0x60000000@h /* nop */
-3:     stw     r0,0(r8)
-BEGIN_FTR_SECTION
-       dcbst   0,r8            /* suboptimal, but simpler */
-       sync
-       icbi    0,r8
-END_FTR_SECTION_IFSET(CPU_FTR_SPLIT_ID_CACHE)
-       addi    r8,r8,4
-       bdnz    3b
-       sync                    /* additional sync needed on g4 */
-       isync
-       b       1b
 
 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
 /*
index 92f4e5f64f02c3e30c07fb34822a1e2a78318400..e2c3c6a85f33b4180cd8f9d812e831e2f4c4176c 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/kernel.h>
 #include <linux/cache.h>
 
+#include "setup.h"
+
 #if 0
 #define DEBUGP printk
 #else
@@ -269,33 +271,50 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
        return 0;
 }
 
+static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
+                                   const Elf_Shdr *sechdrs,
+                                   const char *name)
+{
+       char *secstrings;
+       unsigned int i;
+
+       secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+       for (i = 1; i < hdr->e_shnum; i++)
+               if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0)
+                       return &sechdrs[i];
+       return NULL;
+}
+
 int module_finalize(const Elf_Ehdr *hdr,
                    const Elf_Shdr *sechdrs,
                    struct module *me)
 {
-       char *secstrings;
-       unsigned int i;
+       const Elf_Shdr *sect;
 
        me->arch.bug_table = NULL;
        me->arch.num_bugs = 0;
 
        /* Find the __bug_table section, if present */
-       secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
-       for (i = 1; i < hdr->e_shnum; i++) {
-               if (strcmp(secstrings+sechdrs[i].sh_name, "__bug_table"))
-                       continue;
-               me->arch.bug_table = (void *) sechdrs[i].sh_addr;
-               me->arch.num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry);
-               break;
+       sect = find_section(hdr, sechdrs, "__bug_table");
+       if (sect != NULL) {
+               me->arch.bug_table = (void *) sect->sh_addr;
+               me->arch.num_bugs = sect->sh_size / sizeof(struct bug_entry);
        }
 
-       /*
+       /*
         * Strictly speaking this should have a spinlock to protect against
         * traversals, but since we only traverse on BUG()s, a spinlock
         * could potentially lead to deadlock and thus be counter-productive.
         */
        list_add(&me->arch.bug_list, &module_bug_list);
 
+       /* Apply feature fixups */
+       sect = find_section(hdr, sechdrs, "__ftr_fixup");
+       if (sect != NULL)
+               do_feature_fixups(cur_cpu_spec->cpu_features,
+                                 (void *)sect->sh_addr,
+                                 (void *)sect->sh_addr + sect->sh_size);
+
        return 0;
 }
 
index ba34001fca8e8420b6c1aab0df0f9b0a43de3bda..8dd1f0aae5d6265809748dcc0e0001b2a55e440e 100644 (file)
@@ -22,6 +22,9 @@
 #include <linux/vmalloc.h>
 #include <asm/module.h>
 #include <asm/uaccess.h>
+#include <asm/firmware.h>
+
+#include "setup.h"
 
 /* FIXME: We don't do .init separately.  To do this, we'd need to have
    a separate r2 value in the init and core section, and stub between
@@ -400,6 +403,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
                                | (value & 0x03fffffc);
                        break;
 
+               case R_PPC64_REL64:
+                       /* 64 bits relative (used by features fixups) */
+                       *location = value - (unsigned long)location;
+                       break;
+
                default:
                        printk("%s: Unknown ADD relocation: %lu\n",
                               me->name,
@@ -413,23 +421,33 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
 
 LIST_HEAD(module_bug_list);
 
-int module_finalize(const Elf_Ehdr *hdr,
-               const Elf_Shdr *sechdrs, struct module *me)
+static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
+                                   const Elf_Shdr *sechdrs,
+                                   const char *name)
 {
        char *secstrings;
        unsigned int i;
 
+       secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+       for (i = 1; i < hdr->e_shnum; i++)
+               if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0)
+                       return &sechdrs[i];
+       return NULL;
+}
+
+int module_finalize(const Elf_Ehdr *hdr,
+               const Elf_Shdr *sechdrs, struct module *me)
+{
+       const Elf_Shdr *sect;
+
        me->arch.bug_table = NULL;
        me->arch.num_bugs = 0;
 
        /* Find the __bug_table section, if present */
-       secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
-       for (i = 1; i < hdr->e_shnum; i++) {
-               if (strcmp(secstrings+sechdrs[i].sh_name, "__bug_table"))
-                       continue;
-               me->arch.bug_table = (void *) sechdrs[i].sh_addr;
-               me->arch.num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry);
-               break;
+       sect = find_section(hdr, sechdrs, "__bug_table");
+       if (sect != NULL) {
+               me->arch.bug_table = (void *) sect->sh_addr;
+               me->arch.num_bugs = sect->sh_size / sizeof(struct bug_entry);
        }
 
        /*
@@ -439,6 +457,19 @@ int module_finalize(const Elf_Ehdr *hdr,
         */
        list_add(&me->arch.bug_list, &module_bug_list);
 
+       /* Apply feature fixups */
+       sect = find_section(hdr, sechdrs, "__ftr_fixup");
+       if (sect != NULL)
+               do_feature_fixups(cur_cpu_spec->cpu_features,
+                                 (void *)sect->sh_addr,
+                                 (void *)sect->sh_addr + sect->sh_size);
+
+       sect = find_section(hdr, sechdrs, "__fw_ftr_fixup");
+       if (sect != NULL)
+               do_feature_fixups(powerpc_firmware_features,
+                                 (void *)sect->sh_addr,
+                                 (void *)sect->sh_addr + sect->sh_size);
+
        return 0;
 }
 
index 865b9648d0d57057fe1af797d67d6faea5345459..bdb412d4b74832fb62c4c530dffa6f7b8c635d25 100644 (file)
@@ -1014,7 +1014,7 @@ EXPORT_SYMBOL(find_all_nodes);
 /** Checks if the given "compat" string matches one of the strings in
  * the device's "compatible" property
  */
-int device_is_compatible(struct device_node *device, const char *compat)
+int device_is_compatible(const struct device_node *device, const char *compat)
 {
        const char* cp;
        int cplen, l;
@@ -1491,7 +1491,8 @@ static int __init prom_reconfig_setup(void)
 __initcall(prom_reconfig_setup);
 #endif
 
-struct property *of_find_property(struct device_node *np, const char *name,
+struct property *of_find_property(const struct device_node *np,
+                                 const char *name,
                                  int *lenp)
 {
        struct property *pp;
@@ -1512,7 +1513,8 @@ struct property *of_find_property(struct device_node *np, const char *name,
  * Find a property with a given name for a given node
  * and return the value.
  */
-const void *get_property(struct device_node *np, const char *name, int *lenp)
+const void *get_property(const struct device_node *np, const char *name,
+                        int *lenp)
 {
        struct property *pp = of_find_property(np,name,lenp);
        return pp ? pp->value : NULL;
index 191d0ab0922227908db8dc6fc3b0fefa53ed876d..a4c2964a3ca6b325f86a52eb1c7880c534ff43d7 100644 (file)
@@ -91,6 +91,7 @@ int ucache_bsize;
 unsigned long __init early_init(unsigned long dt_ptr)
 {
        unsigned long offset = reloc_offset();
+       struct cpu_spec *spec;
 
        /* First zero the BSS -- use memset_io, some platforms don't have
         * caches on yet */
@@ -100,8 +101,11 @@ unsigned long __init early_init(unsigned long dt_ptr)
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
         */
-       identify_cpu(offset, 0);
-       do_cpu_ftr_fixups(offset);
+       spec = identify_cpu(offset);
+
+       do_feature_fixups(spec->cpu_features,
+                         PTRRELOC(&__start___ftr_fixup),
+                         PTRRELOC(&__stop___ftr_fixup));
 
        return KERNELBASE + offset;
 }
index 4b2e32eab9dc3e6b50bea7ffdf52fcdcb229492d..16278968dab68e2153a284709e2b4dfdd067adb4 100644 (file)
@@ -170,6 +170,9 @@ void __init setup_paca(int cpu)
 
 void __init early_setup(unsigned long dt_ptr)
 {
+       /* Identify CPU type */
+       identify_cpu(0);
+
        /* Assume we're on cpu 0 for now. Don't write to the paca yet! */
        setup_paca(0);
 
@@ -348,6 +351,14 @@ void __init setup_system(void)
 {
        DBG(" -> setup_system()\n");
 
+       /* Apply the CPUs-specific and firmware specific fixups to kernel
+        * text (nop out sections not relevant to this CPU or this firmware)
+        */
+       do_feature_fixups(cur_cpu_spec->cpu_features,
+                         &__start___ftr_fixup, &__stop___ftr_fixup);
+       do_feature_fixups(powerpc_firmware_features,
+                         &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
+
        /*
         * Unflatten the device-tree passed by prom_init or kexec
         */
index 5b59bc18dfe7b76586cf10449c120a3e6e8e7f2c..a1b5e4b1615101d448bd52e437b6b7866756fefc 100644 (file)
@@ -220,11 +220,8 @@ static void account_process_time(struct pt_regs *regs)
  */
 struct cpu_purr_data {
        int     initialized;                    /* thread is running */
-       u64     tb0;                    /* timebase at origin time */
-       u64     purr0;                  /* PURR at origin time */
        u64     tb;                     /* last TB value read */
        u64     purr;                   /* last PURR value read */
-       u64     stolen;                 /* stolen time so far */
        spinlock_t lock;
 };
 
@@ -234,10 +231,8 @@ static void snapshot_tb_and_purr(void *data)
 {
        struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
 
-       p->tb0 = mftb();
-       p->purr0 = mfspr(SPRN_PURR);
-       p->tb = p->tb0;
-       p->purr = 0;
+       p->tb = mftb();
+       p->purr = mfspr(SPRN_PURR);
        wmb();
        p->initialized = 1;
 }
@@ -258,37 +253,24 @@ void snapshot_timebases(void)
 
 void calculate_steal_time(void)
 {
-       u64 tb, purr, t0;
+       u64 tb, purr;
        s64 stolen;
-       struct cpu_purr_data *p0, *pme, *phim;
-       int cpu;
+       struct cpu_purr_data *pme;
 
        if (!cpu_has_feature(CPU_FTR_PURR))
                return;
-       cpu = smp_processor_id();
-       pme = &per_cpu(cpu_purr_data, cpu);
+       pme = &per_cpu(cpu_purr_data, smp_processor_id());
        if (!pme->initialized)
                return;         /* this can happen in early boot */
-       p0 = &per_cpu(cpu_purr_data, cpu & ~1);
-       phim = &per_cpu(cpu_purr_data, cpu ^ 1);
-       spin_lock(&p0->lock);
+       spin_lock(&pme->lock);
        tb = mftb();
-       purr = mfspr(SPRN_PURR) - pme->purr0;
-       if (!phim->initialized || !cpu_online(cpu ^ 1)) {
-               stolen = (tb - pme->tb) - (purr - pme->purr);
-       } else {
-               t0 = pme->tb0;
-               if (phim->tb0 < t0)
-                       t0 = phim->tb0;
-               stolen = phim->tb - t0 - phim->purr - purr - p0->stolen;
-       }
-       if (stolen > 0) {
+       purr = mfspr(SPRN_PURR);
+       stolen = (tb - pme->tb) - (purr - pme->purr);
+       if (stolen > 0)
                account_steal_time(current, stolen);
-               p0->stolen += stolen;
-       }
        pme->tb = tb;
        pme->purr = purr;
-       spin_unlock(&p0->lock);
+       spin_unlock(&pme->lock);
 }
 
 /*
@@ -297,30 +279,17 @@ void calculate_steal_time(void)
  */
 static void snapshot_purr(void)
 {
-       int cpu;
-       u64 purr;
-       struct cpu_purr_data *p0, *pme, *phim;
+       struct cpu_purr_data *pme;
        unsigned long flags;
 
        if (!cpu_has_feature(CPU_FTR_PURR))
                return;
-       cpu = smp_processor_id();
-       pme = &per_cpu(cpu_purr_data, cpu);
-       p0 = &per_cpu(cpu_purr_data, cpu & ~1);
-       phim = &per_cpu(cpu_purr_data, cpu ^ 1);
-       spin_lock_irqsave(&p0->lock, flags);
-       pme->tb = pme->tb0 = mftb();
-       purr = mfspr(SPRN_PURR);
-       if (!phim->initialized) {
-               pme->purr = 0;
-               pme->purr0 = purr;
-       } else {
-               /* set p->purr and p->purr0 for no change in p0->stolen */
-               pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen;
-               pme->purr0 = purr - pme->purr;
-       }
+       pme = &per_cpu(cpu_purr_data, smp_processor_id());
+       spin_lock_irqsave(&pme->lock, flags);
+       pme->tb = mftb();
+       pme->purr = mfspr(SPRN_PURR);
        pme->initialized = 1;
-       spin_unlock_irqrestore(&p0->lock, flags);
+       spin_unlock_irqrestore(&pme->lock, flags);
 }
 
 #endif /* CONFIG_PPC_SPLPAR */
index 1a7e19cdab39c37a9f0e759a6b2177744ef3a967..c913ad5cad2918e3daebe1251de37a18292f67c9 100644 (file)
@@ -36,6 +36,8 @@
 #include <asm/vdso.h>
 #include <asm/vdso_datapage.h>
 
+#include "setup.h"
+
 #undef DEBUG
 
 #ifdef DEBUG
@@ -586,6 +588,43 @@ static __init int vdso_fixup_datapage(struct lib32_elfinfo *v32,
        return 0;
 }
 
+
+static __init int vdso_fixup_features(struct lib32_elfinfo *v32,
+                                     struct lib64_elfinfo *v64)
+{
+       void *start32;
+       unsigned long size32;
+
+#ifdef CONFIG_PPC64
+       void *start64;
+       unsigned long size64;
+
+       start64 = find_section64(v64->hdr, "__ftr_fixup", &size64);
+       if (start64)
+               do_feature_fixups(cur_cpu_spec->cpu_features,
+                                 start64, start64 + size64);
+
+       start64 = find_section64(v64->hdr, "__fw_ftr_fixup", &size64);
+       if (start64)
+               do_feature_fixups(powerpc_firmware_features,
+                                 start64, start64 + size64);
+#endif /* CONFIG_PPC64 */
+
+       start32 = find_section32(v32->hdr, "__ftr_fixup", &size32);
+       if (start32)
+               do_feature_fixups(cur_cpu_spec->cpu_features,
+                                 start32, start32 + size32);
+
+#ifdef CONFIG_PPC64
+       start32 = find_section32(v32->hdr, "__fw_ftr_fixup", &size32);
+       if (start32)
+               do_feature_fixups(powerpc_firmware_features,
+                                 start32, start32 + size32);
+#endif /* CONFIG_PPC64 */
+
+       return 0;
+}
+
 static __init int vdso_fixup_alt_funcs(struct lib32_elfinfo *v32,
                                       struct lib64_elfinfo *v64)
 {
@@ -634,6 +673,9 @@ static __init int vdso_setup(void)
        if (vdso_fixup_datapage(&v32, &v64))
                return -1;
 
+       if (vdso_fixup_features(&v32, &v64))
+               return -1;
+
        if (vdso_fixup_alt_funcs(&v32, &v64))
                return -1;
 
@@ -714,6 +756,7 @@ void __init vdso_init(void)
         * Setup the syscall map in the vDOS
         */
        vdso_setup_syscall_map();
+
        /*
         * Initialize the vDSO images in memory, that is do necessary
         * fixups of vDSO symbols, locate trampolines, etc...
index 6187af2d54c393ea825e523172636ebbcd062427..26e138c4ce1756fe73ac995fc6c86e26cf5328ed 100644 (file)
@@ -32,6 +32,18 @@ SECTIONS
   PROVIDE (_etext = .);
   PROVIDE (etext = .);
 
+  . = ALIGN(8);
+  __ftr_fixup : {
+    *(__ftr_fixup)
+  }
+
+#ifdef CONFIG_PPC64
+  . = ALIGN(8);
+  __fw_ftr_fixup : {
+    *(__fw_ftr_fixup)
+  }
+#endif
+
   /* Other stuff is appended to the text segment: */
   .rodata              : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
   .rodata1             : { *(.rodata1) }
index 56e76ff5498f49fd2a5b590a8c599c1e606f41cc..40ffd9b6cef7bf55fd81a6c62067afec4175d7c5 100644 (file)
@@ -229,8 +229,10 @@ V_FUNCTION_BEGIN(__do_get_xsec)
        xor     r0,r8,r8                /* create dependency */
        add     r3,r3,r0
 
-       /* Get TB & offset it */
-       mftb    r7
+       /* Get TB & offset it. We use the MFTB macro which will generate
+        * workaround code for Cell.
+        */
+       MFTB(r7)
        ld      r9,CFG_TB_ORIG_STAMP(r3)
        subf    r7,r9,r7
 
index 4a2b6dc0960c582b3b0f0f9c8ba73a171195ee0c..2d70f35d50b520bdd2d81bf78d0b2e1eb9a7601b 100644 (file)
@@ -31,6 +31,16 @@ SECTIONS
   PROVIDE (_etext = .);
   PROVIDE (etext = .);
 
+  . = ALIGN(8);
+  __ftr_fixup : {
+    *(__ftr_fixup)
+  }
+
+  . = ALIGN(8);
+  __fw_ftr_fixup : {
+    *(__fw_ftr_fixup)
+  }
+
   /* Other stuff is appended to the text segment: */
   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
   .rodata1        : { *(.rodata1) }
index 506f6b79f893225df5fcc093f146d3d9656f3e7f..6a927effcc7799c0e6f37b1e56cb636256a43397 100644 (file)
@@ -76,7 +76,7 @@ static inline int mmcra_must_set_sample(void)
 {
        if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p) ||
            __is_processor(PV_970) || __is_processor(PV_970FX) ||
-           __is_processor(PV_970MP))
+           __is_processor(PV_970MP) || __is_processor(PV_970GX))
                return 1;
 
        return 0;
index 0de8e114e6b68355b26c2f2ef4de546367792dbc..533e2723e1840eafd8645a962f1f6b0cf4ef96c9 100644 (file)
@@ -385,7 +385,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
        udata = (void __user *)buf;
 
        spu_acquire(ctx);
-       for (count = 0; count <= len; count += 4, udata++) {
+       for (count = 0; (count + 4) <= len; count += 4, udata++) {
                int ret;
                ret = ctx->ops->mbox_read(ctx, &mbox_data);
                if (ret == 0)
index efc452e71ab0f03b93b4d3178d28cc05ef1200c1..d805ffed892d4721db9a697720a31e097e90f974 100644 (file)
@@ -147,7 +147,7 @@ static void spu_hw_signal1_write(struct spu_context *ctx, u32 data)
 
 static u32 spu_hw_signal2_read(struct spu_context *ctx)
 {
-       return in_be32(&ctx->spu->problem->signal_notify1);
+       return in_be32(&ctx->spu->problem->signal_notify2);
 }
 
 static void spu_hw_signal2_write(struct spu_context *ctx, u32 data)
index cae3d13229b995f88374cf0021dac66577c37d30..49b8dabcbc992996db5a3c53dd00b9035f7e5a05 100644 (file)
@@ -477,8 +477,10 @@ static void __init chrp_find_8259(void)
                       " address, polling\n");
 
        i8259_init(pic, chrp_int_ack);
-       if (ppc_md.get_irq == NULL)
+       if (ppc_md.get_irq == NULL) {
                ppc_md.get_irq = i8259_irq;
+               irq_set_default_host(i8259_get_host());
+       }
        if (chrp_mpic != NULL) {
                cascade_irq = irq_of_parse_and_map(pic, 0);
                if (cascade_irq == NO_IRQ)
index a0ff7ba7d666addc2a78a3f20276e9de56d09f61..6f73469fd3b0c64b1a753003af5e3a93a1fef072 100644 (file)
@@ -694,6 +694,11 @@ void * __init iSeries_early_setup(void)
 {
        unsigned long phys_mem_size;
 
+       /* Identify CPU type. This is done again by the common code later
+        * on but calling this function multiple times is fine.
+        */
+       identify_cpu(0);
+
        powerpc_firmware_features |= FW_FEATURE_ISERIES;
        powerpc_firmware_features |= FW_FEATURE_LPAR;
 
index 1174ca128efa4aa160b13790937ad418366e280a..adee28da353f9f00095d7d8ed85d3234d8001dab 100644 (file)
@@ -45,7 +45,8 @@
        .section .text
        .align  5
 
-#if defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ_PMAC)
+#if defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ_PMAC) || \
+    (defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32))
 
 /* This gets called by via-pmu.c late during the sleep process.
  * The PMU was already send the sleep command and will shut us down
index 0450265d73bbe38e628829ea2f9219046c5d7f8e..ad87adc975bcc1a6bbf0a901f8f158b6bc5610d3 100644 (file)
@@ -224,6 +224,11 @@ static struct irq_host_ops i8259_host_ops = {
        .xlate = i8259_host_xlate,
 };
 
+struct irq_host *i8259_get_host(void)
+{
+       return i8259_host;
+}
+
 /**
  * i8259_init - Initialize the legacy controller
  * @node: device node of the legacy PIC (can be NULL, but then, it will match
index bc4d4a7f9657d39c4ae037e39ac6a81d9d9a3444..746f78c153756c29007c2bad272e0d0779926989 100644 (file)
@@ -473,9 +473,9 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
        desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
        if (flow_type & IRQ_TYPE_LEVEL_LOW)  {
                desc->status |= IRQ_LEVEL;
-               set_irq_handler(virq, handle_level_irq);
+               desc->handle_irq = handle_level_irq;
        } else {
-               set_irq_handler(virq, handle_edge_irq);
+               desc->handle_irq = handle_edge_irq;
        }
 
        /* only EXT IRQ senses are programmable on ipic
index 916c9e5df57faa67afb71b0d7d90220929b639dd..ac12a44d516f6ceb6d987ec4f09d7c85a67ee77a 100644 (file)
@@ -207,6 +207,7 @@ int ucc_set_qe_mux_rxtx(int ucc_num, enum qe_clock clock, enum comm_dir mode)
                case QE_CLK18:  source = 8; break;
                case QE_CLK7:   source = 9; break;
                case QE_CLK8:   source = 10; break;
+               case QE_CLK16:  source = 11; break;
                default:        source = -1; break;
                }
                break;
@@ -222,6 +223,7 @@ int ucc_set_qe_mux_rxtx(int ucc_num, enum qe_clock clock, enum comm_dir mode)
                case QE_CLK22:  source = 8; break;
                case QE_CLK7:   source = 9; break;
                case QE_CLK8:   source = 10; break;
+               case QE_CLK16:  source = 11; break;
                default:        source = -1; break;
                }
                break;
index c2be7348fcbd81f1db943715147cd973b551367e..75fa3104a43aaeb4ac1bdde7cdd1a19045c2b22e 100644 (file)
@@ -163,7 +163,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
 
        /* check if the UCC port number is in range. */
        if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) {
-               uccf_err("ucc_fast_init: Illagal UCC number!");
+               uccf_err("ucc_fast_init: Illegal UCC number!");
                return -EINVAL;
        }
 
index 1fb88ef7cf0640ef8063e024d3a4603d79c609d5..a49da6b73ecf6c2d8fa0d23b71f872ca362c07b0 100644 (file)
@@ -152,7 +152,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
 
        /* check if the UCC port number is in range. */
        if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) {
-               uccs_err("ucc_slow_init: Illagal UCC number!");
+               uccs_err("ucc_slow_init: Illegal UCC number!");
                return -EINVAL;
        }
 
index 11de090eb9015ea7a2917b3269dff8afa4c519d4..97f37ef4bbbf42e1c09d6bd535ebfb87e6c7f140 100644 (file)
@@ -48,7 +48,7 @@ phys_addr_t get_csrbase(void)
        tsi = of_find_node_by_type(NULL, "tsi-bridge");
        if (tsi) {
                unsigned int size;
-               void *prop = get_property(tsi, "reg", &size);
+               const void *prop = get_property(tsi, "reg", &size);
                tsi108_csr_base = of_translate_address(tsi, prop);
                of_node_put(tsi);
        };
@@ -79,7 +79,7 @@ static int __init tsi108_eth_of_init(void)
                hw_info tsi_eth_data;
                unsigned int *id;
                unsigned int *phy_id;
-               void *mac_addr;
+               const void *mac_addr;
                phandle *ph;
 
                memset(r, 0, sizeof(r));
index 0c021556d78e25a822e573aea1d521fd06c0d8e5..1bbbcd2f2bcbd44c033329f479cc0def95ce7630 100644 (file)
@@ -154,8 +154,8 @@ do_relocate_out:
 
 start_ldr:
 /* Clear all of BSS and set up stack for C calls */
-       lis     r3,edata@h
-       ori     r3,r3,edata@l
+       lis     r3,__bss_start@h
+       ori     r3,r3,__bss_start@l
        lis     r4,end@h
        ori     r4,r4,end@l
        subi    r3,r3,4
@@ -163,7 +163,7 @@ start_ldr:
        li      r0,0
 50:    stwu    r0,4(r3)
        cmpw    cr0,r3,r4
-       bne     50b
+       blt     50b
 90:    mr      r9,r1           /* Save old stack pointer (in case it matters) */
        lis     r1,.stack@h
        ori     r1,r1,.stack@l
index 5f6684012ded76d4d02c9b0f55c37b8e2cb6548f..d319f9ba2379d812f31d5bfbc8b249989de79636 100644 (file)
@@ -109,80 +109,6 @@ _GLOBAL(reloc_got2)
        mtlr    r11
        blr
 
-/*
- * identify_cpu,
- * called with r3 = data offset and r4 = CPU number
- * doesn't change r3
- */
-_GLOBAL(identify_cpu)
-       addis   r8,r3,cpu_specs@ha
-       addi    r8,r8,cpu_specs@l
-       mfpvr   r7
-1:
-       lwz     r5,CPU_SPEC_PVR_MASK(r8)
-       and     r5,r5,r7
-       lwz     r6,CPU_SPEC_PVR_VALUE(r8)
-       cmplw   0,r6,r5
-       beq     1f
-       addi    r8,r8,CPU_SPEC_ENTRY_SIZE
-       b       1b
-1:
-       addis   r6,r3,cur_cpu_spec@ha
-       addi    r6,r6,cur_cpu_spec@l
-       sub     r8,r8,r3
-       stw     r8,0(r6)
-       blr
-
-/*
- * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
- * and writes nop's over sections of code that don't apply for this cpu.
- * r3 = data offset (not changed)
- */
-_GLOBAL(do_cpu_ftr_fixups)
-       /* Get CPU 0 features */
-       addis   r6,r3,cur_cpu_spec@ha
-       addi    r6,r6,cur_cpu_spec@l
-       lwz     r4,0(r6)
-       add     r4,r4,r3
-       lwz     r4,CPU_SPEC_FEATURES(r4)
-
-       /* Get the fixup table */
-       addis   r6,r3,__start___ftr_fixup@ha
-       addi    r6,r6,__start___ftr_fixup@l
-       addis   r7,r3,__stop___ftr_fixup@ha
-       addi    r7,r7,__stop___ftr_fixup@l
-
-       /* Do the fixup */
-1:     cmplw   0,r6,r7
-       bgelr
-       addi    r6,r6,16
-       lwz     r8,-16(r6)      /* mask */
-       and     r8,r8,r4
-       lwz     r9,-12(r6)      /* value */
-       cmplw   0,r8,r9
-       beq     1b
-       lwz     r8,-8(r6)       /* section begin */
-       lwz     r9,-4(r6)       /* section end */
-       subf.   r9,r8,r9
-       beq     1b
-       /* write nops over the section of code */
-       /* todo: if large section, add a branch at the start of it */
-       srwi    r9,r9,2
-       mtctr   r9
-       add     r8,r8,r3
-       lis     r0,0x60000000@h /* nop */
-3:     stw     r0,0(r8)
-       andi.   r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
-       beq     2f
-       dcbst   0,r8            /* suboptimal, but simpler */
-       sync
-       icbi    0,r8
-2:     addi    r8,r8,4
-       bdnz    3b
-       sync                    /* additional sync needed on g4 */
-       isync
-       b       1b
-
 /*
  * call_setup_cpu - call the setup_cpu function for this cpu
  * r3 = data offset, r24 = cpu number
index 75fe13815be27c23e817ac7527c00079476f1c0b..27faeca2c7a209438eca4fb394b2ce868ce357c2 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/nvram.h>
 #include <asm/xmon.h>
 #include <asm/ocp.h>
+#include <asm/prom.h>
 
 #define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \
                      defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \
@@ -53,8 +54,6 @@
 
 extern void platform_init(unsigned long r3, unsigned long r4,
                unsigned long r5, unsigned long r6, unsigned long r7);
-extern void identify_cpu(unsigned long offset, unsigned long cpu);
-extern void do_cpu_ftr_fixups(unsigned long offset);
 extern void reloc_got2(unsigned long offset);
 
 extern void ppc6xx_idle(void);
@@ -301,6 +300,7 @@ early_init(int r3, int r4, int r5)
 {
        unsigned long phys;
        unsigned long offset = reloc_offset();
+       struct cpu_spec *spec;
 
        /* Default */
        phys = offset + KERNELBASE;
@@ -313,8 +313,10 @@ early_init(int r3, int r4, int r5)
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
         */
-       identify_cpu(offset, 0);
-       do_cpu_ftr_fixups(offset);
+       spec = identify_cpu(offset);
+       do_feature_fixups(spec->cpu_features,
+                         PTRRELOC(&__start___ftr_fixup),
+                         PTRRELOC(&__stop___ftr_fixup));
 
        return phys;
 }
index d08bd036ccb84268aaab9ad386849ab28b5ffc53..7b172160fe0415375d3e5bc1bbbcb00c6ed71105 100644 (file)
@@ -79,7 +79,7 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
        /* long to avoid size mismatch warnings from gcc */
        long fd;
        struct mconsole_entry *new;
-       struct mc_request req;
+       static struct mc_request req;   /* that's OK */
 
        fd = (long) dev_id;
        while (mconsole_get_request(fd, &req)){
@@ -91,6 +91,7 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
                                mconsole_reply(&req, "Out of memory", 1, 0);
                        else {
                                new->request = req;
+                               new->request.regs = get_irq_regs()->regs;
                                list_add(&new->list, &mc_requests);
                        }
                }
@@ -314,9 +315,21 @@ void mconsole_stop(struct mc_request *req)
 {
        deactivate_fd(req->originating_fd, MCONSOLE_IRQ);
        os_set_fd_block(req->originating_fd, 1);
-       mconsole_reply(req, "", 0, 0);
-       while(mconsole_get_request(req->originating_fd, req)){
-               if(req->cmd->handler == mconsole_go) break;
+       mconsole_reply(req, "stopped", 0, 0);
+       while (mconsole_get_request(req->originating_fd, req)) {
+               if (req->cmd->handler == mconsole_go)
+                       break;
+               if (req->cmd->handler == mconsole_stop) {
+                       mconsole_reply(req, "Already stopped", 1, 0);
+                       continue;
+               }
+               if (req->cmd->handler == mconsole_sysrq) {
+                       struct pt_regs *old_regs;
+                       old_regs = set_irq_regs((struct pt_regs *)&req->regs);
+                       mconsole_sysrq(req);
+                       set_irq_regs(old_regs);
+                       continue;
+               }
                (*req->cmd->handler)(req);
        }
        os_set_fd_block(req->originating_fd, 0);
@@ -673,9 +686,7 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
 static void sysrq_proc(void *arg)
 {
        char *op = arg;
-       struct pt_regs *old_regs = set_irq_regs(&current->thread.regs);
        handle_sysrq(*op, NULL);
-       set_irq_regs(old_regs);
 }
 
 void mconsole_sysrq(struct mc_request *req)
index 17068eb746c0bda5204a8ffd49ee0ab5de16c46a..75aef6f7ef6e22dd9669f55f707021cd4f539d10 100644 (file)
@@ -14,6 +14,7 @@
 #include <sys/un.h>
 #include <unistd.h>
 #include "user.h"
+#include "sysdep/ptrace.h"
 #include "mconsole.h"
 #include "umid.h"
 #include "user_util.h"
index 58f67d3911052de522e01fb053edf2cbedd33549..2666815b6af57130cce633c759f0e8d86ebf9d12 100644 (file)
@@ -61,6 +61,7 @@ struct mc_request
 
        struct mconsole_request request;
        struct mconsole_command *cmd;
+       union uml_pt_regs regs;
 };
 
 extern char mconsole_socket_name[];
index 44268cba5a5a215c3f8de6a78af1ada1653cd393..4dc10105d61023311586f6f930950d4dc04d44ea 100644 (file)
@@ -1789,7 +1789,7 @@ static inline void CLOCK_IT (const hrz_dev *dev, u32 ctrl)
        WRITE_IT_WAIT(dev, ctrl | SEEPROM_SK);
 }
 
-static u16 __init read_bia (const hrz_dev * dev, u16 addr)
+static u16 __devinit read_bia (const hrz_dev * dev, u16 addr)
 {
   u32 ctrl = rd_regl (dev, CONTROL_0_REG);
   
index b6c045dc97b4e1331e426323aa4010daffe67e0f..00db31c314e0d9d30a8287eed91cea12de375665 100644 (file)
@@ -30,6 +30,7 @@ config IBM_ASM
 
 config SGI_IOC4
        tristate "SGI IOC4 Base IO support"
+       depends on PCI
        ---help---
          This option enables basic support for the IOC4 chip on certain
          SGI IO controller cards (IO9, IO10, and PCI-RT).  This option
index 1c3c14a3839cff9d7a0f2a990ef0fa683b8d83d5..79354bbbbd6a12c8ae0e22de5b73cda47da8fde8 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/ktime.h>
 #include <linux/mutex.h>
 #include <linux/time.h>
+#include <asm/io.h>
 
 /***************
  * Definitions *
index 2bacff60913dc293e291fc7088004e9c52221d18..0fdc55b08a6daa72cb60ccdd8fc981e0cc648f7b 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/mmc/protocol.h>
 #include <linux/mmc/host.h>
 #include <linux/highmem.h>
+#include <asm/io.h>
 
 #define DRIVER_NAME "tifm_sd"
 #define DRIVER_VERSION "0.6"
index ea16078cfe98bd95169e626b203a77194a935ace..d1105e569a41260b3187ef81ca9588807e59dffb 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
+#include <linux/dma-mapping.h>
 #include <linux/linkage.h>
 #include <asm/atomic.h>
 
index 2ebbfd95145fd34587cbd715b2d59048c283abfb..d07ecb53c68b85bad48b7f8fd243105857a5fec9 100644 (file)
@@ -111,7 +111,7 @@ static struct backlight_properties corgibl_data = {
        .update_status  = corgibl_set_intensity,
 };
 
-static int __init corgibl_probe(struct platform_device *pdev)
+static int corgibl_probe(struct platform_device *pdev)
 {
        struct corgibl_machinfo *machinfo = pdev->dev.platform_data;
 
@@ -166,4 +166,4 @@ module_exit(corgibl_exit);
 
 MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
 MODULE_DESCRIPTION("Corgi Backlight Driver");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL");
index f3bc70eee35b3b7aabc012af82170db1f1133ded..67ed43674c635a66a3a947accb3a757810fdd260 100644 (file)
@@ -73,7 +73,7 @@
 #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
 
 #if defined(CONFIG_PXA25x)
-#define PXA_LAST_GPIO  80
+#define PXA_LAST_GPIO  84
 #elif defined(CONFIG_PXA27x)
 #define PXA_LAST_GPIO  127
 #endif
index 8e64be0cc47d3d0f7579445af6726a661f50a17b..c89bd58ee2839be66fc98059172523d246d412b4 100644 (file)
 #  define ASM_CONST(x)         __ASM_CONST(x)
 #endif
 
+
+/*
+ * Feature section common macros
+ *
+ * Note that the entries now contain offsets between the table entry
+ * and the code rather than absolute code pointers in order to be
+ * useable with the vdso shared library. There is also an assumption
+ * that values will be negative, that is, the fixup table has to be
+ * located after the code it fixes up.
+ */
+#ifdef CONFIG_PPC64
+#ifdef __powerpc64__
+/* 64 bits kernel, 64 bits code */
+#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect)  \
+99:                                                    \
+       .section sect,"a";                              \
+       .align 3;                                       \
+98:                                                    \
+       .llong msk;                                     \
+       .llong val;                                     \
+       .llong label##b-98b;                            \
+       .llong 99b-98b;                                 \
+       .previous
+#else /* __powerpc64__ */
+/* 64 bits kernel, 32 bits code (ie. vdso32) */
+#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect)  \
+99:                                                    \
+       .section sect,"a";                              \
+       .align 3;                                       \
+98:                                                    \
+       .llong msk;                                     \
+       .llong val;                                     \
+       .long 0xffffffff;                               \
+       .long label##b-98b;                             \
+       .long 0xffffffff;                               \
+       .long 99b-98b;                                  \
+       .previous
+#endif /* !__powerpc64__ */
+#else /* CONFIG_PPC64 */
+/* 32 bits kernel, 32 bits code */
+#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect)  \
+99:                                                    \
+       .section sect,"a";                              \
+       .align 2;                                       \
+98:                                                    \
+       .long msk;                                      \
+       .long val;                                      \
+       .long label##b-98b;                             \
+       .long 99b-98b;                                  \
+       .previous
+#endif /* !CONFIG_PPC64 */
+
 #ifdef __powerpc64__
 
 /* operations for longs and pointers */
index 12707ab9dc98db6bcc6bf75556dd925e9a56818e..a9a40149a7c0daf66cca975035b4d5863bbc10bc 100644 (file)
@@ -89,8 +89,11 @@ struct cpu_spec {
 
 extern struct cpu_spec         *cur_cpu_spec;
 
-extern void identify_cpu(unsigned long offset, unsigned long cpu);
-extern void do_cpu_ftr_fixups(unsigned long offset);
+extern unsigned int __start___ftr_fixup, __stop___ftr_fixup;
+
+extern struct cpu_spec *identify_cpu(unsigned long offset);
+extern void do_feature_fixups(unsigned long value, void *fixup_start,
+                             void *fixup_end);
 
 #endif /* __ASSEMBLY__ */
 
@@ -144,6 +147,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
 #define CPU_FTR_CI_LARGE_PAGE          LONG_ASM_CONST(0x0000100000000000)
 #define CPU_FTR_PAUSE_ZERO             LONG_ASM_CONST(0x0000200000000000)
 #define CPU_FTR_PURR                   LONG_ASM_CONST(0x0000400000000000)
+#define CPU_FTR_CELL_TB_BUG            LONG_ASM_CONST(0x0000800000000000)
 
 #ifndef __ASSEMBLY__
 
@@ -332,7 +336,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
 #define CPU_FTRS_CELL  (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
            CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
            CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
-           CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE)
+           CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_CELL_TB_BUG)
 #define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
            CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
            CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \
@@ -431,29 +435,12 @@ static inline int cpu_has_feature(unsigned long feature)
 
 #ifdef __ASSEMBLY__
 
-#define BEGIN_FTR_SECTION              98:
-
-#ifndef __powerpc64__
+#define BEGIN_FTR_SECTION_NESTED(label)        label:
+#define BEGIN_FTR_SECTION              BEGIN_FTR_SECTION_NESTED(97)
+#define END_FTR_SECTION_NESTED(msk, val, label) \
+       MAKE_FTR_SECTION_ENTRY(msk, val, label, __ftr_fixup)
 #define END_FTR_SECTION(msk, val)              \
-99:                                            \
-       .section __ftr_fixup,"a";               \
-       .align 2;                               \
-       .long msk;                              \
-       .long val;                              \
-       .long 98b;                              \
-       .long 99b;                              \
-       .previous
-#else /* __powerpc64__ */
-#define END_FTR_SECTION(msk, val)              \
-99:                                            \
-       .section __ftr_fixup,"a";               \
-       .align 3;                               \
-       .llong msk;                             \
-       .llong val;                             \
-       .llong 98b;                             \
-       .llong 99b;                             \
-       .previous
-#endif /* __powerpc64__ */
+       END_FTR_SECTION_NESTED(msk, val, 97)
 
 #define END_FTR_SECTION_IFSET(msk)     END_FTR_SECTION((msk), (msk))
 #define END_FTR_SECTION_IFCLR(msk)     END_FTR_SECTION((msk), 0)
index 1022737f4f34884ea392264cd8a21156290bad67..fdf9aff71150412a9d351241b3c10d65652eb38a 100644 (file)
@@ -96,19 +96,16 @@ extern void machine_check_fwnmi(void);
 /* This is true if we are using the firmware NMI handler (typically LPAR) */
 extern int fwnmi_active;
 
-#else /* __ASSEMBLY__ */
+extern unsigned int __start___fw_ftr_fixup, __stop___fw_ftr_fixup;
 
-#define BEGIN_FW_FTR_SECTION           96:
+#else /* __ASSEMBLY__ */
 
+#define BEGIN_FW_FTR_SECTION_NESTED(label)     label:
+#define BEGIN_FW_FTR_SECTION                   BEGIN_FW_FTR_SECTION_NESTED(97)
+#define END_FW_FTR_SECTION_NESTED(msk, val, label) \
+       MAKE_FTR_SECTION_ENTRY(msk, val, label, __fw_ftr_fixup)
 #define END_FW_FTR_SECTION(msk, val)           \
-97:                                            \
-       .section __fw_ftr_fixup,"a";            \
-       .align 3;                               \
-       .llong msk;                             \
-       .llong val;                             \
-       .llong 96b;                             \
-       .llong 97b;                             \
-       .previous
+       END_FW_FTR_SECTION_NESTED(msk, val, 97)
 
 #define END_FW_FTR_SECTION_IFSET(msk)  END_FW_FTR_SECTION((msk), (msk))
 #define END_FW_FTR_SECTION_IFCLR(msk)  END_FW_FTR_SECTION((msk), 0)
index 78489fb8d140f4465bd9594906efe15f47ea3ffc..db1362f8c603c2576dffefbe6e23a8c410057984 100644 (file)
@@ -7,6 +7,7 @@
 #ifdef CONFIG_PPC_MERGE
 extern void i8259_init(struct device_node *node, unsigned long intack_addr);
 extern unsigned int i8259_irq(void);
+extern struct irq_host *i8259_get_host(void);
 #else
 extern void i8259_init(unsigned long intack_addr, int offset);
 extern int i8259_irq(void);
index a940cfe040da1a4d38b253b09c948bdbdac401a9..fa083d8e46632807b5a206a5ab7fa528e7676fea 100644 (file)
@@ -30,9 +30,9 @@ BEGIN_FTR_SECTION;                                                    \
        mfspr   ra,SPRN_PURR;           /* get processor util. reg */   \
 END_FTR_SECTION_IFSET(CPU_FTR_PURR);                                   \
 BEGIN_FTR_SECTION;                                                     \
-       mftb    ra;                     /* or get TB if no PURR */      \
+       MFTB(ra);                       /* or get TB if no PURR */      \
 END_FTR_SECTION_IFCLR(CPU_FTR_PURR);                                   \
-       ld      rb,PACA_STARTPURR(r13);                         \
+       ld      rb,PACA_STARTPURR(r13);                                 \
        std     ra,PACA_STARTPURR(r13);                                 \
        subf    rb,rb,ra;               /* subtract start value */      \
        ld      ra,PACA_USER_TIME(r13);                                 \
@@ -45,9 +45,9 @@ BEGIN_FTR_SECTION;                                                    \
        mfspr   ra,SPRN_PURR;           /* get processor util. reg */   \
 END_FTR_SECTION_IFSET(CPU_FTR_PURR);                                   \
 BEGIN_FTR_SECTION;                                                     \
-       mftb    ra;                     /* or get TB if no PURR */      \
+       MFTB(ra);                       /* or get TB if no PURR */      \
 END_FTR_SECTION_IFCLR(CPU_FTR_PURR);                                   \
-       ld      rb,PACA_STARTPURR(r13);                         \
+       ld      rb,PACA_STARTPURR(r13);                                 \
        std     ra,PACA_STARTPURR(r13);                                 \
        subf    rb,rb,ra;               /* subtract start value */      \
        ld      ra,PACA_SYSTEM_TIME(r13);                               \
@@ -274,6 +274,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
 #define ISYNC_601
 #endif
 
+#ifdef CONFIG_PPC_CELL
+#define MFTB(dest)                     \
+90:    mftb  dest;                     \
+BEGIN_FTR_SECTION_NESTED(96);          \
+       cmpwi dest,0;                   \
+       beq-  90b;                      \
+END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
+#else
+#define MFTB(dest)                     mftb dest
+#endif
 
 #ifndef CONFIG_SMP
 #define TLBSYNC
index 5246297693369d677ca698ca3e2cc795e2f1faf4..ec11d44eaeb5d46085f8d3bbffbece4611c7f9a1 100644 (file)
@@ -134,7 +134,7 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev);
 extern struct device_node *of_get_parent(const struct device_node *node);
 extern struct device_node *of_get_next_child(const struct device_node *node,
                                             struct device_node *prev);
-extern struct property *of_find_property(struct device_node *np,
+extern struct property *of_find_property(const struct device_node *np,
                                         const char *name,
                                         int *lenp);
 extern struct device_node *of_node_get(struct device_node *node);
@@ -158,10 +158,12 @@ extern void of_detach_node(const struct device_node *);
 extern void finish_device_tree(void);
 extern void unflatten_device_tree(void);
 extern void early_init_devtree(void *);
-extern int device_is_compatible(struct device_node *device, const char *);
+extern int device_is_compatible(const struct device_node *device,
+                               const char *);
 extern int machine_is_compatible(const char *compat);
-extern const void *get_property(struct device_node *node, const char *name,
-               int *lenp);
+extern const void *get_property(const struct device_node *node,
+                               const char *name,
+                               int *lenp);
 extern void print_properties(struct device_node *node);
 extern int prom_n_addr_cells(struct device_node* np);
 extern int prom_n_size_cells(struct device_node* np);
index 8fb96811b55de74efe6ec468e619dc1e8a2a0ae4..6faae7b14d5540f0e5cdcd13b3a31c195d7d980b 100644 (file)
 #define PV_630         0x0040
 #define PV_630p        0x0041
 #define PV_970MP       0x0044
+#define PV_970GX       0x0045
 #define PV_BE          0x0070
 #define PV_PA6T                0x0090
 
                                : "=r" (rval)); rval;})
 #define mtspr(rn, v)   asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
 
+#ifdef __powerpc64__
+#ifdef CONFIG_PPC_CELL
+#define mftb()         ({unsigned long rval;                           \
+                       asm volatile(                                   \
+                               "90:    mftb %0;\n"                     \
+                               "97:    cmpwi %0,0;\n"                  \
+                               "       beq- 90b;\n"                    \
+                               "99:\n"                                 \
+                               ".section __ftr_fixup,\"a\"\n"          \
+                               ".align 3\n"                            \
+                               "98:\n"                                 \
+                               "       .llong %1\n"                    \
+                               "       .llong %1\n"                    \
+                               "       .llong 97b-98b\n"               \
+                               "       .llong 99b-98b\n"               \
+                               ".previous"                             \
+                       : "=r" (rval) : "i" (CPU_FTR_CELL_TB_BUG)); rval;})
+#else
 #define mftb()         ({unsigned long rval;   \
                        asm volatile("mftb %0" : "=r" (rval)); rval;})
+#endif /* !CONFIG_PPC_CELL */
+
+#else /* __powerpc64__ */
+
 #define mftbl()                ({unsigned long rval;   \
                        asm volatile("mftbl %0" : "=r" (rval)); rval;})
+#define mftbu()                ({unsigned long rval;   \
+                       asm volatile("mftbu %0" : "=r" (rval)); rval;})
+#endif /* !__powerpc64__ */
 
 #define mttbl(v)       asm volatile("mttbl %0":: "r"(v))
 #define mttbu(v)       asm volatile("mttbu %0":: "r"(v))
index b051d4c88c3b46a19b40ba11d2e951010be502d6..a78285010d62f852674327f09a73fda3b7a69a8b 100644 (file)
@@ -82,30 +82,35 @@ struct div_result {
 #define __USE_RTC()    0
 #endif
 
-/* On ppc64 this gets us the whole timebase; on ppc32 just the lower half */
+#ifdef CONFIG_PPC64
+
+/* For compatibility, get_tbl() is defined as get_tb() on ppc64 */
+#define get_tbl                get_tb
+
+#else
+
 static inline unsigned long get_tbl(void)
 {
-       unsigned long tbl;
-
 #if defined(CONFIG_403GCX)
+       unsigned long tbl;
        asm volatile("mfspr %0, 0x3dd" : "=r" (tbl));
+       return tbl;
 #else
-       asm volatile("mftb %0" : "=r" (tbl));
+       return mftbl();
 #endif
-       return tbl;
 }
 
 static inline unsigned int get_tbu(void)
 {
+#ifdef CONFIG_403GCX
        unsigned int tbu;
-
-#if defined(CONFIG_403GCX)
        asm volatile("mfspr %0, 0x3dc" : "=r" (tbu));
+       return tbu;
 #else
-       asm volatile("mftbu %0" : "=r" (tbu));
+       return mftbu();
 #endif
-       return tbu;
 }
+#endif /* !CONFIG_PPC64 */
 
 static inline unsigned int get_rtcl(void)
 {
@@ -131,7 +136,7 @@ static inline u64 get_tb(void)
 {
        return mftb();
 }
-#else
+#else /* CONFIG_PPC64 */
 static inline u64 get_tb(void)
 {
        unsigned int tbhi, tblo, tbhi2;
@@ -144,7 +149,7 @@ static inline u64 get_tb(void)
 
        return ((u64)tbhi << 32) | tblo;
 }
-#endif
+#endif /* !CONFIG_PPC64 */
 
 static inline void set_tb(unsigned int upper, unsigned int lower)
 {
index 3b9a8e78680646f3ee64f2582b0c14b26d0a08c9..92dedde761d183a0109dfd7173c37ec1f3a1d43b 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <asm/cputable.h>
+#include <asm/reg.h>
 
 #define CLOCK_TICK_RATE        1024000 /* Underlying HZ */
 
@@ -15,13 +16,11 @@ typedef unsigned long cycles_t;
 
 static inline cycles_t get_cycles(void)
 {
-       cycles_t ret;
-
 #ifdef __powerpc64__
-
-       __asm__ __volatile__("mftb %0" : "=r" (ret) : );
-
+       return mftb();
 #else
+       cycles_t ret;
+
        /*
         * For the "cycle" counter we use the timebase lower half.
         * Currently only used on SMP.
@@ -30,18 +29,19 @@ static inline cycles_t get_cycles(void)
        ret = 0;
 
        __asm__ __volatile__(
-               "98:    mftb %0\n"
+               "97:    mftb %0\n"
                "99:\n"
                ".section __ftr_fixup,\"a\"\n"
+               ".align 2\n"
+               "98:\n"
                "       .long %1\n"
                "       .long 0\n"
-               "       .long 98b\n"
-               "       .long 99b\n"
+               "       .long 97b-98b\n"
+               "       .long 99b-98b\n"
                ".previous"
                : "=r" (ret) : "i" (CPU_FTR_601));
-#endif
-
        return ret;
+#endif
 }
 
 #endif /* __KERNEL__ */
index e2a095d0fd803796b2cca1673952bf91b5226ede..ef8919cca74b5467ad60a24485e5eef493421cea 100644 (file)
@@ -4,15 +4,15 @@ menu "DCCP Configuration (EXPERIMENTAL)"
 config IP_DCCP
        tristate "The DCCP Protocol (EXPERIMENTAL)"
        ---help---
-         Datagram Congestion Control Protocol
+         Datagram Congestion Control Protocol (RFC 4340)
 
-         From draft-ietf-dccp-spec-11 <http://www.icir.org/kohler/dcp/draft-ietf-dccp-spec-11.txt>.
+         From http://www.ietf.org/rfc/rfc4340.txt:
 
          The Datagram Congestion Control Protocol (DCCP) is a transport
          protocol that implements bidirectional, unicast connections of
          congestion-controlled, unreliable datagrams. It should be suitable
          for use by applications such as streaming media, Internet telephony,
-         and on-line games
+         and on-line games.
 
          To compile this protocol support as a module, choose M here: the
          module will be called dccp.
index 4d176d33983fef29db3a34c24b1f22bd4e72d9e7..f8208874ac7d79bc3f4c3516e54d7e7e87514c90 100644 (file)
@@ -113,7 +113,7 @@ int dccp_insert_option_ackvec(struct sock *sk, struct sk_buff *skb)
 
        memcpy(to, from, len);
        /*
-        *      From draft-ietf-dccp-spec-11.txt:
+        *      From RFC 4340, A.2:
         *
         *      For each acknowledgement it sends, the HC-Receiver will add an
         *      acknowledgement record.  ack_seqno will equal the HC-Receiver
@@ -224,7 +224,7 @@ static inline int dccp_ackvec_set_buf_head_state(struct dccp_ackvec *av,
 }
 
 /*
- * Implements the draft-ietf-dccp-spec-11.txt Appendix A
+ * Implements the RFC 4340, Appendix A
  */
 int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
                    const u64 ackno, const u8 state)
@@ -237,7 +237,7 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
         * We may well decide to do buffer compression, etc, but for now lets
         * just drop.
         *
-        * From Appendix A:
+        * From Appendix A.1.1 (`New Packets'):
         *
         *      Of course, the circular buffer may overflow, either when the
         *      HC-Sender is sending data at a very high rate, when the
@@ -274,9 +274,9 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
                /*
                 * A.1.2.  Old Packets
                 *
-                *      When a packet with Sequence Number S arrives, and
-                *      S <= buf_ackno, the HC-Receiver will scan the table
-                *      for the byte corresponding to S. (Indexing structures
+                *      When a packet with Sequence Number S <= buf_ackno
+                *      arrives, the HC-Receiver will scan the table for
+                *      the byte corresponding to S. (Indexing structures
                 *      could reduce the complexity of this scan.)
                 */
                u64 delta = dccp_delta_seqno(ackno, av->dccpav_buf_ackno);
index 2424effac7f690d4c7679f18c70c9cb14ee71ea6..cf8f20ce23a9cf76ad5b58b2277e2553ad924777 100644 (file)
@@ -28,8 +28,7 @@
 
 /** struct dccp_ackvec - ack vector
  *
- * This data structure is the one defined in the DCCP draft
- * Appendix A.
+ * This data structure is the one defined in RFC 4340, Appendix A.
  *
  * @dccpav_buf_head - circular buffer head
  * @dccpav_buf_tail - circular buffer tail
index 32752f7504476013933574f754c87d87f2bf935f..8533dabfb9f8200468dd3d18b88436cfd969f00a 100644 (file)
@@ -22,11 +22,11 @@ config IP_DCCP_CCID2
          for lost packets, would prefer CCID 2 to CCID 3.  On-line games may
          also prefer CCID 2.
 
-         CCID 2 is further described in:
-         http://www.icir.org/kohler/dccp/draft-ietf-dccp-ccid2-10.txt
+         CCID 2 is further described in RFC 4341,
+         http://www.ietf.org/rfc/rfc4341.txt
 
-         This text was extracted from:
-         http://www.icir.org/kohler/dccp/draft-ietf-dccp-spec-13.txt
+         This text was extracted from RFC 4340 (sec. 10.1),
+         http://www.ietf.org/rfc/rfc4340.txt
 
          If in doubt, say M.
 
@@ -53,15 +53,14 @@ config IP_DCCP_CCID3
          suitable than CCID 2 for applications such streaming media where a
          relatively smooth sending rate is of importance.
 
-         CCID 3 is further described in:
-
-         http://www.icir.org/kohler/dccp/draft-ietf-dccp-ccid3-11.txt.
+         CCID 3 is further described in RFC 4342,
+         http://www.ietf.org/rfc/rfc4342.txt
 
          The TFRC congestion control algorithms were initially described in
          RFC 3448.
 
-         This text was extracted from:
-         http://www.icir.org/kohler/dccp/draft-ietf-dccp-spec-13.txt
+         This text was extracted from RFC 4340 (sec. 10.2),
+         http://www.ietf.org/rfc/rfc4340.txt
          
          If in doubt, say M.
 
index 2efb505aeb3551837f3780f44c4bd981687c5c43..2fbb84bf4e26850d5d4c6094c633a810c677da3c 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 /*
- * This implementation should follow: draft-ietf-dccp-ccid2-10.txt
+ * This implementation should follow RFC 4341
  *
  * BUGS:
  * - sequence number wrapping
index 67d2dc0e7c678e62dd39993c1bf6ae2e724aa64f..cec23ad286de52bed053a873db50d8bc71fcf09d 100644 (file)
@@ -379,8 +379,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
                packet->dccphtx_seqno  = dp->dccps_gss;
                /*
                 * Check if win_count have changed
-                * Algorithm in "8.1. Window Counter Valuer" in
-                * draft-ietf-dccp-ccid3-11.txt
+                * Algorithm in "8.1. Window Counter Value" in RFC 4342.
                 */
                quarter_rtt = timeval_delta(&now, &hctx->ccid3hctx_t_last_win_count);
                if (likely(hctx->ccid3hctx_rtt > 8))
index 0a21be437ed326d227a3e8a590048987c91f5055..272e8584564e68bb06a59f21a511ae413efa971e 100644 (file)
@@ -50,7 +50,7 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo);
 #define DCCP_TIMEWAIT_LEN (60 * HZ) /* how long to wait to destroy TIME-WAIT
                                     * state, about 60 seconds */
 
-/* draft-ietf-dccp-spec-11.txt initial RTO value */
+/* RFC 1122, 4.2.3.1 initial RTO value */
 #define DCCP_TIMEOUT_INIT ((unsigned)(3 * HZ))
 
 /* Maximal interval between probes for local resources.  */
index 7f9dc6ac58c95429ff1b9b311a99f1a2c2488ca1..1d24881ac0abc49ab1f3d35fd5a8b850daed6bad 100644 (file)
@@ -216,11 +216,11 @@ send_sync:
                dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq,
                               DCCP_PKT_SYNCACK);
                /*
-                * From the draft:
+                * From RFC 4340, sec. 5.7
                 *
                 * As with DCCP-Ack packets, DCCP-Sync and DCCP-SyncAck packets
                 * MAY have non-zero-length application data areas, whose
-                * contents receivers MUST ignore.
+                * contents receivers MUST ignore.
                 */
                goto discard;
        }
index aaaf4d09516b0d5dc218ccee0cbcef4933244f0d..e08e7688a263c82d0aca759a0bf68afd30b12392 100644 (file)
@@ -183,7 +183,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
                dccp_sync_mss(sk, mtu);
 
                /*
-                * From: draft-ietf-dccp-spec-11.txt
+                * From RFC 4340, sec. 14.1:
                 *
                 *      DCCP-Sync packets are the best choice for upward
                 *      probing, since DCCP-Sync probes do not risk application
@@ -733,7 +733,7 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb)
        dccp_hdr_reset(skb)->dccph_reset_code =
                                DCCP_SKB_CB(rxskb)->dccpd_reset_code;
 
-       /* See "8.3.1. Abnormal Termination" in draft-ietf-dccp-spec-11 */
+       /* See "8.3.1. Abnormal Termination" in RFC 4340 */
        seqno = 0;
        if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
                dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1);
index c8bf89bfb0883377dba84d594cbc756c4ac62ea8..eb0ff7ab05ed3a1d4062522cf6f58846c82e3fcd 100644 (file)
@@ -550,7 +550,7 @@ static void dccp_v6_ctl_send_reset(struct sk_buff *rxskb)
        dccp_hdr_reset(skb)->dccph_reset_code =
                                DCCP_SKB_CB(rxskb)->dccpd_reset_code;
 
-       /* See "8.3.1. Abnormal Termination" in draft-ietf-dccp-spec-11 */
+       /* See "8.3.1. Abnormal Termination" in RFC 4340 */
        seqno = 0;
        if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
                dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1);
index 07a34696ac976529beeca538352c613dd799bd8c..fb0db1f7cd7bcc0fb28caa62be8eafa458bfe3e7 100644 (file)
@@ -215,7 +215,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
                                      elapsed_time);
                        break;
                        /*
-                        * From draft-ietf-dccp-spec-11.txt:
+                        * From RFC 4340, sec. 10.3:
                         *
                         *      Option numbers 128 through 191 are for
                         *      options sent from the HC-Sender to the
index f8ce8475915966c7d10abbec1542f71b1ac10d0d..955a07abb91df159ff5ba7765e45079f475ff609 100644 (file)
@@ -420,7 +420,7 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
 {
        struct arphdr *rarp;
        unsigned char *rarp_ptr;
-       unsigned long sip, tip;
+       u32 sip, tip;
        unsigned char *sha, *tha;               /* s for "source", t for "target" */
        struct ic_device *d;
 
index 4ab368fa0b8f09af141bf04cfda02849ea82a19d..53bf977cca63424072107de6e9608e6fa021fcab 100644 (file)
@@ -111,7 +111,7 @@ ip6_packet_match(const struct sk_buff *skb,
                 const char *outdev,
                 const struct ip6t_ip6 *ip6info,
                 unsigned int *protoff,
-                int *fragoff)
+                int *fragoff, int *hotdrop)
 {
        size_t i;
        unsigned long ret;
@@ -169,9 +169,11 @@ ip6_packet_match(const struct sk_buff *skb,
                unsigned short _frag_off;
 
                protohdr = ipv6_find_hdr(skb, protoff, -1, &_frag_off);
-               if (protohdr < 0)
+               if (protohdr < 0) {
+                       if (_frag_off == 0)
+                               *hotdrop = 1;
                        return 0;
-
+               }
                *fragoff = _frag_off;
 
                dprintf("Packet protocol %hi ?= %s%hi.\n",
@@ -290,7 +292,7 @@ ip6t_do_table(struct sk_buff **pskb,
                IP_NF_ASSERT(e);
                IP_NF_ASSERT(back);
                if (ip6_packet_match(*pskb, indev, outdev, &e->ipv6,
-                       &protoff, &offset)) {
+                       &protoff, &offset, &hotdrop)) {
                        struct ip6t_entry_target *t;
 
                        if (IP6T_MATCH_ITERATE(e, do_match,
@@ -1438,6 +1440,9 @@ static void __exit ip6_tables_fini(void)
  * If target header is found, its offset is set in *offset and return protocol
  * number. Otherwise, return -1.
  *
+ * If the first fragment doesn't contain the final protocol header or
+ * NEXTHDR_NONE it is considered invalid.
+ *
  * Note that non-1st fragment is special case that "the protocol number
  * of last header" is "next header" field in Fragment header. In this case,
  * *offset is meaningless and fragment offset is stored in *fragoff if fragoff
@@ -1461,12 +1466,12 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
                if ((!ipv6_ext_hdr(nexthdr)) || nexthdr == NEXTHDR_NONE) {
                        if (target < 0)
                                break;
-                       return -1;
+                       return -ENOENT;
                }
 
                hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
                if (hp == NULL)
-                       return -1;
+                       return -EBADMSG;
                if (nexthdr == NEXTHDR_FRAGMENT) {
                        unsigned short _frag_off, *fp;
                        fp = skb_header_pointer(skb,
@@ -1475,7 +1480,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
                                                sizeof(_frag_off),
                                                &_frag_off);
                        if (fp == NULL)
-                               return -1;
+                               return -EBADMSG;
 
                        _frag_off = ntohs(*fp) & ~0x7;
                        if (_frag_off) {
@@ -1486,7 +1491,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
                                                *fragoff = _frag_off;
                                        return hp->nexthdr;
                                }
-                               return -1;
+                               return -ENOENT;
                        }
                        hdrlen = 8;
                } else if (nexthdr == NEXTHDR_AUTH)
index ec1b1608156c53eed8ff6fb5781654c61285a925..46486645eb75251da249a5170e7adc0c11023759 100644 (file)
@@ -54,9 +54,14 @@ match(const struct sk_buff *skb,
        const struct ip6t_ah *ahinfo = matchinfo;
        unsigned int ptr;
        unsigned int hdrlen = 0;
+       int err;
 
-       if (ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL) < 0)
+       err = ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL);
+       if (err < 0) {
+               if (err != -ENOENT)
+                       *hotdrop = 1;
                return 0;
+       }
 
        ah = skb_header_pointer(skb, ptr, sizeof(_ah), &_ah);
        if (ah == NULL) {
index 78d9c8b9e28a55bafc6f211d3eb8ac8113579f7f..cd22eaaccdca9547a90d9679dd299d971938c795 100644 (file)
@@ -52,9 +52,14 @@ match(const struct sk_buff *skb,
        struct frag_hdr _frag, *fh;
        const struct ip6t_frag *fraginfo = matchinfo;
        unsigned int ptr;
+       int err;
 
-       if (ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL) < 0)
+       err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL);
+       if (err < 0) {
+               if (err != -ENOENT)
+                       *hotdrop = 1;
                return 0;
+       }
 
        fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag);
        if (fh == NULL) {
index d32a205e3af298a0673854efde48eb4b7eaba7eb..3f25babe044068625a95ea3886b05b7b7365482f 100644 (file)
@@ -65,9 +65,14 @@ match(const struct sk_buff *skb,
        u8 _opttype, *tp = NULL;
        u8 _optlen, *lp = NULL;
        unsigned int optlen;
+       int err;
 
-       if (ipv6_find_hdr(skb, &ptr, match->data, NULL) < 0)
+       err = ipv6_find_hdr(skb, &ptr, match->data, NULL);
+       if (err < 0) {
+               if (err != -ENOENT)
+                       *hotdrop = 1;
                return 0;
+       }
 
        oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
        if (oh == NULL) {
index bcb2e168a5bc9e83491ac84009faf341b7f624a1..54d7d14134fdae695496ed150c6c241431075789 100644 (file)
@@ -58,9 +58,14 @@ match(const struct sk_buff *skb,
        unsigned int hdrlen = 0;
        unsigned int ret = 0;
        struct in6_addr *ap, _addr;
+       int err;
 
-       if (ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL) < 0)
+       err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL);
+       if (err < 0) {
+               if (err != -ENOENT)
+                       *hotdrop = 1;
                return 0;
+       }
 
        rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route);
        if (rh == NULL) {
index 84bbf8474f3eb659fea321cac5629ff1e96a0d48..899de9ed22a678d8b8193f141f0bf24799bc1ab7 100644 (file)
@@ -505,6 +505,14 @@ __xfrm_state_locate(struct xfrm_state *x, int use_spi, int family)
                                                  x->id.proto, family);
 }
 
+static void xfrm_hash_grow_check(int have_hash_collision)
+{
+       if (have_hash_collision &&
+           (xfrm_state_hmask + 1) < xfrm_state_hashmax &&
+           xfrm_state_num > xfrm_state_hmask)
+               schedule_work(&xfrm_hash_work);
+}
+
 struct xfrm_state *
 xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, 
                struct flowi *fl, struct xfrm_tmpl *tmpl,
@@ -598,6 +606,8 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
                        x->lft.hard_add_expires_seconds = XFRM_ACQ_EXPIRES;
                        x->timer.expires = jiffies + XFRM_ACQ_EXPIRES*HZ;
                        add_timer(&x->timer);
+                       xfrm_state_num++;
+                       xfrm_hash_grow_check(x->bydst.next != NULL);
                } else {
                        x->km.state = XFRM_STATE_DEAD;
                        xfrm_state_put(x);
@@ -614,14 +624,6 @@ out:
        return x;
 }
 
-static void xfrm_hash_grow_check(int have_hash_collision)
-{
-       if (have_hash_collision &&
-           (xfrm_state_hmask + 1) < xfrm_state_hashmax &&
-           xfrm_state_num > xfrm_state_hmask)
-               schedule_work(&xfrm_hash_work);
-}
-
 static void __xfrm_state_insert(struct xfrm_state *x)
 {
        unsigned int h;
index 41277963f47a811eece19639e1dac22821fd4b04..2e1141623147887ffa2f91bb6e53b362a0a5f821 100644 (file)
@@ -921,6 +921,8 @@ static int init_section_ref_ok(const char *name)
                ".fixup",
                ".smp_locks",
                ".plt",  /* seen on ARCH=um build on x86_64. Harmless */
+               "__ftr_fixup",          /* powerpc cpu feature fixup */
+               "__fw_ftr_fixup",       /* powerpc firmware feature fixup */
                NULL
        };
        /* Start of section names */
index 7f22dab0724040491851d109f2617db23a694a48..9c1bce7afa867b169a33271b0b053bbce7ebf830 100644 (file)
@@ -1961,6 +1961,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
                .name = "Tyan Thunder K8WE",
                .type = AC97_TUNE_HP_ONLY
        },
+       {
+               .subvendor = 0x10f7,
+               .subdevice = 0x834c,
+               .name = "Panasonic CF-R4",
+               .type = AC97_TUNE_HP_ONLY,
+       },
        {
                .subvendor = 0x110a,
                .subdevice = 0x0056,