Revert "Merge remote branch 'linux-2.6.32.y/master' into develop"
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 08:11:20 +0000 (16:11 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 08:11:20 +0000 (16:11 +0800)
This reverts commit 84aa38e58d1115f2562cdbed32c57ed9a6e460e8, reversing
changes made to 9505d021e0c4e93eb854ae380529c04c81ddcf6f.

54 files changed:
arch/x86/include/asm/processor.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/probe_64.c
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/smpboot.c
arch/x86/vdso/Makefile
block/blk-merge.c
block/blk-settings.c
drivers/acpi/acpica/dswexec.c
drivers/acpi/ec.c
drivers/char/hvc_console.c
drivers/char/tty_ldisc.c
drivers/dma/mv_xor.c
drivers/edac/amd64_edac.c
drivers/gpu/drm/drm_crtc.c
drivers/hid/hidraw.c
drivers/hwmon/adm1026.c
drivers/infiniband/core/uverbs_cmd.c
drivers/md/dm-table.c
drivers/md/md.c
drivers/net/igb/igb_main.c
drivers/pci/dmar.c
drivers/pci/quirks.c
drivers/scsi/bfa/bfa_core.c
drivers/scsi/scsi_lib.c
drivers/usb/misc/uss720.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/storage/unusual_devs.h
fs/exec.c
fs/fuse/file.c
fs/nfs/file.c
fs/nfs/mount_clnt.c
fs/nfsd/nfs3xdr.c
include/linux/blkdev.h
include/linux/nfsd/xdr4.h
include/net/sctp/sm.h
include/net/sctp/structs.h
kernel/exit.c
kernel/power/user.c
kernel/printk.c
kernel/timer.c
kernel/trace/trace.c
mm/mmap.c
net/core/dev.c
net/sctp/input.c
net/sctp/sm_sideeffect.c
net/sctp/transport.c
net/sunrpc/svc_xprt.c
security/integrity/ima/ima_policy.c
sound/oss/soundcard.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c

index 78bb4d74292cec51b0b3f1c8a45da531f0cb56ad..13b1885fe276171e79c888db27b1b3688cf10e70 100644 (file)
@@ -765,6 +765,29 @@ extern unsigned long               boot_option_idle_override;
 extern unsigned long           idle_halt;
 extern unsigned long           idle_nomwait;
 
+/*
+ * on systems with caches, caches must be flashed as the absolute
+ * last instruction before going into a suspended halt.  Otherwise,
+ * dirty data can linger in the cache and become stale on resume,
+ * leading to strange errors.
+ *
+ * perform a variety of operations to guarantee that the compiler
+ * will not reorder instructions.  wbinvd itself is serializing
+ * so the processor will not reorder.
+ *
+ * Systems without cache can just go into halt.
+ */
+static inline void wbinvd_halt(void)
+{
+       mb();
+       /* check for clflush to determine if wbinvd is legal */
+       if (cpu_has_clflush)
+               asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory");
+       else
+               while (1)
+                       halt();
+}
+
 extern void enable_sep_cpu(void);
 extern int sysenter_setup(void);
 
index 1d2d6704f5d12a8367ebd9d4e605041933b3d320..6702ab74c58c7dfeea0c6743431e6b9259fe4927 100644 (file)
@@ -1361,14 +1361,6 @@ void __cpuinit end_local_APIC_setup(void)
 
        setup_apic_nmi_watchdog(NULL);
        apic_pm_activate();
-
-       /*
-        * Now that local APIC setup is completed for BP, configure the fault
-        * handling for interrupt remapping.
-        */
-       if (!smp_processor_id() && intr_remapping_enabled)
-               enable_drhd_fault_handling();
-
 }
 
 #ifdef CONFIG_X86_X2APIC
index 8928d9785eb46587dd75d4e8b8e8986c0e0d5207..d850eeb19243c7e582a289ddc6c8bf4d878092b6 100644 (file)
@@ -3567,7 +3567,6 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
        msg.data |= MSI_DATA_VECTOR(cfg->vector);
        msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
        msg.address_lo |= MSI_ADDR_DEST_ID(dest);
-       msg.address_hi = MSI_ADDR_BASE_HI | MSI_ADDR_EXT_DEST_ID(dest);
 
        dmar_msi_write(irq, &msg);
 
index 9924e72069e570807841690da804b012ae6a1b7c..4c56f544f1676a06ce9bca808d1c6fae943840d2 100644 (file)
@@ -76,6 +76,13 @@ void __init default_setup_apic_routing(void)
                /* need to update phys_pkg_id */
                apic->phys_pkg_id = apicid_phys_pkg_id;
        }
+
+       /*
+        * Now that apic routing model is selected, configure the
+        * fault handling for intr remapping.
+        */
+       if (intr_remapping_enabled)
+               enable_drhd_fault_handling();
 }
 
 /* Same for both flat and physical. */
index 4d707d3c3e726c906a04e664f8f16dc8ef033500..3940fee7ea9fb3fa4f90eaee674c6ce32fa2ba16 100644 (file)
@@ -305,7 +305,8 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
        /* use socket ID also for last level cache */
        per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
        /* fixup topology information on multi-node processors */
-       amd_fixup_dcm(c);
+       if ((c->x86 == 0x10) && (c->x86_model == 9))
+               amd_fixup_dcm(c);
 #endif
 }
 
index 539bb6cacf54ded73356e17b5621453d57ec8fd8..7e8e905e2ccb98c1fe79c11fda27d122420401c5 100644 (file)
@@ -1338,94 +1338,11 @@ void play_dead_common(void)
        local_irq_disable();
 }
 
-#define MWAIT_SUBSTATE_MASK            0xf
-#define MWAIT_SUBSTATE_SIZE            4
-
-#define CPUID_MWAIT_LEAF               5
-#define CPUID5_ECX_EXTENSIONS_SUPPORTED 0x1
-
-/*
- * We need to flush the caches before going to sleep, lest we have
- * dirty data in our caches when we come back up.
- */
-static inline void mwait_play_dead(void)
-{
-       unsigned int eax, ebx, ecx, edx;
-       unsigned int highest_cstate = 0;
-       unsigned int highest_subcstate = 0;
-       int i;
-       void *mwait_ptr;
-
-       if (!cpu_has(&current_cpu_data, X86_FEATURE_MWAIT))
-               return;
-       if (!cpu_has(&current_cpu_data, X86_FEATURE_CLFLSH))
-               return;
-       if (current_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
-               return;
-
-       eax = CPUID_MWAIT_LEAF;
-       ecx = 0;
-       native_cpuid(&eax, &ebx, &ecx, &edx);
-
-       /*
-        * eax will be 0 if EDX enumeration is not valid.
-        * Initialized below to cstate, sub_cstate value when EDX is valid.
-        */
-       if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED)) {
-               eax = 0;
-       } else {
-               edx >>= MWAIT_SUBSTATE_SIZE;
-               for (i = 0; i < 7 && edx; i++, edx >>= MWAIT_SUBSTATE_SIZE) {
-                       if (edx & MWAIT_SUBSTATE_MASK) {
-                               highest_cstate = i;
-                               highest_subcstate = edx & MWAIT_SUBSTATE_MASK;
-                       }
-               }
-               eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) |
-                       (highest_subcstate - 1);
-       }
-
-       /*
-        * This should be a memory location in a cache line which is
-        * unlikely to be touched by other processors.  The actual
-        * content is immaterial as it is not actually modified in any way.
-        */
-       mwait_ptr = &current_thread_info()->flags;
-
-       wbinvd();
-
-       while (1) {
-               /*
-                * The CLFLUSH is a workaround for erratum AAI65 for
-                * the Xeon 7400 series.  It's not clear it is actually
-                * needed, but it should be harmless in either case.
-                * The WBINVD is insufficient due to the spurious-wakeup
-                * case where we return around the loop.
-                */
-               clflush(mwait_ptr);
-               __monitor(mwait_ptr, 0, 0);
-               mb();
-               __mwait(eax, 0);
-       }
-}
-
-static inline void hlt_play_dead(void)
-{
-       if (current_cpu_data.x86 >= 4)
-               wbinvd();
-
-       while (1) {
-               native_halt();
-       }
-}
-
 void native_play_dead(void)
 {
        play_dead_common();
        tboot_shutdown(TB_SHUTDOWN_WFS);
-
-       mwait_play_dead();      /* Only returns on failure */
-       hlt_play_dead();
+       wbinvd_halt();
 }
 
 #else /* ... !CONFIG_HOTPLUG_CPU */
index dd78ef687c5e1da0130a5c0d671ca51cd52a8f89..6b4ffedb93c9f62e2d65874c7d27ef056fd9e8b9 100644 (file)
@@ -25,7 +25,7 @@ targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y)
 
 export CPPFLAGS_vdso.lds += -P -C
 
-VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
+VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -Wl,-soname=linux-vdso.so.1 \
                        -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
 
 $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
@@ -69,7 +69,7 @@ vdso32.so-$(VDSO32-y)         += sysenter
 vdso32-images                  = $(vdso32.so-y:%=vdso32-%.so)
 
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
-VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1
+VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
 
 # This makes sure the $(obj) subdirectory exists even though vdso32/
 # is not a kbuild sub-make subdirectory.
index 1912090f764e495d159674332bd6f4816af003b9..99cb5cf1f447fa8759d73f06bf64fe4b20eec580 100644 (file)
@@ -22,7 +22,7 @@ static unsigned int __blk_recalc_rq_segments(struct request_queue *q,
                return 0;
 
        fbio = bio;
-       cluster = blk_queue_cluster(q);
+       cluster = test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
        seg_size = 0;
        phys_size = nr_phys_segs = 0;
        for_each_bio(bio) {
@@ -88,7 +88,7 @@ EXPORT_SYMBOL(blk_recount_segments);
 static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
                                   struct bio *nxt)
 {
-       if (!blk_queue_cluster(q))
+       if (!test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags))
                return 0;
 
        if (bio->bi_seg_back_size + nxt->bi_seg_front_size >
@@ -124,7 +124,7 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
        int nsegs, cluster;
 
        nsegs = 0;
-       cluster = blk_queue_cluster(q);
+       cluster = test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
 
        /*
         * for each bio in rq
index 112c4f7c7121f6e9602f50f407a89c9082f323a2..7c7b8c1c190f75faadb5318ded7cfa1febc71a8d 100644 (file)
@@ -103,7 +103,7 @@ void blk_set_default_limits(struct queue_limits *lim)
        lim->alignment_offset = 0;
        lim->io_opt = 0;
        lim->misaligned = 0;
-       lim->cluster = 1;
+       lim->no_cluster = 0;
 }
 EXPORT_SYMBOL(blk_set_default_limits);
 
@@ -477,6 +477,15 @@ EXPORT_SYMBOL(blk_queue_io_opt);
 void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
 {
        blk_stack_limits(&t->limits, &b->limits, 0);
+
+       if (!t->queue_lock)
+               WARN_ON_ONCE(1);
+       else if (!test_bit(QUEUE_FLAG_CLUSTER, &b->queue_flags)) {
+               unsigned long flags;
+               spin_lock_irqsave(t->queue_lock, flags);
+               queue_flag_clear(QUEUE_FLAG_CLUSTER, t);
+               spin_unlock_irqrestore(t->queue_lock, flags);
+       }
 }
 EXPORT_SYMBOL(blk_queue_stack_limits);
 
@@ -552,7 +561,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
        t->io_min = max(t->io_min, b->io_min);
        t->io_opt = lcm(t->io_opt, b->io_opt);
 
-       t->cluster &= b->cluster;
+       t->no_cluster |= b->no_cluster;
 
        /* Physical block size a multiple of the logical block size? */
        if (t->physical_block_size & (t->logical_block_size - 1)) {
@@ -643,6 +652,17 @@ void disk_stack_limits(struct gendisk *disk, struct block_device *bdev,
                printk(KERN_NOTICE "%s: Warning: Device %s is misaligned\n",
                       top, bottom);
        }
+
+       if (!t->queue_lock)
+               WARN_ON_ONCE(1);
+       else if (!test_bit(QUEUE_FLAG_CLUSTER, &b->queue_flags)) {
+               unsigned long flags;
+
+               spin_lock_irqsave(t->queue_lock, flags);
+               if (!test_bit(QUEUE_FLAG_CLUSTER, &b->queue_flags))
+                       queue_flag_clear(QUEUE_FLAG_CLUSTER, t);
+               spin_unlock_irqrestore(t->queue_lock, flags);
+       }
 }
 EXPORT_SYMBOL(disk_stack_limits);
 
index eef6fde76abdee7a504ce8b8b663a486a0f24d5d..f0280856dc0e1040d535a8db1b7f3f28cbcfde21 100644 (file)
@@ -300,25 +300,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
                         * we must enter this object into the namespace.  The created
                         * object is temporary and will be deleted upon completion of
                         * the execution of this method.
-                        *
-                        * Note 10/2010: Except for the Scope() op. This opcode does
-                        * not actually create a new object, it refers to an existing
-                        * object. However, for Scope(), we want to indeed open a
-                        * new scope.
                         */
-                       if (op->common.aml_opcode != AML_SCOPE_OP) {
-                               status =
-                                   acpi_ds_load2_begin_op(walk_state, NULL);
-                       } else {
-                               status =
-                                   acpi_ds_scope_stack_push(op->named.node,
-                                                            op->named.node->
-                                                            type, walk_state);
-                               if (ACPI_FAILURE(status)) {
-                                       return_ACPI_STATUS(status);
-                               }
-                       }
+                       status = acpi_ds_load2_begin_op(walk_state, NULL);
                }
+
                break;
 
        case AML_CLASS_EXECUTE:
index 960696a4b362341d89507dcea8295d9eef3f512e..45d2aa93258ed3881a33c13fa58d83fb49821e33 100644 (file)
@@ -953,9 +953,6 @@ static struct dmi_system_id __initdata ec_dmi_table[] = {
        ec_flag_msi, "MSI hardware", {
        DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-Star")}, NULL},
        {
-       ec_flag_msi, "MSI hardware", {
-       DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL},
-       {
        ec_validate_ecdt, "ASUS hardware", {
        DMI_MATCH(DMI_BIOS_VENDOR, "ASUS") }, NULL},
        {},
index f05e0fad171e8895f5f0b06632a04b7a89d25759..a632f25f144a8509b91d92ea4660636d9a998a69 100644 (file)
@@ -312,7 +312,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
        spin_lock_irqsave(&hp->lock, flags);
        /* Check and then increment for fast path open. */
        if (hp->count++ > 0) {
-               tty_kref_get(tty);
                spin_unlock_irqrestore(&hp->lock, flags);
                hvc_kick();
                return 0;
@@ -320,7 +319,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
 
        tty->driver_data = hp;
 
-       hp->tty = tty_kref_get(tty);
+       hp->tty = tty;
 
        spin_unlock_irqrestore(&hp->lock, flags);
 
@@ -337,7 +336,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
                spin_lock_irqsave(&hp->lock, flags);
                hp->tty = NULL;
                spin_unlock_irqrestore(&hp->lock, flags);
-               tty_kref_put(tty);
                tty->driver_data = NULL;
                kref_put(&hp->kref, destroy_hvc_struct);
                printk(KERN_ERR "hvc_open: request_irq failed with rc %d.\n", rc);
@@ -365,7 +363,6 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
                return;
 
        hp = tty->driver_data;
-
        spin_lock_irqsave(&hp->lock, flags);
 
        if (--hp->count == 0) {
@@ -392,7 +389,6 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
                spin_unlock_irqrestore(&hp->lock, flags);
        }
 
-       tty_kref_put(tty);
        kref_put(&hp->kref, destroy_hvc_struct);
 }
 
@@ -428,11 +424,10 @@ static void hvc_hangup(struct tty_struct *tty)
        spin_unlock_irqrestore(&hp->lock, flags);
 
        if (hp->ops->notifier_hangup)
-               hp->ops->notifier_hangup(hp, hp->data);
+                       hp->ops->notifier_hangup(hp, hp->data);
 
        while(temp_open_count) {
                --temp_open_count;
-               tty_kref_put(tty);
                kref_put(&hp->kref, destroy_hvc_struct);
        }
 }
@@ -597,7 +592,7 @@ int hvc_poll(struct hvc_struct *hp)
        }
 
        /* No tty attached, just skip */
-       tty = tty_kref_get(hp->tty);
+       tty = hp->tty;
        if (tty == NULL)
                goto bail;
 
@@ -677,8 +672,6 @@ int hvc_poll(struct hvc_struct *hp)
 
                tty_flip_buffer_push(tty);
        }
-       if (tty)
-               tty_kref_put(tty);
 
        return poll_mask;
 }
