1. 05 May, 2015 15 commits
    • Punit Agrawal's avatar
      thermal: Default OF created trip points to writable · 76af5495
      Punit Agrawal authored
      When registering a thermal zone from device tree, default the trip
      points to writable. By default, only the root user can change these.
      
      This allows the trip points to be tweaked after the system has
      booted.
      
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      76af5495
    • Punit Agrawal's avatar
      thermal: core: Add Kconfig option to enable writable trips · 35e94644
      Punit Agrawal authored
      Add a Kconfig option to allow system integrators to control whether
      userspace tools can change trip temperatures. This option overrides
      the thermal zone setup in the driver code and must be enabled for
      platform specified writable trips to come into effect.
      
      The original behaviour of requiring root privileges to change trip
      temperatures remains unchanged.
      
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      35e94644
    • Javi Merino's avatar
      thermal: x86_pkg_temp: drop const for thermal_zone_parameters · 4abe602d
      Javi Merino authored
      8754d5115693 ("thermal: introduce the Power Allocator governor") dropped
      the const attribute in the struct thermal_zone_device.  That means that
      the thermal_zone_params pointer passed to thermal_zone_device_register()
      also lost the const qualifier.  Drop the const in x86_pkg_temp_thermal.c
      as well to avoid the following warning as reported by the kbuild test
      robot:
      
         drivers/thermal/x86_pkg_temp_thermal.c: In function 'pkg_temp_thermal_device_add':
      >> drivers/thermal/x86_pkg_temp_thermal.c:450:31: warning: passing argument 6 of 'thermal_zone_device_register' discards 'const' qualifier from pointer target type
             phy_dev_entry, &tzone_ops, &pkg_temp_tz_params, 0, 0);
                                        ^
         In file included from drivers/thermal/x86_pkg_temp_thermal.c:30:0:
         include/linux/thermal.h:378:29: note: expected 'struct thermal_zone_params *' but argument is of type 'const struct thermal_zone_params *'
          struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
                                      ^
      
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      4abe602d
    • Punit Agrawal's avatar
      of: thermal: Introduce sustainable power for a thermal zone · 647f9925
      Punit Agrawal authored
      Introduce an optional property called, sustainable-power, which
      represents the power (in mW) which the thermal zone can safely
      dissipate.
      
      If provided the property is parsed and associated with the thermal
      zone via the thermal zone parameters.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      647f9925
    • Javi Merino's avatar
      thermal: add trace events to the power allocator governor · 6828a471
      Javi Merino authored
      Add trace events for the power allocator governor and the power actor
      interface of the cpu cooling device.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      6828a471
    • Javi Merino's avatar
      thermal: introduce the Power Allocator governor · 6b775e87
      Javi Merino authored
      The power allocator governor is a thermal governor that controls system
      and device power allocation to control temperature.  Conceptually, the
      implementation divides the sustainable power of a thermal zone among
      all the heat sources in that zone.
      
      This governor relies on "power actors", entities that represent heat
      sources.  They can report current and maximum power consumption and
      can set a given maximum power consumption, usually via a cooling
      device.
      
      The governor uses a Proportional Integral Derivative (PID) controller
      driven by the temperature of the thermal zone.  The output of the
      controller is a power budget that is then allocated to each power
      actor that can have bearing on the temperature we are trying to
      control.  It decides how much power to give each cooling device based
      on the performance they are requesting.  The PID controller ensures
      that the total power budget does not exceed the control temperature.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      6b775e87
    • Javi Merino's avatar
      thermal: cpu_cooling: implement the power cooling device API · c36cf071
      Javi Merino authored
      Add a basic power model to the cpu cooling device to implement the
      power cooling device API.  The power model uses the current frequency,
      current load and OPPs for the power calculations.  The cpus must have
      registered their OPPs using the OPP library.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarKapileshwar Singh <kapileshwar.singh@arm.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      c36cf071
    • Javi Merino's avatar
      thermal: extend the cooling device API to include power information · 35b11d2e
      Javi Merino authored
      Add three optional callbacks to the cooling device interface to allow
      them to express power.  In addition to the callbacks, add helpers to
      identify cooling devices that implement the power cooling device API.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      35b11d2e
    • Javi Merino's avatar
      thermal: let governors have private data for each thermal zone · e33df1d2
      Javi Merino authored
      A governor may need to store its current state between calls to
      throttle().  That state depends on the thermal zone, so store it as
      private data in struct thermal_zone_device.
      
      The governors may have two new ops: bind_to_tz() and unbind_from_tz().
      When provided, these functions let governors do some initialization
      and teardown when they are bound/unbound to a tz and possibly store that
      information in the governor_data field of the struct
      thermal_zone_device.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      e33df1d2
    • Ivan T. Ivanov's avatar
      thermal: Add QPNP PMIC temperature alarm driver · c610afaa
      Ivan T. Ivanov authored
      Add support for the temperature alarm peripheral found inside
      Qualcomm plug-and-play (QPNP) PMIC chips. The temperature alarm
      peripheral outputs a pulse on an interrupt line whenever the
      thermal over temperature stage value changes.
      
      Register a thermal sensor. The temperature reported by this thermal
      sensor device should reflect the actual PMIC die temperature if an
      ADC is present on the given PMIC. If no ADC is present, then the
      reported temperature should be estimated from the over temperature
      stage value.
      
      Cc: David Collins <collinsd@codeaurora.org>
      Signed-off-by: default avatarIvan T. Ivanov <iivanov@mm-sol.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      c610afaa
    • Javi Merino's avatar
      thermal: fair_share: generalize the weight concept · bcdcbbc7
      Javi Merino authored
      The fair share governor has the concept of weights, which is the
      influence of each cooling device in a thermal zone.  The current
      implementation forces the weights of all cooling devices in a thermal
      zone to add up to a 100.  This complicates setups, as you need to know
      in advance how many cooling devices you are going to have.  If you bind a
      new cooling device, you have to modify all the other cooling devices
      weights, which is error prone.  Furthermore, you can't specify a
      "default" weight for platforms since that default value depends on the
      number of cooling devices in the platform.
      
      This patch generalizes the concept of weight by allowing any number to
      be a "weight".  Weights are now relative to each other.  Platforms that
      don't specify weights get the same default value for all their cooling
      devices, so all their cdevs are considered to be equally influential.
      
      It's important to note that previous users of the weights don't need to
      alter the code: percentages continue to work as they used to.  This
      patch just removes the constraint of all the weights in a thermal zone
      having to add up to a 100.  If they do, you get the same behavior as
      before.  If they don't, fair share now works for that platform.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Acked-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      bcdcbbc7
    • Javi Merino's avatar
      thermal: export weight to sysfs · db916513
      Javi Merino authored
      It's useful to have access to the weights for the cooling devices for
      thermal zones and change them if needed.  Export them to sysfs.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      db916513
    • Javi Merino's avatar
      thermal: fair_share: fix typo · 80b89172
      Javi Merino authored
      s/asscciated/associated/
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      80b89172
    • Javi Merino's avatar
      thermal: fair_share: use the weight from the thermal instance · 8b91e2cb
      Javi Merino authored
      The fair share governor is not usable with thermal zones that use the
      bind op and don't populate thermal_zone_parameters, the majority of
      them.  Now that the weight is in the thermal instance, we can use that
      in the fair share governor to allow every thermal zone to trivially use
      this governor.  Furthermore, this simplifies the code.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      8b91e2cb
    • Kapileshwar Singh's avatar
      thermal: of: fix cooling device weights in device tree · 6cd9e9f6
      Kapileshwar Singh authored
      Currently you can specify the weight of the cooling device in the device
      tree but that information is not populated to the
      thermal_bind_params where the fair share governor expects it to
      be.  The of thermal zone device doesn't have a thermal_bind_params
      structure and arguably it's better to pass the weight inside the
      thermal_instance as it is specific to the bind of a cooling device to a
      thermal zone parameter.
      
      Core thermal code is fixed to populate the weight in the instance from
      the thermal_bind_params, so platform code that was passing the weight
      inside the thermal_bind_params continue to work seamlessly.
      
      While we are at it, create a default value for the weight parameter for
      those thermal zones that currently don't define it and remove the
      hardcoded default in of-thermal.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Feuerer <peter@piie.net>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarKapileshwar Singh <kapileshwar.singh@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
      6cd9e9f6
  2. 04 May, 2015 3 commits
    • Linus Torvalds's avatar
      Linux 4.1-rc2 · 5ebe6afa
      Linus Torvalds authored
      5ebe6afa
    • Linus Torvalds's avatar
      Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 8663da2c
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Some miscellaneous bug fixes and some final on-disk and ABI changes
        for ext4 encryption which provide better security and performance"
      
      * tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix growing of tiny filesystems
        ext4: move check under lock scope to close a race.
        ext4: fix data corruption caused by unwritten and delayed extents
        ext4 crypto: remove duplicated encryption mode definitions
        ext4 crypto: do not select from EXT4_FS_ENCRYPTION
        ext4 crypto: add padding to filenames before encrypting
        ext4 crypto: simplify and speed up filename encryption
      8663da2c
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 101a6fd3
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "One intel fix, one rockchip fix, and a bunch of radeon fixes for some
        regressions from audio rework and vm stability"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915/chv: Implement WaDisableShadowRegForCpd
        drm/radeon: fix userptr return value checking (v2)
        drm/radeon: check new address before removing old one
        drm/radeon: reset BOs address after clearing it.
        drm/radeon: fix lockup when BOs aren't part of the VM on release
        drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
        drm/radeon: adjust pll when audio is not enabled
        drm/radeon: only enable audio streams if the monitor supports it
        drm/radeon: only mark audio as connected if the monitor supports it (v3)
        drm/radeon/audio: don't enable packets until the end
        drm/radeon: drop dce6_dp_enable
        drm/radeon: fix ordering of AVI packet setup
        drm/radeon: Use drm_calloc_ab for CS relocs
        drm/rockchip: fix error check when getting irq
        MAINTAINERS: add entry for Rockchip drm drivers
      101a6fd3
  3. 03 May, 2015 8 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 71aee819
      Dave Airlie authored
      Just a single intel fix
      * tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel:
        drm/i915/chv: Implement WaDisableShadowRegForCpd
      71aee819
    • Dave Airlie's avatar
      Merge branch 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes · df9ebeb2
      Dave Airlie authored
      one fix and maintainers update
      * 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip:
        drm/rockchip: fix error check when getting irq
        MAINTAINERS: add entry for Rockchip drm drivers
      df9ebeb2
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 61f06db0
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is three logical fixes (as 5 patches).
      
        The 3ware class of drivers were causing an oops with multiqueue by
        tearing down the command mappings after completing the command (where
        the variables in the command used to tear down the mapping were
        no-longer valid).  There's also a fix for the qnap iscsi target which
        was choking on us sending it commands that were too long and a fix for
        the reworked aha1542 allocating GFP_KERNEL under a lock"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        3w-9xxx: fix command completion race
        3w-xxxx: fix command completion race
        3w-sas: fix command completion race
        aha1542: Allocate memory before taking a lock
        SCSI: add 1024 max sectors black list flag
      61f06db0
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma · 33332224
      Linus Torvalds authored
      Pull slave dmaengine fixes from Vinod Koul:
       "Here are the fixes in dmaengine subsystem for rc2:
      
         - privatecnt fix for slave dma request API by Christopher
      
         - warn fix for PM ifdef in usb-dmac by Geert
      
         - fix hardware dependency for xgene by Jean"
      
      * 'next' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: increment privatecnt when using dma_get_any_slave_channel
        dmaengine: xgene: Set hardware dependency
        dmaengine: usb-dmac: Protect PM-only functions to kill warning
      33332224
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux · 180d89f6
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       - build fix for SMP=n in book3s_xics.c
       - fix for Daniel's pci_controller_ops on powernv.
       - revert the TM syscall abort patch for now.
       - CPU affinity fix from Nathan.
       - two EEH fixes from Gavin.
       - fix for CR corruption from Sam.
       - selftest build fix.
      
      * tag 'powerpc-4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
        powerpc/powernv: Restore non-volatile CRs after nap
        powerpc/eeh: Delay probing EEH device during hotplug
        powerpc/eeh: Fix race condition in pcibios_set_pcie_reset_state()
        powerpc/pseries: Correct cpu affinity for dlpar added cpus
        selftests/powerpc: Fix the pmu install rule
        Revert "powerpc/tm: Abort syscalls in active transactions"
        powerpc/powernv: Fix early pci_controller_ops loading.
        powerpc/kvm: Fix SMP=n build error in book3s_xics.c
      180d89f6
    • Jan Kara's avatar
      ext4: fix growing of tiny filesystems · 2c869b26
      Jan Kara authored
      The estimate of necessary transaction credits in ext4_flex_group_add()
      is too pessimistic. It reserves credit for sb, resize inode, and resize
      inode dindirect block for each group added in a flex group although they
      are always the same block and thus it is enough to account them only
      once. Also the number of modified GDT block is overestimated since we
      fit EXT4_DESC_PER_BLOCK(sb) descriptors in one block.
      
      Make the estimation more precise. That reduces number of requested
      credits enough that we can grow 20 MB filesystem (which has 1 MB
      journal, 79 reserved GDT blocks, and flex group size 16 by default).
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
      2c869b26
    • Davide Italiano's avatar
      ext4: move check under lock scope to close a race. · 280227a7
      Davide Italiano authored
      fallocate() checks that the file is extent-based and returns
      EOPNOTSUPP in case is not. Other tasks can convert from and to
      indirect and extent so it's safe to check only after grabbing
      the inode mutex.
      Signed-off-by: default avatarDavide Italiano <dccitaliano@gmail.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      280227a7
    • Lukas Czerner's avatar
      ext4: fix data corruption caused by unwritten and delayed extents · d2dc317d
      Lukas Czerner authored
      Currently it is possible to lose whole file system block worth of data
      when we hit the specific interaction with unwritten and delayed extents
      in status extent tree.
      
      The problem is that when we insert delayed extent into extent status
      tree the only way to get rid of it is when we write out delayed buffer.
      However there is a limitation in the extent status tree implementation
      so that when inserting unwritten extent should there be even a single
      delayed block the whole unwritten extent would be marked as delayed.
      
      At this point, there is no way to get rid of the delayed extents,
      because there are no delayed buffers to write out. So when a we write
      into said unwritten extent we will convert it to written, but it still
      remains delayed.
      
      When we try to write into that block later ext4_da_map_blocks() will set
      the buffer new and delayed and map it to invalid block which causes
      the rest of the block to be zeroed loosing already written data.
      
      For now we can fix this by simply not allowing to set delayed status on
      written extent in the extent status tree. Also add WARN_ON() to make
      sure that we notice if this happens in the future.
      
      This problem can be easily reproduced by running the following xfs_io.
      
      xfs_io -f -c "pwrite -S 0xaa 4096 2048" \
                -c "falloc 0 131072" \
                -c "pwrite -S 0xbb 65536 2048" \
                -c "fsync" /mnt/test/fff
      
      echo 3 > /proc/sys/vm/drop_caches
      xfs_io -c "pwrite -S 0xdd 67584 2048" /mnt/test/fff
      
      This can be theoretically also reproduced by at random by running fsx,
      but it's not very reliable, though on machines with bigger page size
      (like ppc) this can be seen more often (especially xfstest generic/127)
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      d2dc317d
  4. 02 May, 2015 7 commits
  5. 01 May, 2015 7 commits
    • Ilya Dryomov's avatar
      rbd: end I/O the entire obj_request on error · 082a75da
      Ilya Dryomov authored
      When we end I/O struct request with error, we need to pass
      obj_request->length as @nr_bytes so that the entire obj_request worth
      of bytes is completed.  Otherwise block layer ends up confused and we
      trip on
      
          rbd_assert(more ^ (which == img_request->obj_request_count));
      
      in rbd_img_obj_callback() due to more being true no matter what.  We
      already do it in most cases but we are missing some, in particular
      those where we don't even get a chance to submit any obj_requests, due
      to an early -ENOMEM for example.
      
      A number of obj_request->xferred assignments seem to be redundant but
      I haven't touched any of obj_request->xferred stuff to keep this small
      and isolated.
      
      Cc: Alex Elder <elder@linaro.org>
      Cc: stable@vger.kernel.org # 3.10+
      Reported-by: default avatarShawn Edwards <lesser.evil@gmail.com>
      Reviewed-by: default avatarSage Weil <sage@redhat.com>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      082a75da
    • Theodore Ts'o's avatar
      ext4 crypto: add padding to filenames before encrypting · a44cd7a0
      Theodore Ts'o authored
      This obscures the length of the filenames, to decrease the amount of
      information leakage.  By default, we pad the filenames to the next 4
      byte boundaries.  This costs nothing, since the directory entries are
      aligned to 4 byte boundaries anyway.  Filenames can also be padded to
      8, 16, or 32 bytes, which will consume more directory space.
      
      Change-Id: Ibb7a0fb76d2c48e2061240a709358ff40b14f322
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      a44cd7a0
    • Theodore Ts'o's avatar
      ext4 crypto: simplify and speed up filename encryption · 5de0b4d0
      Theodore Ts'o authored
      Avoid using SHA-1 when calculating the user-visible filename when the
      encryption key is available, and avoid decrypting lots of filenames
      when searching for a directory entry in a directory block.
      
      Change-Id: If4655f144784978ba0305b597bfa1c8d7bb69e63
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      5de0b4d0
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 64887b68
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "A few more btrfs fixes.
      
        These range from corners Filipe found in the new free space cache
        writeback to a grab bag of fixes from the list"
      
      * 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: btrfs_release_extent_buffer_page didn't free pages of dummy extent
        Btrfs: fill ->last_trans for delayed inode in btrfs_fill_inode.
        btrfs: unlock i_mutex after attempting to delete subvolume during send
        btrfs: check io_ctl_prepare_pages return in __btrfs_write_out_cache
        btrfs: fix race on ENOMEM in alloc_extent_buffer
        btrfs: handle ENOMEM in btrfs_alloc_tree_block
        Btrfs: fix find_free_dev_extent() malfunction in case device tree has hole
        Btrfs: don't check for delalloc_bytes in cache_save_setup
        Btrfs: fix deadlock when starting writeback of bg caches
        Btrfs: fix race between start dirty bg cache writeout and bg deletion
      64887b68
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 036f351e
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Not too much here, but we've addressed a couple of nasty issues in the
        dma-mapping code as well as adding the halfword and byte variants of
        load_acquire/store_release following on from the CSD locking bug that
        you fixed in the core.
      
         - fix perf devicetree warnings at probe time
      
         - fix memory leak in __dma_free()
      
         - ensure DMA buffers are always zeroed
      
         - show IRQ trigger in /proc/interrupts (for parity with ARM)
      
         - implement byte and halfword access for smp_{load_acquire,store_release}"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: perf: Fix the pmu node name in warning message
        arm64: perf: don't warn about missing interrupt-affinity property for PPIs
        arm64: add missing PAGE_ALIGN() to __dma_free()
        arm64: dma-mapping: always clear allocated buffers
        ARM64: Enable CONFIG_GENERIC_IRQ_SHOW_LEVEL
        arm64: add missing data types in smp_load_acquire/smp_store_release
      036f351e
    • Sam Bobroff's avatar
      powerpc/powernv: Restore non-volatile CRs after nap · 0aab3747
      Sam Bobroff authored
      Patches 7cba160a "powernv/cpuidle: Redesign idle states management"
      and 77b54e9f "powernv/powerpc: Add winkle support for offline cpus"
      use non-volatile condition registers (cr2, cr3 and cr4) early in the system
      reset interrupt handler (system_reset_pSeries()) before it has been determined
      if state loss has occurred. If state loss has not occurred, control returns via
      the power7_wakeup_noloss() path which does not restore those condition
      registers, leaving them corrupted.
      
      Fix this by restoring the condition registers in the power7_wakeup_noloss()
      case.
      
      This is apparent when running a KVM guest on hardware that does not
      support winkle or sleep and the guest makes use of secondary threads. In
      practice this means Power7 machines, though some early unreleased Power8
      machines may also be susceptible.
      
      The secondary CPUs are taken off line before the guest is started and
      they call pnv_smp_cpu_kill_self(). This checks support for sleep
      states (in this case there is no support) and power7_nap() is called.
      
      When the CPU is woken, power7_nap() returns and because the CPU is
      still off line, the main while loop executes again. The sleep states
      support test is executed again, but because the tested values cannot
      have changed, the compiler has optimized the test away and instead we
      rely on the result of the first test, which has been left in cr3
      and/or cr4. With the result overwritten, the wrong branch is taken and
      power7_winkle() is called on a CPU that does not support it, leading
      to it stalling.
      
      Fixes: 7cba160a ("powernv/cpuidle: Redesign idle states management")
      Fixes: 77b54e9f ("powernv/powerpc: Add winkle support for offline cpus")
      [mpe: Massage change log a bit more]
      Signed-off-by: default avatarSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0aab3747
    • Gavin Shan's avatar
      powerpc/eeh: Delay probing EEH device during hotplug · d91dafc0
      Gavin Shan authored
      Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH
      devices in early stage, which is reasonable to pSeries platform.
      However, it's wrong for PowerNV platform because the PE# isn't
      determined until the resources (IO and MMIO) are assigned to
      PE in hotplug case. So we have to delay probing EEH devices
      for PowerNV platform until the PE# is assigned.
      
      Fixes: ff57b454 ("powerpc/eeh: Do probe on pci_dn")
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      d91dafc0