1. 02 Jan, 2014 1 commit
  2. 04 Dec, 2013 20 commits
    • Eduardo Valentin's avatar
      MAINTAINERS: add thermal bindings entry in thermal domain · 1beabfbe
      Eduardo Valentin authored
      After discussion and agreement of thermal device tree bindings,
      it is desirable to properly maintain thermal bindings for
      existing and upcoming devices.
      
      As original author of thermal device tree bindings, I am
      volunteering to maintain them. This then adds and entry
      for device tree bindings under thermal domain.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      1beabfbe
    • Eduardo Valentin's avatar
      arm: dts: make OMAP4460 bandgap node to belong to OCP · 135df807
      Eduardo Valentin authored
      Small fix on representation. Bandgap node belongs to OCP.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Suggested-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      135df807
    • Eduardo Valentin's avatar
      arm: dts: make OMAP443x bandgap node to belong to OCP · 977a3528
      Eduardo Valentin authored
      Small fix on representation. Bandgap node belongs to OCP.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Suggested-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      977a3528
    • Eduardo Valentin's avatar
      arm: dts: add cooling properties on omap5 cpu node · 2cd29f63
      Eduardo Valentin authored
      OMAP5 devices can reach high temperatures and thus
      needs to have cpufreq-cooling on systems running on it.
      
      This patch adds the required cooling device properties
      so that cpufreq-cpu0 driver loads the cooling device.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      2cd29f63
    • Eduardo Valentin's avatar
      arm: dts: add omap5 thermal data · 1b761fc5
      Eduardo Valentin authored
      This patch changes the dtsi entry on omap5 to contain
      the thermal data. This data will enable the passive
      cooling with CPUfreq cooling device at 100C. The
      system will do a thermal shutdown at 125C whenever
      any of its sensors sees this level.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      1b761fc5
    • Eduardo Valentin's avatar
      arm: dts: add omap5 CORE thermal data · dcb5004f
      Eduardo Valentin authored
      This patch changes a dtsi file to contain the thermal data
      for CORE domain on OMAP5 and later SoCs. This data will
      enable a thermal shutdown at 125C.
      
      This thermal data can be reused across TI SoC devices.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      dcb5004f
    • Eduardo Valentin's avatar
      arm: dts: add omap5 GPU thermal data · 28c90169
      Eduardo Valentin authored
      This patch changes a dtsi file to contain the thermal data
      for GPU domain on OMAP5 and later SoCs. This data will
      enable a thermal shutdown at 125C.
      
      This thermal data can be reused across TI SoC devices.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      28c90169
    • Eduardo Valentin's avatar
      arm: dts: add cooling properties on omap4460 cpu node · 616a6635
      Eduardo Valentin authored
      OMAP4460 devices can reach high temperatures and thus
      needs to have cpufreq-cooling on systems running on it.
      
      This patch adds the required cooling device properties
      so that cpufreq-cpu0 driver loads the cooling device.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      616a6635
    • Eduardo Valentin's avatar
      arm: dts: add cooling properties on omap4430 cpu node · 72af5e6d
      Eduardo Valentin authored
      OMAP4430 devices can reach high temperatures and thus
      needs to have cpufreq-cooling on systems running on it.
      
      This patch adds the required cooling device properties
      so that cpufreq-cpu0 driver loads the cooling device.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      72af5e6d
    • Eduardo Valentin's avatar
      arm: dts: add omap4460 thermal data · 8af51b0f
      Eduardo Valentin authored
      This patch changes the dtsi entry on omap4460 to contain
      the thermal data. This data will enable the passive
      cooling with CPUfreq cooling device at 100C and the
      system will do a thermal shutdown at 125C.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      8af51b0f
    • Eduardo Valentin's avatar
      arm: dts: add omap4430 thermal data · aa9bb4bb
      Eduardo Valentin authored
      This patch changes the dtsi entry on omap4430 to contain
      the thermal data. This data will enable the passive
      cooling with CPUfreq cooling device at 100C and the
      system will do a thermal shutdown at 125C.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      aa9bb4bb
    • Eduardo Valentin's avatar
      arm: dts: add omap4 CPU thermal data · 0bbf6c54
      Eduardo Valentin authored
      This patch changes a dtsi file to contain the thermal data
      for MPU domain on OMAP4 and later SoCs. This data will
      enable the passive cooling with CPUfreq cooling device
      at 100C and the system will do a thermal shutdown at 125C.
      
      This thermal data can be reused across TI SoC devices.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-omap@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      0bbf6c54
    • Eduardo Valentin's avatar
      thermal: ti-soc-thermal: use thermal DT infrastructure · 26d9cc65
      Eduardo Valentin authored
      This patch improves the ti-soc-thermal driver by adding the
      support to build the thermal zones based on DT nodes.
      
      The driver will have two options now to build the thermal
      zones. The first option is the zones originally coded
      in this driver. So, the driver behavior will be same
      if there is no DT node describing the zones. The second
      option, when it is found a DT node with thermal data,
      will used the common infrastructure to build the thermal
      zone and bind its cooling devices.
      
      In case the driver loads thermal data using the legacy
      mode, this driver still adds to the system
      a cpufreq cooling device. Loading the thermal data from
      DT, the driver assumes someone else will add the cpufreq
      cooling device, like the cpufreq driver.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      26d9cc65
    • Eduardo Valentin's avatar
      hwmon: tmp102: expose to thermal fw via DT nodes · 6a027523
      Eduardo Valentin authored
      This patch adds to tmp102 temperature sensor the possibility
      to expose itself as thermal zone device, registered on the
      thermal framework.
      
      The thermal zone is built only if a device tree node
      describing a thermal zone for this sensor is present
      inside the tmp102 DT node. Otherwise, the driver behavior
      will be the same.
      
      Note: This patch has also been reviewed by Jean D. He has
      requested to perform a wider inspection of possible
      users of thermal and hwmon interaction API. On the other
      hand, the change on this patch is acceptable on first
      step of overall code change.
      
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: lm-sensors@lm-sensors.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      6a027523
    • Eduardo Valentin's avatar
      hwmon: lm75: expose to thermal fw via DT nodes · 22e73183
      Eduardo Valentin authored
      This patch adds to lm75 temperature sensor the possibility
      to expose itself as thermal zone device, registered on the
      thermal framework.
      
      The thermal zone is built only if a device tree node
      describing a thermal zone for this sensor is present
      inside the lm75 DT node. Otherwise, the driver behavior
      will be the same.
      
      Note: This patch has also been reviewed by Jean D. He has
      requested to perform a wider inspection of possible
      users of thermal and hwmon interaction API. On the other
      hand, the change on this patch is acceptable on first
      step of overall code change.
      
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: lm-sensors@lm-sensors.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      22e73183
    • Eduardo Valentin's avatar
      cpufreq: cpufreq-cpu0: add dt node parsing for cooling device properties · 77cff592
      Eduardo Valentin authored
      This patch changes the cpufreq-cpu0 driver to consider if
      a cpu needs cooling (with cpufreq). In case the cooling is needed,
      the cpu0 device tree node needs to be properly configured
      with cooling device properties.
      
      In case these properties are present,, the driver will
      load a cpufreq cooling device in the system. The cpufreq-cpu0
      driver is not interested in determining how the system should
      be using the cooling device. The driver is responsible
      only of loading the cooling device.
      
      Describing how the cooling device will be used can be
      accomplished by setting up a thermal zone that references
      and is composed by the cpufreq cooling device.
      
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: cpufreq@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: devicetree-discuss@lists.ozlabs.org
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      77cff592
    • Eduardo Valentin's avatar
      thermal: cpu_cooling: introduce of_cpufreq_cooling_register · 39d99cff
      Eduardo Valentin authored
      This patch introduces an API to register cpufreq cooling device
      based on device tree node.
      
      The registration via device tree node differs from normal
      registration due to the fact that it is needed to fill
      the device_node structure in order to be able to match
      the cooling devices with trip points.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      39d99cff
    • Eduardo Valentin's avatar
      thermal: core: introduce thermal_of_cooling_device_register · a116b5d4
      Eduardo Valentin authored
      This patch adds a new API to allow registering cooling devices
      in the thermal framework derived from device tree nodes.
      
      This API links the cooling device with the device tree node
      so that binding with thermal zones is possible, given
      that thermal zones are pointing to cooling device
      device tree nodes.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      a116b5d4
    • Eduardo Valentin's avatar
      thermal: introduce device tree parser · 4e5e4705
      Eduardo Valentin authored
      This patch introduces a device tree bindings for
      describing the hardware thermal behavior and limits.
      Also a parser to read and interpret the data and feed
      it in the thermal framework is presented.
      
      This patch introduces a thermal data parser for device
      tree. The parsed data is used to build thermal zones
      and thermal binding parameters. The output data
      can then be used to deploy thermal policies.
      
      This patch adds also documentation regarding this
      API and how to define tree nodes to use
      this infrastructure.
      
      Note that, in order to be able to have control
      on the sensor registration on the DT thermal zone,
      it was required to allow changing the thermal zone
      .get_temp callback. For this reason, this patch
      also removes the 'const' modifier from the .ops
      field of thermal zone devices.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      4e5e4705
    • Eduardo Valentin's avatar
      thermal: allow registering without .get_temp · 81bd4e1c
      Eduardo Valentin authored
      This patch changes the thermal core driver to allow
      registration of thermal zones without the .get_temp callback.
      
      The idea behind this change is to allow lazy registration
      of sensor callbacks.
      
      The thermal zone will be disabled whenever the ops
      does not contain a .get_temp callback. The sysfs interface
      will be returning -EINVAL on any temperature read operation.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      81bd4e1c
  3. 02 Dec, 2013 14 commits
    • Linus Torvalds's avatar
      Merge branch 'leds-fixes-for-3.13' of... · dea4f48a
      Linus Torvalds authored
      Merge branch 'leds-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
      
      Pull LED subsystem bugfix from Bryan Wu.
      
      * 'leds-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: pwm: Fix for deferred probe in DT booted mode
      dea4f48a
    • Peter Ujfalusi's avatar
      leds: pwm: Fix for deferred probe in DT booted mode · aa1a6d6d
      Peter Ujfalusi authored
      We need to make sure that the error code from devm_of_pwm_get() is the one
      the module returns in case of failure.
      Restructure the code to make this possible for DT booted case.
      With this patch the driver can ask for deferred probing when the board is
      booted with DT.
      Fixes for example omap4-sdp board's keyboard backlight led.
      Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
      Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
      aa1a6d6d
    • Linus Torvalds's avatar
      uio: we cannot mmap unaligned page contents · b6550287
      Linus Torvalds authored
      In commit 7314e613 ("Fix a few incorrectly checked
      [io_]remap_pfn_range() calls") the uio driver started more properly
      checking the passed-in user mapping arguments against the size of the
      actual uio driver data.
      
      That in turn exposed that some driver authors apparently didn't realize
      that mmap can only work on a page granularity, and had tried to use it
      with smaller mappings, with the new size check catching that out.
      
      So since it's not just the user mmap() arguments that can be confused,
      make the uio mmap code also verify that the uio driver has the memory
      allocated at page boundaries in order for mmap to work.  If the device
      memory isn't properly aligned, we return
      
        [ENODEV]
          The fildes argument refers to a file whose type is not supported by mmap().
      
      as per the open group documentation on mmap.
      Reported-by: default avatarHolger Brunck <holger.brunck@keymile.com>
      Acked-by: default avatarGreg KH <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6550287
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a45299e7
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       - Correction of fuzzy and fragile IRQ_RETVAL macro
       - IRQ related resume fix affecting only XEN
       - ARM/GIC fix for chained GIC controllers
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: Gic: fix boot for chained gics
        irq: Enable all irqs unconditionally in irq_resume
        genirq: Correct fuzzy and fragile IRQ_RETVAL() definition
      a45299e7
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a0b57ca3
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Various smaller fixlets, all over the place"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/doc: Fix generation of device-drivers
        sched: Expose preempt_schedule_irq()
        sched: Fix a trivial typo in comments
        sched: Remove unused variable in 'struct sched_domain'
        sched: Avoid NULL dereference on sd_busy
        sched: Check sched_domain before computing group power
        MAINTAINERS: Update file patterns in the lockdep and scheduler entries
      a0b57ca3
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e321ae4c
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Misc kernel and tooling fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools lib traceevent: Fix conversion of pointer to integer of different size
        perf/trace: Properly use u64 to hold event_id
        perf: Remove fragile swevent hlist optimization
        ftrace, perf: Avoid infinite event generation loop
        tools lib traceevent: Fix use of multiple options in processing field
        perf header: Fix possible memory leaks in process_group_desc()
        perf header: Fix bogus group name
        perf tools: Tag thread comm as overriden
      e321ae4c
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · bcc2f9b7
      Linus Torvalds authored
      Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
       "Fixes to patches that went in this merge window along with a latent
        bug:
         - Fix lazy flushing in case m2p override fails.
         - Fix module compile issues with ARM/Xen
         - Add missing call to DMA map page for Xen SWIOTLB for ARM"
      
      * tag 'stable/for-linus-3.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/gnttab: leave lazy MMU mode in the case of a m2p override failure
        xen/arm: p2m_init and p2m_lock should be static
        arm/xen: Export phys_to_mach to fix Xen module link errors
        swiotlb-xen: add missing xen_dma_map_page call
      bcc2f9b7
    • Linus Torvalds's avatar
      Merge tag 'spi-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · aeac8103
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A smattering of driver specific fixes here, including a bunch for a
        long standing common pattern in the error handling paths, and a fix
        for an embarrassing thinko in the new devm master registration code"
      
      * tag 'spi-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi/pxa2xx: Restore private register bits.
        spi/qspi: Fix qspi remove path.
        spi/qspi: cleanup pm_runtime error check.
        spi/qspi: set correct platform drvdata in ti_qspi_probe()
        spi/pxa2xx: add new ACPI IDs
        spi: core: invert success test in devm_spi_register_master
        spi: spi-mxs: fix reference leak to master in mxs_spi_remove()
        spi: bcm63xx: fix reference leak to master in bcm63xx_spi_remove()
        spi: txx9: fix reference leak to master in txx9spi_remove()
        spi: mpc512x: fix reference leak to master in mpc512x_psc_spi_do_remove()
        spi: rspi: use platform drvdata correctly in rspi_remove()
        spi: bcm2835: fix reference leak to master in bcm2835_spi_remove()
      aeac8103
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 5fc92de3
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Here is a pile of bug fixes that accumulated while I was in Europe"
      
       1) In fixing kernel leaks to userspace during copying of socket
          addresses, we broke a case that used to work, namely the user
          providing a buffer larger than the in-kernel generic socket address
          structure.  This broke Ruby amongst other things.  Fix from Dan
          Carpenter.
      
       2) Fix regression added by byte queue limit support in 8139cp driver,
          from Yang Yingliang.
      
       3) The addition of MSG_SENDPAGE_NOTLAST buggered up a few sendpage
          implementations, they should just treat it the same as MSG_MORE.
          Fix from Richard Weinberger and Shawn Landden.
      
       4) Handle icmpv4 errors received on ipv6 SIT tunnels correctly, from
          Oussama Ghorbel.  In particular we should send an ICMPv6 unreachable
          in such situations.
      
       5) Fix some regressions in the recent genetlink fixes, in particular
          get the pmcraid driver to use the new safer interfaces correctly.
          From Johannes Berg.
      
       6) macvtap was converted to use a per-cpu set of statistics, but some
          code was still bumping tx_dropped elsewhere.  From Jason Wang.
      
       7) Fix build failure of xen-netback due to missing include on some
          architectures, from Andy Whitecroft.
      
       8) macvtap double counts received packets in statistics, fix from Vlad
          Yasevich.
      
       9) Fix various cases of using *_STATS_BH() when *_STATS() is more
          appropriate.  From Eric Dumazet and Hannes Frederic Sowa.
      
      10) Pktgen ipsec mode doesn't update the ipv4 header length and checksum
          properly after encapsulation.  Fix from Fan Du.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
        net/mlx4_en: Remove selftest TX queues empty condition
        {pktgen, xfrm} Update IPv4 header total len and checksum after tranformation
        virtio_net: make all RX paths handle erors consistently
        virtio_net: fix error handling for mergeable buffers
        virtio_net: Fixed a trivial typo (fitler --> filter)
        netem: fix gemodel loss generator
        netem: fix loss 4 state model
        netem: missing break in ge loss generator
        net/hsr: Support iproute print_opt ('ip -details ...')
        net/hsr: Very small fix of comment style.
        MAINTAINERS: Added net/hsr/ maintainer
        ipv6: fix possible seqlock deadlock in ip6_finish_output2
        ixgbe: Make ixgbe_identify_qsfp_module_generic static
        ixgbe: turn NETIF_F_HW_L2FW_DOFFLOAD off by default
        ixgbe: ixgbe_fwd_ring_down needs to be static
        e1000: fix possible reset_task running after adapter down
        e1000: fix lockdep warning in e1000_reset_task
        e1000: prevent oops when adapter is being closed and reset simultaneously
        igb: Fixed Wake On LAN support
        inet: fix possible seqlock deadlocks
        ...
      5fc92de3
    • Linus Torvalds's avatar
      vfs: fix subtle use-after-free of pipe_inode_info · b0d8d229
      Linus Torvalds authored
      The pipe code was trying (and failing) to be very careful about freeing
      the pipe info only after the last access, with a pattern like:
      
              spin_lock(&inode->i_lock);
              if (!--pipe->files) {
                      inode->i_pipe = NULL;
                      kill = 1;
              }
              spin_unlock(&inode->i_lock);
              __pipe_unlock(pipe);
              if (kill)
                      free_pipe_info(pipe);
      
      where the final freeing is done last.
      
      HOWEVER.  The above is actually broken, because while the freeing is
      done at the end, if we have two racing processes releasing the pipe
      inode info, the one that *doesn't* free it will decrement the ->files
      count, and unlock the inode i_lock, but then still use the
      "pipe_inode_info" afterwards when it does the "__pipe_unlock(pipe)".
      
      This is *very* hard to trigger in practice, since the race window is
      very small, and adding debug options seems to just hide it by slowing
      things down.
      
      Simon originally reported this way back in July as an Oops in
      kmem_cache_allocate due to a single bit corruption (due to the final
      "spin_unlock(pipe->mutex.wait_lock)" incrementing a field in a different
      allocation that had re-used the free'd pipe-info), it's taken this long
      to figure out.
      
      Since the 'pipe->files' accesses aren't even protected by the pipe lock
      (we very much use the inode lock for that), the simple solution is to
      just drop the pipe lock early.  And since there were two users of this
      pattern, create a helper function for it.
      
      Introduced commit ba5bb147 ("pipe: take allocation and freeing of
      pipe_inode_info out of ->i_mutex").
      Reported-by: default avatarSimon Kirby <sim@hostway.ca>
      Reported-by: default avatarIan Applegate <ia@cloudflare.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@kernel.org   # v3.10+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b0d8d229
    • Eugenia Emantayev's avatar
      net/mlx4_en: Remove selftest TX queues empty condition · 833846e8
      Eugenia Emantayev authored
      Remove waiting for TX queues to become empty during selftest.
      This check is not necessary for any purpose, and might put
      the driver into an infinite loop.
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      833846e8
    • fan.du's avatar
      {pktgen, xfrm} Update IPv4 header total len and checksum after tranformation · 3868204d
      fan.du authored
      commit a553e4a6 ("[PKTGEN]: IPSEC support")
      tried to support IPsec ESP transport transformation for pktgen, but acctually
      this doesn't work at all for two reasons(The orignal transformed packet has
      bad IPv4 checksum value, as well as wrong auth value, reported by wireshark)
      
      - After transpormation, IPv4 header total length needs update,
        because encrypted payload's length is NOT same as that of plain text.
      
      - After transformation, IPv4 checksum needs re-caculate because of payload
        has been changed.
      
      With this patch, armmed pktgen with below cofiguration, Wireshark is able to
      decrypted ESP packet generated by pktgen without any IPv4 checksum error or
      auth value error.
      
      pgset "flag IPSEC"
      pgset "flows 1"
      Signed-off-by: default avatarFan Du <fan.du@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3868204d
    • Michael S. Tsirkin's avatar
      virtio_net: make all RX paths handle erors consistently · f121159d
      Michael S. Tsirkin authored
      receive mergeable now handles errors internally.
      Do same for big and small packet paths, otherwise
      the logic is too hard to follow.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f121159d
    • Michael S. Tsirkin's avatar
      virtio_net: fix error handling for mergeable buffers · 8fc3b9e9
      Michael S. Tsirkin authored
      Eric Dumazet noticed that if we encounter an error
      when processing a mergeable buffer, we don't
      dequeue all of the buffers from this packet,
      the result is almost sure to be loss of networking.
      
      Jason Wang noticed that we also leak a page and that we don't decrement
      the rq buf count, so we won't repost buffers (a resource leak).
      
      Fix both issues.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Michael Dalton <mwdalton@google.com>
      Reported-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8fc3b9e9
  4. 01 Dec, 2013 4 commits
  5. 30 Nov, 2013 1 commit
    • Fabio Estevam's avatar
      ARM: 7907/1: lib: delay-loop: Add align directive to fix BogoMIPS calculation · 11d4bb1b
      Fabio Estevam authored
      Currently mx53 (CortexA8) running at 1GHz reports:
      Calibrating delay loop... 663.55 BogoMIPS (lpj=3317760)
      
      Tom Evans verified that alignments of 0x0 and 0x8 run the two instructions of __loop_delay in one clock cycle (1 clock/loop), while alignments of 0x4 and 0xc take 3 clocks to run the loop twice. (1.5 clock/loop)
      
      The original object code looks like this:
      
      00000010 <__loop_const_udelay>:
        10:	e3e01000 	mvn	r1, #0
        14:	e51f201c 	ldr	r2, [pc, #-28]	; 0 <__loop_udelay-0x8>
        18:	e5922000 	ldr	r2, [r2]
        1c:	e0800921 	add	r0, r0, r1, lsr #18
        20:	e1a00720 	lsr	r0, r0, #14
        24:	e0822b21 	add	r2, r2, r1, lsr #22
        28:	e1a02522 	lsr	r2, r2, #10
        2c:	e0000092 	mul	r0, r2, r0
        30:	e0800d21 	add	r0, r0, r1, lsr #26
        34:	e1b00320 	lsrs	r0, r0, #6
        38:	01a0f00e 	moveq	pc, lr
      
      0000003c <__loop_delay>:
        3c:	e2500001 	subs	r0, r0, #1
        40:	8afffffe 	bhi	3c <__loop_delay>
        44:	e1a0f00e 	mov	pc, lr
      
      After adding the 'align 3' directive to __loop_delay (align to 8 bytes):
      
      00000010 <__loop_const_udelay>:
        10:	e3e01000 	mvn	r1, #0
        14:	e51f201c 	ldr	r2, [pc, #-28]	; 0 <__loop_udelay-0x8>
        18:	e5922000 	ldr	r2, [r2]
        1c:	e0800921 	add	r0, r0, r1, lsr #18
        20:	e1a00720 	lsr	r0, r0, #14
        24:	e0822b21 	add	r2, r2, r1, lsr #22
        28:	e1a02522 	lsr	r2, r2, #10
        2c:	e0000092 	mul	r0, r2, r0
        30:	e0800d21 	add	r0, r0, r1, lsr #26
        34:	e1b00320 	lsrs	r0, r0, #6
        38:	01a0f00e 	moveq	pc, lr
        3c:	e320f000 	nop	{0}
      
      00000040 <__loop_delay>:
        40:	e2500001 	subs	r0, r0, #1
        44:	8afffffe 	bhi	40 <__loop_delay>
        48:	e1a0f00e 	mov	pc, lr
        4c:	e320f000 	nop	{0}
      
      , which now reports:
      Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
      
      Some more test results:
      
      On mx31 (ARM1136) running at 532 MHz, before the patch:
      Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)
      
      On mx31 (ARM1136) running at 532 MHz after the patch:
      Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
      
      Also tested on mx6 (CortexA9) and on mx27 (ARM926), which shows the same
      BogoMIPS value before and after this patch.
      Reported-by: default avatarTom Evans <tom_usenet@optusnet.com.au>
      Suggested-by: default avatarTom Evans <tom_usenet@optusnet.com.au>
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      11d4bb1b