]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'workqueues/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 03:48:26 +0000 (13:48 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 03:48:26 +0000 (13:48 +1000)
Conflicts:
drivers/cpufreq/powernow-k8.c
drivers/hid/hid-picolcd.c
drivers/isdn/mISDN/hwchannel.c
drivers/video/omap2/displays/panel-taal.c

54 files changed:
1  2 
block/blk-core.c
block/genhd.c
drivers/block/floppy.c
drivers/char/tpm/tpm.c
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
drivers/cpufreq/powernow-k8.c
drivers/gpu/drm/exynos/exynos_drm_g2d.c
drivers/hid/hid-wiimote-ext.c
drivers/isdn/mISDN/hwchannel.c
drivers/leds/leds-lp8788.c
drivers/md/dm-mpath.c
drivers/media/dvb-core/dvb_net.c
drivers/media/pci/bt8xx/bttv-driver.c
drivers/media/pci/cx18/cx18-driver.c
drivers/media/pci/cx23885/cx23885-input.c
drivers/media/pci/cx88/cx88-mpeg.c
drivers/media/pci/mantis/mantis_evm.c
drivers/media/pci/mantis/mantis_uart.c
drivers/media/pci/saa7134/saa7134-core.c
drivers/media/pci/saa7134/saa7134-empress.c
drivers/media/platform/omap24xxcam.c
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/tm6000/tm6000-cards.c
drivers/mtd/mtdoops.c
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
drivers/net/ethernet/mellanox/mlx4/sense.c
drivers/net/ethernet/neterion/vxge/vxge-main.c
drivers/net/ethernet/sun/niu.c
drivers/net/virtio_net.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/platform/x86/thinkpad_acpi.c
drivers/power/ab8500_btemp.c
drivers/power/ab8500_charger.c
drivers/power/ab8500_fg.c
drivers/power/charger-manager.c
drivers/power/wm97xx_battery.c
drivers/regulator/core.c
drivers/scsi/ipr.c
drivers/thermal/thermal_sys.c
drivers/tty/serial/kgdboc.c
drivers/usb/gadget/u_ether.c
drivers/video/omap2/displays/panel-taal.c
drivers/video/omap2/dss/dsi.c
fs/gfs2/super.c
fs/xfs/xfs_super.c
mm/slab.c
net/9p/trans_fd.c
net/core/dst.c
net/core/link_watch.c
net/core/neighbour.c
sound/pci/oxygen/oxygen_lib.c
sound/soc/soc-core.c