@@ -813,7 +806,7 @@ int hvc_remove(struct hvc_struct *hp)
        struct tty_struct *tty;
 
        spin_lock_irqsave(&hp->lock, flags);
-       tty = tty_kref_get(hp->tty);
+       tty = hp->tty;
 
        if (hp->index < MAX_NR_HVC_CONSOLES)
                vtermnos[hp->index] = -1;
@@ -825,18 +818,18 @@ int hvc_remove(struct hvc_struct *hp)
        /*
         * We 'put' the instance that was grabbed when the kref instance
         * was initialized using kref_init().  Let the last holder of this
-        * kref cause it to be removed, which will probably be the tty_vhangup
+        * kref cause it to be removed, which will probably be the tty_hangup
         * below.
         */
        kref_put(&hp->kref, destroy_hvc_struct);
 
        /*
-        * This function call will auto chain call hvc_hangup.
+        * This function call will auto chain call hvc_hangup.  The tty should
+        * always be valid at this time unless a simultaneous tty close already
+        * cleaned up the hvc_struct.
         */
-       if (tty) {
-               tty_vhangup(tty);
-               tty_kref_put(tty);
-       }
+       if (tty)
+               tty_hangup(tty);
        return 0;
 }
 
index cf0bfc6b1dbd64753372c3c59bf6b81a4a3a0512..8b9f1a5c8be87e63ae41794317915d4744eb368a 100644 (file)
@@ -451,7 +451,6 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
                ret = ld->ops->open(tty);
                if (ret)
                        clear_bit(TTY_LDISC_OPEN, &tty->flags);
-               return ret;
        }
        return 0;
 }
index 076d599a1bde07d99b1c3973cd3dcfc3f924f049..f2b44d51d826cec394890d1578606c67e2fa7d11 100644 (file)
@@ -448,7 +448,7 @@ mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan)
 static void mv_xor_tasklet(unsigned long data)
 {
        struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
-       mv_xor_slot_cleanup(chan);
+       __mv_xor_slot_cleanup(chan);
 }
 
 static struct mv_xor_desc_slot *
index 85c464a9a1eb52135fbc043fb7ab7f7abe83d422..2aa339e94968e5294cb22e2a570719d82639f18a 100644 (file)
@@ -1628,7 +1628,7 @@ static int f10_match_to_this_node(struct amd64_pvt *pvt, int dram_range,
        debugf1("   HoleOffset=0x%x  HoleValid=0x%x IntlvSel=0x%x\n",
                        hole_off, hole_valid, intlv_sel);
 
-       if (intlv_en &&
+       if (intlv_en ||
            (intlv_sel != ((sys_addr >> 12) & intlv_en)))
                return -EINVAL;
 
index bea6efc55139b1975587c1f33d2c76059c78111e..5cae0b3eee9be491c1a9b23a1a1ba0b156ff19bd 100644 (file)
@@ -144,10 +144,10 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
        { DRM_MODE_CONNECTOR_SVIDEO, "SVIDEO", 0 },
        { DRM_MODE_CONNECTOR_LVDS, "LVDS", 0 },
        { DRM_MODE_CONNECTOR_Component, "Component", 0 },
-       { DRM_MODE_CONNECTOR_9PinDIN, "DIN", 0 },
-       { DRM_MODE_CONNECTOR_DisplayPort, "DP", 0 },
-       { DRM_MODE_CONNECTOR_HDMIA, "HDMI-A", 0 },
-       { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B", 0 },
+       { DRM_MODE_CONNECTOR_9PinDIN, "9-pin DIN", 0 },
+       { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 },
+       { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 },
+       { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 },
        { DRM_MODE_CONNECTOR_TV, "TV", 0 },
 };
 
index 5b57551233f4c52cb12283121c4dcbbe55bc9e54..66579c0bf32821c7c418e2114fa524f9d896965f 100644 (file)
@@ -211,14 +211,11 @@ static int hidraw_release(struct inode * inode, struct file * file)
        unsigned int minor = iminor(inode);
        struct hidraw *dev;
        struct hidraw_list *list = file->private_data;
-       int ret;
 
-       mutex_lock(&minors_lock);
        if (!hidraw_table[minor]) {
                printk(KERN_EMERG "hidraw device with minor %d doesn't exist\n",
                                minor);
-               ret = -ENODEV;
-               goto unlock;
+               return -ENODEV;
        }
 
        list_del(&list->node);
@@ -232,12 +229,10 @@ static int hidraw_release(struct inode * inode, struct file * file)
                        kfree(list->hidraw);
                }
        }
+
        kfree(list);
-       ret = 0;
-unlock:
-       mutex_unlock(&minors_lock);
 
-       return ret;
+       return 0;
 }
 
 static long hidraw_ioctl(struct file *file, unsigned int cmd,
index b7ba80c7b0c15718dde14802121ae781b0d896c8..ff7de40b6e35267c2836b03a98d4017e74e6414e 100644 (file)
@@ -919,27 +919,27 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
        int nr = sensor_attr->index;
        struct i2c_client *client = to_i2c_client(dev);
        struct adm1026_data *data = i2c_get_clientdata(client);
-       int val, orig_div, new_div;
+       int val, orig_div, new_div, shift;
 
        val = simple_strtol(buf, NULL, 10);
        new_div = DIV_TO_REG(val);
-
+       if (new_div == 0) {
+               return -EINVAL;
+       }
        mutex_lock(&data->update_lock);
        orig_div = data->fan_div[nr];
        data->fan_div[nr] = DIV_FROM_REG(new_div);
 
        if (nr < 4) { /* 0 <= nr < 4 */
+               shift = 2 * nr;
                adm1026_write_value(client, ADM1026_REG_FAN_DIV_0_3,
-                                   (DIV_TO_REG(data->fan_div[0]) << 0) |
-                                   (DIV_TO_REG(data->fan_div[1]) << 2) |
-                                   (DIV_TO_REG(data->fan_div[2]) << 4) |
-                                   (DIV_TO_REG(data->fan_div[3]) << 6));
+                       ((DIV_TO_REG(orig_div) & (~(0x03 << shift))) |
+                       (new_div << shift)));
        } else { /* 3 < nr < 8 */
+               shift = 2 * (nr - 4);
                adm1026_write_value(client, ADM1026_REG_FAN_DIV_4_7,
-                                   (DIV_TO_REG(data->fan_div[4]) << 0) |
-                                   (DIV_TO_REG(data->fan_div[5]) << 2) |
-                                   (DIV_TO_REG(data->fan_div[6]) << 4) |
-                                   (DIV_TO_REG(data->fan_div[7]) << 6));
+                       ((DIV_TO_REG(orig_div) & (~(0x03 << (2 * shift)))) |
+                       (new_div << shift)));
        }
 
        if (data->fan_div[nr] != orig_div) {
index fadfdf0e4523d6a95802db07f43ab59318336f39..56feab6c251edd8e688647ee0cbf6617522b6e1c 100644 (file)
@@ -875,81 +875,68 @@ out:
        return ret ? ret : in_len;
 }
 
-static int copy_wc_to_user(void __user *dest, struct ib_wc *wc)
-{
-       struct ib_uverbs_wc tmp;
-
-       tmp.wr_id               = wc->wr_id;
-       tmp.status              = wc->status;
-       tmp.opcode              = wc->opcode;
-       tmp.vendor_err          = wc->vendor_err;
-       tmp.byte_len            = wc->byte_len;
-       tmp.ex.imm_data         = (__u32 __force) wc->ex.imm_data;
-       tmp.qp_num              = wc->qp->qp_num;
-       tmp.src_qp              = wc->src_qp;
-       tmp.wc_flags            = wc->wc_flags;
-       tmp.pkey_index          = wc->pkey_index;
-       tmp.slid                = wc->slid;
-       tmp.sl                  = wc->sl;
-       tmp.dlid_path_bits      = wc->dlid_path_bits;
-       tmp.port_num            = wc->port_num;
-       tmp.reserved            = 0;
-
-       if (copy_to_user(dest, &tmp, sizeof tmp))
-               return -EFAULT;
-
-       return 0;
-}
-
 ssize_t ib_uverbs_poll_cq(struct ib_uverbs_file *file,
                          const char __user *buf, int in_len,
                          int out_len)
 {
        struct ib_uverbs_poll_cq       cmd;
-       struct ib_uverbs_poll_cq_resp  resp;
-       u8 __user                     *header_ptr;
-       u8 __user                     *data_ptr;
+       struct ib_uverbs_poll_cq_resp *resp;
        struct ib_cq                  *cq;
-       struct ib_wc                   wc;
-       int                            ret;
+       struct ib_wc                  *wc;
+       int                            ret = 0;
+       int                            i;
+       int                            rsize;
 
        if (copy_from_user(&cmd, buf, sizeof cmd))
                return -EFAULT;
 
-       cq = idr_read_cq(cmd.cq_handle, file->ucontext, 0);
-       if (!cq)
-               return -EINVAL;
+       wc = kmalloc(cmd.ne * sizeof *wc, GFP_KERNEL);
+       if (!wc)
+               return -ENOMEM;
 
-       /* we copy a struct ib_uverbs_poll_cq_resp to user space */
-       header_ptr = (void __user *)(unsigned long) cmd.response;
-       data_ptr = header_ptr + sizeof resp;
+       rsize = sizeof *resp + cmd.ne * sizeof(struct ib_uverbs_wc);
+       resp = kmalloc(rsize, GFP_KERNEL);
+       if (!resp) {
+               ret = -ENOMEM;
+               goto out_wc;
+       }
 
-       memset(&resp, 0, sizeof resp);
-       while (resp.count < cmd.ne) {
-               ret = ib_poll_cq(cq, 1, &wc);
-               if (ret < 0)
-                       goto out_put;
-               if (!ret)
-                       break;
+       cq = idr_read_cq(cmd.cq_handle, file->ucontext, 0);
+       if (!cq) {
+               ret = -EINVAL;
+               goto out;
+       }
 
-               ret = copy_wc_to_user(data_ptr, &wc);
-               if (ret)
-                       goto out_put;
+       resp->count = ib_poll_cq(cq, cmd.ne, wc);
+
+       put_cq_read(cq);
 
-               data_ptr += sizeof(struct ib_uverbs_wc);
-               ++resp.count;
+       for (i = 0; i < resp->count; i++) {
+               resp->wc[i].wr_id          = wc[i].wr_id;
+               resp->wc[i].status         = wc[i].status;
+               resp->wc[i].opcode         = wc[i].opcode;
+               resp->wc[i].vendor_err     = wc[i].vendor_err;
+               resp->wc[i].byte_len       = wc[i].byte_len;
+               resp->wc[i].ex.imm_data    = (__u32 __force) wc[i].ex.imm_data;
+               resp->wc[i].qp_num         = wc[i].qp->qp_num;
+               resp->wc[i].src_qp         = wc[i].src_qp;
+               resp->wc[i].wc_flags       = wc[i].wc_flags;
+               resp->wc[i].pkey_index     = wc[i].pkey_index;
+               resp->wc[i].slid           = wc[i].slid;
+               resp->wc[i].sl             = wc[i].sl;
+               resp->wc[i].dlid_path_bits = wc[i].dlid_path_bits;
+               resp->wc[i].port_num       = wc[i].port_num;
        }
 
-       if (copy_to_user(header_ptr, &resp, sizeof resp)) {
+       if (copy_to_user((void __user *) (unsigned long) cmd.response, resp, rsize))
                ret = -EFAULT;
-               goto out_put;
-       }
 
-       ret = in_len;
+out:
+       kfree(resp);
 
-out_put:
-       put_cq_read(cq);
-       return ret;
+out_wc:
+       kfree(wc);
+       return ret ? ret : in_len;
 }
 
 ssize_t ib_uverbs_req_notify_cq(struct ib_uverbs_file *file,
index 57f32f075e349331f600092618d5c6426b34292f..e86912864e0443a348f3a829f64f5ed48c2212fb 100644 (file)
@@ -1082,6 +1082,11 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
         */
        q->limits = *limits;
 
+       if (limits->no_cluster)
+               queue_flag_clear_unlocked(QUEUE_FLAG_CLUSTER, q);
+       else
+               queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, q);
+
        dm_table_set_integrity(t);
 
        /*
index 2c66c7ea32007985fde4d164e1a8c0859fe6ea50..0352746824596940713760f57bff737e10aae0b8 100644 (file)
@@ -3959,6 +3959,9 @@ static int md_alloc(dev_t dev, char *name)
                goto abort;
        mddev->queue->queuedata = mddev;
 
+       /* Can be unlocked because the queue is new: no concurrency */
+       queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, mddev->queue);
+
        blk_queue_make_request(mddev->queue, md_make_request);
 
        disk = alloc_disk(1 << shift);
@@ -4799,7 +4802,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
                                PTR_ERR(rdev));
                        return PTR_ERR(rdev);
                }
-               /* set saved_raid_disk if appropriate */
+               /* set save_raid_disk if appropriate */
                if (!mddev->persistent) {
                        if (info->state & (1<<MD_DISK_SYNC)  &&
                            info->raid_disk < mddev->raid_disks)
@@ -4809,10 +4812,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
                } else
                        super_types[mddev->major_version].
                                validate_super(mddev, rdev);
-               if (test_bit(In_sync, &rdev->flags))
-                       rdev->saved_raid_disk = rdev->raid_disk;
-               else
-                       rdev->saved_raid_disk = -1;
+               rdev->saved_raid_disk = rdev->raid_disk;
 
                clear_bit(In_sync, &rdev->flags); /* just to be sure */
                if (info->state & (1<<MD_DISK_WRITEMOSTLY))
index 9e3d87abb9ac7987b040298cad28cfe461cc15a7..8111776927ae30ffcbc60ffb56daebbe80f744a0 100644 (file)
@@ -4560,7 +4560,7 @@ static void igb_receive_skb(struct igb_ring *ring, u8 status,
        bool vlan_extracted = (adapter->vlgrp && (status & E1000_RXD_STAT_VP));
 
        skb_record_rx_queue(skb, ring->queue_index);
-       if (vlan_extracted && adapter->vlgrp)
+       if (vlan_extracted)
                vlan_gro_receive(&ring->napi, adapter->vlgrp,
                                 le16_to_cpu(rx_desc->wb.upper.vlan),
                                 skb);
index 91d039016ad93ab776177670975fd8c81ec9e26e..57530361f15d10ec0f945b8071d42f4aee486ab7 100644 (file)
@@ -1380,11 +1380,6 @@ int __init enable_drhd_fault_handling(void)
                               (unsigned long long)drhd->reg_base_addr, ret);
                        return -1;
                }
-
-               /*
-                * Clear any previous faults.
-                */
-               dmar_fault(iommu->irq, iommu);
        }
 
        return 0;
index 448393de12276c569dd7902aad6959adf81457f9..4633fc228603b5477f91b7a9a7979659fedf4280 100644 (file)
@@ -2575,29 +2575,6 @@ extern struct pci_fixup __end_pci_fixups_resume_early[];
 extern struct pci_fixup __start_pci_fixups_suspend[];
 extern struct pci_fixup __end_pci_fixups_suspend[];
 
-#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP)
-#define VTUNCERRMSK_REG        0x1ac
-#define VTD_MSK_SPEC_ERRORS    (1 << 31)
-/*
- * This is a quirk for masking vt-d spec defined errors to platform error
- * handling logic. With out this, platforms using Intel 7500, 5500 chipsets
- * (and the derivative chipsets like X58 etc) seem to generate NMI/SMI (based
- * on the RAS config settings of the platform) when a vt-d fault happens.
- * The resulting SMI caused the system to hang.
- *
- * VT-d spec related errors are already handled by the VT-d OS code, so no
- * need to report the same error through other channels.
- */
-static void vtd_mask_spec_errors(struct pci_dev *dev)
-{
-       u32 word;
-
-       pci_read_config_dword(dev, VTUNCERRMSK_REG, &word);
-       pci_write_config_dword(dev, VTUNCERRMSK_REG, word | VTD_MSK_SPEC_ERRORS);
-}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, vtd_mask_spec_errors);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
-#endif
 
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
 {
index 1472701b7f50d2e9e7225d53a3c9b2cc0cd88149..44e2d1155c51a20ef88febe563941c58aa1716ad 100644 (file)
@@ -84,32 +84,11 @@ bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo)
        for (i = 0; hal_mods[i]; i++)
                hal_mods[i]->meminfo(cfg, &km_len, &dm_len);
 
-       dm_len += bfa_port_meminfo();
 
        meminfo->meminfo[BFA_MEM_TYPE_KVA - 1].mem_len = km_len;
        meminfo->meminfo[BFA_MEM_TYPE_DMA - 1].mem_len = dm_len;
 }
 
-static void
-bfa_com_port_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi)
-{
-       struct bfa_port_s       *port = &bfa->modules.port;
-       uint32_t                dm_len;
-       uint8_t                 *dm_kva;
-       uint64_t                dm_pa;
-
-       dm_len = bfa_port_meminfo();
-       dm_kva = bfa_meminfo_dma_virt(mi);
-       dm_pa  = bfa_meminfo_dma_phys(mi);
-
-       memset(port, 0, sizeof(struct bfa_port_s));
-       bfa_port_attach(port, &bfa->ioc, bfa, bfa->trcmod, bfa->logm);
-       bfa_port_mem_claim(port, dm_kva, dm_pa);
-
-       bfa_meminfo_dma_virt(mi) = dm_kva + dm_len;
-       bfa_meminfo_dma_phys(mi) = dm_pa + dm_len;
-}
-
 /**
  * Use this function to do attach the driver instance with the BFA
  * library. This function will not trigger any HW initialization
@@ -161,7 +140,6 @@ bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
        for (i = 0; hal_mods[i]; i++)
                hal_mods[i]->attach(bfa, bfad, cfg, meminfo, pcidev);
 
-       bfa_com_port_attach(bfa, meminfo);
 }
 
 /**
index d78828ff92c1debf9b42e69f24ab853cbe040851..b87fc30fad6ba17f1f8158acdcb436e6e589afb8 100644 (file)
@@ -1636,8 +1636,9 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
 
        blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
 
+       /* New queue, no concurrency on queue_flags */
        if (!shost->use_clustering)
-               q->limits.cluster = 0;
+               queue_flag_clear_unlocked(QUEUE_FLAG_CLUSTER, q);
 
        /*
         * set a reasonable default alignment on word boundaries: the
index 5a03b2e4c3932499820bfaef40630668115f15eb..9a6c27a01793ba2ff6111ede23e769ade617b64d 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     uss720.c  --  USS720 USB Parport Cable.
  *
- *     Copyright (C) 1999, 2005, 2010
+ *     Copyright (C) 1999, 2005
  *         Thomas Sailer (t.sailer@alumni.ethz.ch)
  *
  *     This program is free software; you can redistribute it and/or modify
@@ -775,8 +775,6 @@ static struct usb_device_id uss720_table [] = {
        { USB_DEVICE(0x0557, 0x2001) },
        { USB_DEVICE(0x0729, 0x1284) },
        { USB_DEVICE(0x1293, 0x0002) },
-       { USB_DEVICE(0x1293, 0x0002) },
-       { USB_DEVICE(0x050d, 0x0002) },
        { }                                             /* Terminating entry */
 };
 
index df9c6324a5ed5d03c63d891c114de7b3edd62f30..d5556349db3b46044cc53ef0810d3d78c6e7eeaa 100644 (file)
@@ -802,7 +802,6 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
-       { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
        { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { },                                    /* Optional parameter entry */
index 7d28f1c0b6ea75a0235953d9d52b06e5c25be8a3..54d8fd12ef8eecb243b8853fdb78c85009ee8e9f 100644 (file)
 #define MJSG_XM_RADIO_PID      0x937A
 #define MJSG_HD_RADIO_PID      0x937C
 
-/*
- * D.O.Tec products (http://www.directout.eu)
- */
-#define FTDI_DOTEC_PID 0x9868
-
 /*
  * Xverve Signalyzer tools (http://www.signalyzer.com/)
  */
index 2ca0298c230d1dcb56ad3cff1ebdf91ba7774d61..72150021cc79e3b663406b4c5b8b49dd2299da6c 100644 (file)
@@ -481,13 +481,6 @@ UNUSUAL_DEV(  0x04e8, 0x507c, 0x0220, 0x0220,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_MAX_SECTORS_64),
 
-/* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */
-UNUSUAL_DEV(  0x04e8, 0x5122, 0x0000, 0x9999,
-               "Samsung",
-               "YP-CP3",
-               US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG),
-
 /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
  * Device uses standards-violating 32-byte Bulk Command Block Wrappers and
  * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
index 68083fab2c9f8422f8be9b793e67b5b824893126..a0410eb44dfa8cf58f10617fa88859f04905f62d 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -247,11 +247,6 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
        vma->vm_start = vma->vm_end - PAGE_SIZE;
        vma->vm_flags = VM_STACK_FLAGS;
        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
-
-       err = security_file_mmap(NULL, 0, 0, 0, vma->vm_start, 1);
-       if (err)
-               goto err;
-
        err = insert_vm_struct(mm, vma);
        if (err)
                goto err;
index edfce0b91bee07431275773af2f976bfb439dd4a..cbd2214edc15b2c4cd65e40f7de6538d1169f982 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/module.h>
-#include <linux/compat.h>
 
 static const struct file_operations fuse_direct_io_file_operations;
 
@@ -1620,58 +1619,6 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
        return 0;
 }
 
-/* Make sure iov_length() won't overflow */
-static int fuse_verify_ioctl_iov(struct iovec *iov, size_t count)
-{
-       size_t n;
-       u32 max = FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT;
-
-       for (n = 0; n < count; n++) {
-               if (iov->iov_len > (size_t) max)
-                       return -ENOMEM;
-               max -= iov->iov_len;
-       }
-       return 0;
-}
-
-/*
- * CUSE servers compiled on 32bit broke on 64bit kernels because the
- * ABI was defined to be 'struct iovec' which is different on 32bit
- * and 64bit.  Fortunately we can determine which structure the server
- * used from the size of the reply.
- */
-static int fuse_copy_ioctl_iovec(struct iovec *dst, void *src,
-                                size_t transferred, unsigned count,
-                                bool is_compat)
-{
-#ifdef CONFIG_COMPAT
-       if (count * sizeof(struct compat_iovec) == transferred) {
-               struct compat_iovec *ciov = src;
-               unsigned i;
-
-               /*
-                * With this interface a 32bit server cannot support
-                * non-compat (i.e. ones coming from 64bit apps) ioctl
-                * requests
-                */
-               if (!is_compat)
-                       return -EINVAL;
-
-               for (i = 0; i < count; i++) {
-                       dst[i].iov_base = compat_ptr(ciov[i].iov_base);
-                       dst[i].iov_len = ciov[i].iov_len;
-               }
-               return 0;
-       }
-#endif
-
-       if (count * sizeof(struct iovec) != transferred)
-               return -EIO;
-
-       memcpy(dst, src, transferred);
-       return 0;
-}
-
 /*
  * For ioctls, there is no generic way to determine how much memory
  * needs to be read and/or written.  Furthermore, ioctls are allowed
@@ -1853,25 +1800,18 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
                    in_iovs + out_iovs > FUSE_IOCTL_MAX_IOV)
                        goto out;
 
+               err = -EIO;
+               if ((in_iovs + out_iovs) * sizeof(struct iovec) != transferred)
+                       goto out;
+
+               /* okay, copy in iovs and retry */
                vaddr = kmap_atomic(pages[0], KM_USER0);
-               err = fuse_copy_ioctl_iovec(page_address(iov_page), vaddr,
-                                           transferred, in_iovs + out_iovs,
-                                           (flags & FUSE_IOCTL_COMPAT) != 0);
+               memcpy(page_address(iov_page), vaddr, transferred);
                kunmap_atomic(vaddr, KM_USER0);
-               if (err)
-                       goto out;
 
                in_iov = page_address(iov_page);
                out_iov = in_iov + in_iovs;
 
-               err = fuse_verify_ioctl_iov(in_iov, in_iovs);
-               if (err)
-                       goto out;
-
-               err = fuse_verify_ioctl_iov(out_iov, out_iovs);
-               if (err)
-                       goto out;
-
                goto retry;
        }
 
index 6fed6ccbf68949eae40ece1c2506694c770bf729..9f83d9fe9a61af75574782c310d27ee78f03017a 100644 (file)
@@ -680,7 +680,6 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
 {
        struct inode *inode = filp->f_mapping->host;
        int status = 0;
-       unsigned int saved_type = fl->fl_type;
 
        /* Try local locking first */
        posix_test_lock(filp, fl);
@@ -688,7 +687,6 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
                /* found a conflict */
                goto out;
        }
-       fl->fl_type = saved_type;
 
        if (nfs_have_delegation(inode, FMODE_READ))
                goto out_noconflict;
index 3dde50c093b5cb57f63ef8e279de4d0f3ef58d98..59047f8d7d72885869c748721a389307e34e7eca 100644 (file)
@@ -503,13 +503,13 @@ static struct rpc_procinfo mnt3_procedures[] = {
 
 static struct rpc_version mnt_version1 = {
        .number         = 1,
-       .nrprocs        = ARRAY_SIZE(mnt_procedures),
+       .nrprocs        = 2,
        .procs          = mnt_procedures,
 };
 
 static struct rpc_version mnt_version3 = {
        .number         = 3,
-       .nrprocs        = ARRAY_SIZE(mnt3_procedures),
+       .nrprocs        = 2,
        .procs          = mnt3_procedures,
 };
 
index 856c6d4daea6bc64024f218ee10c6d51cefa68bb..d0a2ce1b43248a6eacbff2b4804314c57b898cbc 100644 (file)
@@ -273,11 +273,9 @@ void fill_post_wcc(struct svc_fh *fhp)
        err = vfs_getattr(fhp->fh_export->ex_path.mnt, fhp->fh_dentry,
                        &fhp->fh_post_attr);
        fhp->fh_post_change = fhp->fh_dentry->d_inode->i_version;
-       if (err) {
+       if (err)
                fhp->fh_post_saved = 0;
-               /* Grab the ctime anyway - set_change_info might use it */
-               fhp->fh_post_attr.ctime = fhp->fh_dentry->d_inode->i_ctime;
-       } else
+       else
                fhp->fh_post_saved = 1;
 }
 
index a06bfabec4d096609475c80eedf352b2c80d2e70..05f6018b928eb1860761e047bdecdebfecb1bc51 100644 (file)
@@ -318,7 +318,7 @@ struct queue_limits {
        unsigned short          max_phys_segments;
 
        unsigned char           misaligned;
-       unsigned char           cluster;
+       unsigned char           no_cluster;
 };
 
 struct request_queue
@@ -440,6 +440,7 @@ struct request_queue
 #endif
 };
 
+#define QUEUE_FLAG_CLUSTER     0       /* cluster several segments into 1 */
 #define QUEUE_FLAG_QUEUED      1       /* uses generic tag queueing */
 #define QUEUE_FLAG_STOPPED     2       /* queue is stopped */
 #define        QUEUE_FLAG_SYNCFULL     3       /* read queue has been filled */
@@ -460,6 +461,7 @@ struct request_queue
 #define QUEUE_FLAG_DISCARD     17      /* supports DISCARD */
 
 #define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_IO_STAT) |            \
+                                (1 << QUEUE_FLAG_CLUSTER) |            \
                                 (1 << QUEUE_FLAG_STACKABLE)    |       \
                                 (1 << QUEUE_FLAG_SAME_COMP))
 
@@ -625,11 +627,6 @@ enum {
 
 #define rq_data_dir(rq)                ((rq)->cmd_flags & 1)
 
-static inline unsigned int blk_queue_cluster(struct request_queue *q)
-{
-       return q->limits.cluster;
-}
-
 /*
  * We regard a request as sync, if either a read or a sync write
  */
index 4dab693bc1ece8d788786895bbd51c32a3e23ece..73164c2b3d295eeb339b71018ffdee4bb7126474 100644 (file)
@@ -480,17 +480,18 @@ static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
 static inline void
 set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
 {
-       BUG_ON(!fhp->fh_pre_saved);
-       cinfo->atomic = fhp->fh_post_saved;
+       BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved);
+       cinfo->atomic = 1;
        cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode);
-
-       cinfo->before_change = fhp->fh_pre_change;
-       cinfo->after_change = fhp->fh_post_change;
-       cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec;
-       cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec;
-       cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec;
-       cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
-
+       if (cinfo->change_supported) {
+               cinfo->before_change = fhp->fh_pre_change;
+               cinfo->after_change = fhp->fh_post_change;
+       } else {
+               cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec;
+               cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec;
+               cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec;
+               cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
+       }
 }
 
 int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
index 76abe6cb7e2f3af9badac8cc0c32453741603232..c1dd893658331eef66f580bdf34c20aebabe385c 100644 (file)
@@ -278,7 +278,6 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype,
 /* 2nd level prototypes */
 void sctp_generate_t3_rtx_event(unsigned long peer);
 void sctp_generate_heartbeat_event(unsigned long peer);
-void sctp_generate_proto_unreach_event(unsigned long peer);
 
 void sctp_ootb_pkt_free(struct sctp_packet *);
 
index 88daa54eeef8a35e46bd486d58a2fd9f2e44c6b3..89e54e932368430bcabad6f2210a6c510428ef4e 100644 (file)
@@ -1008,9 +1008,6 @@ struct sctp_transport {
        /* Heartbeat timer is per destination. */
        struct timer_list hb_timer;
 
-       /* Timer to handle ICMP proto unreachable envets */
-       struct timer_list proto_unreach_timer;
-
        /* Since we're using per-destination retransmission timers
         * (see above), we're also using per-destination "transmitted"
         * queues.  This probably ought to be a private struct
index d890628a9412c65fff2a8dd8c2c5501fcd6a2020..570255f541e507b416ecb51c89db8b0adf0cffe9 100644 (file)
@@ -91,14 +91,6 @@ static void __exit_signal(struct task_struct *tsk)
        if (atomic_dec_and_test(&sig->count))
                posix_cpu_timers_exit_group(tsk);
        else {
-               /*
-                * This can only happen if the caller is de_thread().
-                * FIXME: this is the temporary hack, we should teach
-                * posix-cpu-timers to handle this case correctly.
-                */
-               if (unlikely(has_group_leader_pid(tsk)))
-                       posix_cpu_timers_exit_group(tsk);
-
                /*
                 * If there is any task waiting for the group exit
                 * then notify it:
index b1353560e5f24bcc47e4173be3cefda9ca378227..bf0014d6a5f0972a1b2352d35a09eb82296164d1 100644 (file)
@@ -137,7 +137,7 @@ static int snapshot_release(struct inode *inode, struct file *filp)
        free_all_swap_pages(data->swap);
        if (data->frozen)
                thaw_processes();
-       pm_notifier_call_chain(data->mode == O_RDONLY ?
+       pm_notifier_call_chain(data->mode == O_WRONLY ?
                        PM_POST_HIBERNATION : PM_POST_RESTORE);
        atomic_inc(&snapshot_device_available);
 
index 3522afcb8f2bcde5dc8e2c7f5c8bd4d62d48bf1a..23042b1b3a08128b9e6b90a04c9b5ff9d843d608 100644 (file)
@@ -1083,8 +1083,6 @@ void printk_tick(void)
 
 int printk_needs_cpu(int cpu)
 {
-       if (unlikely(cpu_is_offline(cpu)))
-               printk_tick();
        return per_cpu(printk_pending, cpu);
 }
 
index cb3c1f19a2f6f001952cca2cb32cc69c45298820..5db5a8d2681168cfcf9c571d2da69629245c92ba 100644 (file)
@@ -1173,12 +1173,6 @@ unsigned long get_next_timer_interrupt(unsigned long now)
        struct tvec_base *base = __get_cpu_var(tvec_bases);
        unsigned long expires;
 
-       /*
-        * Pretend that there is no timer pending if the cpu is offline.
-        * Possible pending timers will be migrated later to an active cpu.
-        */
-       if (cpu_is_offline(smp_processor_id()))
-               return now + NEXT_TIMER_MAX_DELTA;
        spin_lock(&base->lock);
        if (time_before_eq(base->next_timer, base->timer_jiffies))
                base->next_timer = __next_timer_interrupt(base);
index a2a2d1f02c833c2e1fb905e5c60ce69a675849aa..3cfb60b4770b651d783832a7fa82b0e839aecf8e 100644 (file)
@@ -2199,19 +2199,11 @@ tracing_write_stub(struct file *filp, const char __user *ubuf,
        return count;
 }
 
-static loff_t tracing_seek(struct file *file, loff_t offset, int origin)
-{
-       if (file->f_mode & FMODE_READ)
-               return seq_lseek(file, offset, origin);
-       else
-               return 0;
-}
-
 static const struct file_operations tracing_fops = {
        .open           = tracing_open,
        .read           = seq_read,
        .write          = tracing_write_stub,
-       .llseek         = tracing_seek,
+       .llseek         = seq_lseek,
        .release        = tracing_release,
 };
 
index 292afec036153e9c133ac5ecdc12d4fda1d15236..866a666690372a38032e3e49263f834a95867b69 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2290,7 +2290,6 @@ int install_special_mapping(struct mm_struct *mm,
                            unsigned long addr, unsigned long len,
                            unsigned long vm_flags, struct page **pages)
 {
-       int ret;
        struct vm_area_struct *vma;
 
        vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
@@ -2307,23 +2306,16 @@ int install_special_mapping(struct mm_struct *mm,
        vma->vm_ops = &special_mapping_vmops;
        vma->vm_private_data = pages;
 
-       ret = security_file_mmap(NULL, 0, 0, 0, vma->vm_start, 1);
-       if (ret)
-               goto out;
-
-       ret = insert_vm_struct(mm, vma);
-       if (ret)
-               goto out;
+       if (unlikely(insert_vm_struct(mm, vma))) {
+               kmem_cache_free(vm_area_cachep, vma);
+               return -ENOMEM;
+       }
 
        mm->total_vm += len >> PAGE_SHIFT;
 
        perf_event_mmap(vma);
 
        return 0;
-
-out:
-       kmem_cache_free(vm_area_cachep, vma);
-       return ret;
 }
 
 static DEFINE_MUTEX(mm_all_locks_mutex);
index fd4c1e78154c65e77b9db32bf94999ec3423d0a8..d04cd93f22b5cf262f60fc23ec6400c2f58282b9 100644 (file)
@@ -1747,14 +1747,6 @@ gso:
 
                skb->next = nskb->next;
                nskb->next = NULL;
-
-               /*
-                * If device doesnt need nskb->dst, release it right now while
-                * its hot in this cpu cache
-                */
-               if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
-                       skb_dst_drop(nskb);
-
                rc = ops->ndo_start_xmit(nskb, dev);
                if (unlikely(rc != NETDEV_TX_OK)) {
                        nskb->next = skb->next;
index 254afea4c1afd2ca589162d6333db32e26a596b5..c0c973e67addd236fa438aca6ca84d3058495ebd 100644 (file)
@@ -427,25 +427,11 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
 {
        SCTP_DEBUG_PRINTK("%s\n",  __func__);
 
-       if (sock_owned_by_user(sk)) {
-               if (timer_pending(&t->proto_unreach_timer))
-                       return;
-               else {
-                       if (!mod_timer(&t->proto_unreach_timer,
-                                               jiffies + (HZ/20)))
-                               sctp_association_hold(asoc);
-               }
+       sctp_do_sm(SCTP_EVENT_T_OTHER,
+                  SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
+                  asoc->state, asoc->ep, asoc, t,
+                  GFP_ATOMIC);
 
-       } else {
-               if (timer_pending(&t->proto_unreach_timer) &&
-                   del_timer(&t->proto_unreach_timer))
-                       sctp_association_put(asoc);
-
-               sctp_do_sm(SCTP_EVENT_T_OTHER,
-                          SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
-                          asoc->state, asoc->ep, asoc, t,
-                          GFP_ATOMIC);
-       }
 }
 
 /* Common lookup code for icmp/icmpv6 error handler. */
index 306bb8b07a514768e1e1286a7258943e1dedf9cb..efa516b47e816b43bf8e6ad974f8dc5cc16d9ad9 100644 (file)
@@ -397,41 +397,6 @@ out_unlock:
        sctp_transport_put(transport);
 }
 
-/* Handle the timeout of the ICMP protocol unreachable timer.  Trigger
- * the correct state machine transition that will close the association.
- */
-void sctp_generate_proto_unreach_event(unsigned long data)
-{
-       struct sctp_transport *transport = (struct sctp_transport *) data;
-       struct sctp_association *asoc = transport->asoc;
-
-       sctp_bh_lock_sock(asoc->base.sk);
-       if (sock_owned_by_user(asoc->base.sk)) {
-               SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__);
-
-               /* Try again later.  */
-               if (!mod_timer(&transport->proto_unreach_timer,
-                               jiffies + (HZ/20)))
-                       sctp_association_hold(asoc);
-               goto out_unlock;
-       }
-
-       /* Is this structure just waiting around for us to actually
-        * get destroyed?
-        */
-       if (asoc->base.dead)
-               goto out_unlock;
-
-       sctp_do_sm(SCTP_EVENT_T_OTHER,
-                  SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
-                  asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC);
-
-out_unlock:
-       sctp_bh_unlock_sock(asoc->base.sk);
-       sctp_association_put(asoc);
-}
-
-
 /* Inject a SACK Timeout event into the state machine.  */
 static void sctp_generate_sack_event(unsigned long data)
 {
index e04c9f844abf1a75351a54c57402014cc61b99e1..37a1184d789f7fe90408120fef731e76ed6088c4 100644 (file)
@@ -108,8 +108,6 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
                        (unsigned long)peer);
        setup_timer(&peer->hb_timer, sctp_generate_heartbeat_event,
                        (unsigned long)peer);
-       setup_timer(&peer->proto_unreach_timer,
-                   sctp_generate_proto_unreach_event, (unsigned long)peer);
 
        /* Initialize the 64-bit random nonce sent with heartbeat. */
        get_random_bytes(&peer->hb_nonce, sizeof(peer->hb_nonce));
index df760adaa2c9f99c375077959e0505bd9ae89983..3fbd6ba788e5c6b3e3ebc8252e059cb9972e87ac 100644 (file)
@@ -209,7 +209,6 @@ int svc_create_xprt(struct svc_serv *serv, const char *xprt_name,
        spin_lock(&svc_xprt_class_lock);
        list_for_each_entry(xcl, &svc_xprt_class_list, xcl_list) {
                struct svc_xprt *newxprt;
-               unsigned short newport;
 
                if (strcmp(xprt_name, xcl->xcl_name))
                        continue;
@@ -228,9 +227,8 @@ int svc_create_xprt(struct svc_serv *serv, const char *xprt_name,
                spin_lock_bh(&serv->sv_lock);
                list_add(&newxprt->xpt_list, &serv->sv_permsocks);
                spin_unlock_bh(&serv->sv_lock);
-               newport = svc_xprt_local_port(newxprt);
                clear_bit(XPT_BUSY, &newxprt->xpt_flags);
-               return newport;
+               return svc_xprt_local_port(newxprt);
        }
  err:
        spin_unlock(&svc_xprt_class_lock);
@@ -432,13 +430,8 @@ void svc_xprt_received(struct svc_xprt *xprt)
 {
        BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags));
        xprt->xpt_pool = NULL;
-       /* As soon as we clear busy, the xprt could be closed and
-        * 'put', so we need a reference to call svc_xprt_enqueue with:
-        */
-       svc_xprt_get(xprt);
        clear_bit(XPT_BUSY, &xprt->xpt_flags);
        svc_xprt_enqueue(xprt);
-       svc_xprt_put(xprt);
 }
 EXPORT_SYMBOL_GPL(svc_xprt_received);
 
index 6cfa154a6705e11e8d715faf0d98088b6553f3ff..e1278399b34546a8ba5bbb4e8fdb90f9a8ec009f 100644 (file)
@@ -249,8 +249,6 @@ static int ima_lsm_rule_init(struct ima_measure_rule_entry *entry,
        result = security_filter_rule_init(entry->lsm[lsm_rule].type,
                                           Audit_equal, args,
                                           &entry->lsm[lsm_rule].rule);
-       if (!entry->lsm[lsm_rule].rule)
-               return -EINVAL;
        return result;
 }
 
index 31ee7866dc109a0731e44e71aa98464f4f5ef92a..61aaedae6b7e084f8d7359d28fc88d9e4493e490 100644 (file)
@@ -87,7 +87,7 @@ int *load_mixer_volumes(char *name, int *levels, int present)
        int             i, n;
 
        for (i = 0; i < num_mixer_volumes; i++) {
-               if (strncmp(name, mixer_vols[i].name, 32) == 0) {
+               if (strcmp(name, mixer_vols[i].name) == 0) {
                        if (present)
                                mixer_vols[i].num = i;
                        return mixer_vols[i].levels;
@@ -99,7 +99,7 @@ int *load_mixer_volumes(char *name, int *levels, int present)
        }
        n = num_mixer_volumes++;
 
-       strncpy(mixer_vols[n].name, name, 32);
+       strcpy(mixer_vols[n].name, name);
 
        if (present)
                mixer_vols[n].num = n;
index ca73fe94269dda52f3bbc923bd26911994c9cb7c..cc2a5a2a147b2f9fb656ef5a348f363f7b5ec246 100644 (file)
@@ -2229,8 +2229,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
        SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
-       SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
-       SND_PCI_QUIRK(0x1028, 0x0470, "Dell Inspiron 1120", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
index 34e7ec95403b4c1347ce67588ee015f8fa90ec93..bc91a80d817b5259f95d0630dbee1543fdbb5a28 100644 (file)
@@ -3975,7 +3975,6 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU),
        SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW),
        SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG),
-       SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG),
        SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG),
        SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW),
        SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),