Simple merge
diff --cc block/genhd.c
Simple merge
Simple merge
index 6724615a4fdd1827028a24fff16b91a5f29d16d7,3af9f4d1a23f200a27d8c03de477131967d0cbfd..f26afdb1a7026aed8a0173ff7a17ea87524661dd
@@@ -1168,10 -1172,10 +1168,10 @@@ int tpm_release(struct inode *inode, st
        struct tpm_chip *chip = file->private_data;
  
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        file->private_data = NULL;
        atomic_set(&chip->data_pending, 0);
 -      kfree(chip->data_buffer);
 +      kzfree(chip->data_buffer);
        clear_bit(0, &chip->is_open);
        put_device(chip->dev);
        return 0;
@@@ -1221,8 -1225,9 +1221,8 @@@ ssize_t tpm_read(struct file *file, cha
        int rc;
  
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        ret_size = atomic_read(&chip->data_pending);
 -      atomic_set(&chip->data_pending, 0);
        if (ret_size > 0) {     /* relay data */
                ssize_t orig_ret_size = ret_size;
                if (size < ret_size)
Simple merge
index 0b19faf002eeb30d44c28e56b57a8a907814989d,1a40935c85fdcc1f21e976ad8dbd5298a87d6060..129e80bfff22e1d399fbe5320012f5721de1bcaf
@@@ -978,11 -1104,52 +977,18 @@@ static int transition_frequency_fidvid(
        return res;
  }
  
- /* Driver entry point to switch to the target frequency */
- static int powernowk8_target(struct cpufreq_policy *pol,
-               unsigned targfreq, unsigned relation)
 -/* Take a frequency, and issue the hardware pstate transition command */
 -static int transition_frequency_pstate(struct powernow_k8_data *data,
 -              unsigned int index)
 -{
 -      u32 pstate = 0;
 -      int res, i;
 -      struct cpufreq_freqs freqs;
 -
 -      pr_debug("cpu %d transition to index %u\n", smp_processor_id(), index);
 -
 -      /* get MSR index for hardware pstate transition */
 -      pstate = index & HW_PSTATE_MASK;
 -      if (pstate > data->max_hw_pstate)
 -              return -EINVAL;
 -
 -      freqs.old = find_khz_freq_from_pstate(data->powernow_table,
 -                      data->currpstate);
 -      freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
 -
 -      for_each_cpu(i, data->available_cores) {
 -              freqs.cpu = i;
 -              cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 -      }
 -
 -      res = transition_pstate(data, pstate);
 -      freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
 -
 -      for_each_cpu(i, data->available_cores) {
 -              freqs.cpu = i;
 -              cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 -      }
 -      return res;
 -}
 -
+ struct powernowk8_target_arg {
+       struct cpufreq_policy           *pol;
+       unsigned                        targfreq;
+       unsigned                        relation;
+ };
+ static long powernowk8_target_fn(void *arg)
  {
-       cpumask_var_t oldmask;
+       struct powernowk8_target_arg *pta = arg;
+       struct cpufreq_policy *pol = pta->pol;
+       unsigned targfreq = pta->targfreq;
+       unsigned relation = pta->relation;
        struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
        u32 checkfid;
        u32 checkvid;
                pol->cpu, targfreq, pol->min, pol->max, relation);
  
        if (query_current_values_with_pending_wait(data))
-               goto err_out;
+               return -EIO;
  
 -      if (cpu_family != CPU_HW_PSTATE) {
 -              pr_debug("targ: curr fid 0x%x, vid 0x%x\n",
 -              data->currfid, data->currvid);
 +      pr_debug("targ: curr fid 0x%x, vid 0x%x\n",
 +               data->currfid, data->currvid);
  
 -              if ((checkvid != data->currvid) ||
 -                  (checkfid != data->currfid)) {
 -                      printk(KERN_INFO PFX
 -                              "error - out of sync, fix 0x%x 0x%x, "
 -                              "vid 0x%x 0x%x\n",
 -                              checkfid, data->currfid,
 -                              checkvid, data->currvid);
 -              }
 +      if ((checkvid != data->currvid) ||
 +          (checkfid != data->currfid)) {
 +              pr_info(PFX
 +                     "error - out of sync, fix 0x%x 0x%x, vid 0x%x 0x%x\n",
 +                     checkfid, data->currfid,
 +                     checkvid, data->currvid);
        }
  
        if (cpufreq_frequency_table_target(pol, data->powernow_table,
  
        powernow_k8_acpi_pst_values(data, newstate);
  
 -      if (cpu_family == CPU_HW_PSTATE)
 -              ret = transition_frequency_pstate(data,
 -                      data->powernow_table[newstate].index);
 -      else
 -              ret = transition_frequency_fidvid(data, newstate);
 +      ret = transition_frequency_fidvid(data, newstate);
 +
        if (ret) {
                printk(KERN_ERR PFX "transition frequency failed\n");
-               ret = 1;
                mutex_unlock(&fidvid_mutex);
-               goto err_out;
+               return 1;
        }
        mutex_unlock(&fidvid_mutex);
  
 -      if (cpu_family == CPU_HW_PSTATE)
 -              pol->cur = find_khz_freq_from_pstate(data->powernow_table,
 -                              data->powernow_table[newstate].index);
 -      else
 -              pol->cur = find_khz_freq_from_fid(data->currfid);
 +      pol->cur = find_khz_freq_from_fid(data->currfid);
-       ret = 0;
  
- err_out:
-       set_cpus_allowed_ptr(current, oldmask);
-       free_cpumask_var(oldmask);
-       return ret;
+       return 0;
+ }
+ /* Driver entry point to switch to the target frequency */
+ static int powernowk8_target(struct cpufreq_policy *pol,
+               unsigned targfreq, unsigned relation)
+ {
+       struct powernowk8_target_arg pta = { .pol = pol, .targfreq = targfreq,
+                                            .relation = relation };
+       /*
+        * Must run on @pol->cpu.  cpufreq core is responsible for ensuring
+        * that we're bound to the current CPU and pol->cpu stays online.
+        */
+       if (smp_processor_id() == pol->cpu)
+               return powernowk8_target_fn(&pta);
+       else
+               return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
  }
  
  /* Driver entry point to verify the policy and range of frequencies */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 47498b8719032668f02c08c235614f0e55464ade,67789b8345d25cb7a5fad998863aab3c9d999689..d552a96f08cd1bf1abd12f2977a5ffd35eef6da5
@@@ -703,19 -694,84 +703,16 @@@ thermal_remove_hwmon_sysfs(struct therm
  static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
                                            int delay)
  {
-       cancel_delayed_work(&(tz->poll_queue));
-       if (!delay)
-               return;
        if (delay > 1000)
-               queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
-                                     round_jiffies(msecs_to_jiffies(delay)));
+               mod_delayed_work(system_freezable_wq, &tz->poll_queue,
+                                round_jiffies(msecs_to_jiffies(delay)));
+       else if (delay)
+               mod_delayed_work(system_freezable_wq, &tz->poll_queue,
+                                msecs_to_jiffies(delay));
        else
-               queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
-                                     msecs_to_jiffies(delay));
+               cancel_delayed_work(&tz->poll_queue);
  }
  
 -static void thermal_zone_device_passive(struct thermal_zone_device *tz,
 -                                      int temp, int trip_temp, int trip)
 -{
 -      int trend = 0;
 -      struct thermal_cooling_device_instance *instance;
 -      struct thermal_cooling_device *cdev;
 -      long state, max_state;
 -
 -      /*
 -       * Above Trip?
 -       * -----------
 -       * Calculate the thermal trend (using the passive cooling equation)
 -       * and modify the performance limit for all passive cooling devices
 -       * accordingly.  Note that we assume symmetry.
 -       */
 -      if (temp >= trip_temp) {
 -              tz->passive = true;
 -
 -              trend = (tz->tc1 * (temp - tz->last_temperature)) +
 -                      (tz->tc2 * (temp - trip_temp));
 -
 -              /* Heating up? */
 -              if (trend > 0) {
 -                      list_for_each_entry(instance, &tz->cooling_devices,
 -                                          node) {
 -                              if (instance->trip != trip)
 -                                      continue;
 -                              cdev = instance->cdev;
 -                              cdev->ops->get_cur_state(cdev, &state);
 -                              cdev->ops->get_max_state(cdev, &max_state);
 -                              if (state++ < max_state)
 -                                      cdev->ops->set_cur_state(cdev, state);
 -                      }
 -              } else if (trend < 0) { /* Cooling off? */
 -                      list_for_each_entry(instance, &tz->cooling_devices,
 -                                          node) {
 -                              if (instance->trip != trip)
 -                                      continue;
 -                              cdev = instance->cdev;
 -                              cdev->ops->get_cur_state(cdev, &state);
 -                              cdev->ops->get_max_state(cdev, &max_state);
 -                              if (state > 0)
 -                                      cdev->ops->set_cur_state(cdev, --state);
 -                      }
 -              }
 -              return;
 -      }
 -
 -      /*
 -       * Below Trip?
 -       * -----------
 -       * Implement passive cooling hysteresis to slowly increase performance
 -       * and avoid thrashing around the passive trip point.  Note that we
 -       * assume symmetry.
 -       */
 -      list_for_each_entry(instance, &tz->cooling_devices, node) {
 -              if (instance->trip != trip)
 -                      continue;
 -              cdev = instance->cdev;
 -              cdev->ops->get_cur_state(cdev, &state);
 -              cdev->ops->get_max_state(cdev, &max_state);
 -              if (state > 0)
 -                      cdev->ops->set_cur_state(cdev, --state);
 -              if (state == 0)
 -                      tz->passive = false;
 -      }
 -}
 -
  static void thermal_zone_device_check(struct work_struct *work)
  {
        struct thermal_zone_device *tz = container_of(work, struct
Simple merge
Simple merge
index 4cf94161ff5101a74fcf0cdb165ce8c9f3aa1f2e,6b5e6e0e202f253cada3b80ddf5d14db9b4b0bd7..f2f644680ca8dfe2262fac39c42fcd50766982f0
@@@ -925,50 -900,29 +925,50 @@@ static int taal_probe(struct omap_dss_d
  
        atomic_set(&td->do_update, 0);
  
 -      td->workqueue = create_singlethread_workqueue("taal_esd");
 -      if (td->workqueue == NULL) {
 -              dev_err(&dssdev->dev, "can't create ESD workqueue\n");
 -              r = -ENOMEM;
 -              goto err_wq;
 +      if (gpio_is_valid(td->reset_gpio)) {
 +              r = devm_gpio_request_one(&dssdev->dev, td->reset_gpio,
 +                              GPIOF_OUT_INIT_LOW, "taal rst");
 +              if (r) {
 +                      dev_err(&dssdev->dev, "failed to request reset gpio\n");
 +                      return r;
 +              }
        }
 -      INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work);
 -      INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work);
  
 -      dev_set_drvdata(&dssdev->dev, td);
 +      if (gpio_is_valid(td->ext_te_gpio)) {
 +              r = devm_gpio_request_one(&dssdev->dev, td->ext_te_gpio,
 +                              GPIOF_IN, "taal irq");
 +              if (r) {
 +                      dev_err(&dssdev->dev, "GPIO request failed\n");
 +                      return r;
 +              }
 +
 +              r = devm_request_irq(&dssdev->dev, gpio_to_irq(td->ext_te_gpio),
 +                              taal_te_isr,
 +                              IRQF_TRIGGER_RISING,
 +                              "taal vsync", dssdev);
  
 -      if (gpio_is_valid(panel_data->reset_gpio)) {
 -              r = gpio_request_one(panel_data->reset_gpio, GPIOF_OUT_INIT_LOW,
 -                              "taal rst");
                if (r) {
 -                      dev_err(&dssdev->dev, "failed to request reset gpio\n");
 -                      goto err_rst_gpio;
 +                      dev_err(&dssdev->dev, "IRQ request failed\n");
 +                      return r;
                }
-               INIT_DELAYED_WORK_DEFERRABLE(&td->te_timeout_work,
 +
++              INIT_DEFERRABLE_WORK(&td->te_timeout_work,
 +                                      taal_te_timeout_work_callback);
 +
 +              dev_dbg(&dssdev->dev, "Using GPIO TE\n");
        }
  
-       INIT_DELAYED_WORK_DEFERRABLE(&td->esd_work, taal_esd_work);
 +      td->workqueue = create_singlethread_workqueue("taal_esd");
 +      if (td->workqueue == NULL) {
 +              dev_err(&dssdev->dev, "can't create ESD workqueue\n");
 +              return -ENOMEM;
 +      }
++      INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work);
 +      INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work);
 +
        taal_hw_reset(dssdev);
  
 -      if (panel_data->use_dsi_backlight) {
 +      if (td->use_dsi_backlight) {
                memset(&props, 0, sizeof(struct backlight_properties));
                props.max_brightness = 255;
  
Simple merge
diff --cc fs/gfs2/super.c
Simple merge
Simple merge
diff --cc mm/slab.c
Simple merge
Simple merge
diff --cc net/core/dst.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge