Skip to content
  1. Mar 06, 2015
  2. Mar 05, 2015
  3. Mar 04, 2015
    • Ingo Molnar's avatar
      Merge tag 'alternatives_padding' of... · f8e92fb4
      Ingo Molnar authored
      Merge tag 'alternatives_padding' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
      
       into x86/asm
      
      Pull alternative instructions framework improvements from Borislav Petkov:
      
       "A more involved rework of the alternatives framework to be able to
        pad instructions and thus make using the alternatives macros more
        straightforward and without having to figure out old and new instruction
        sizes but have the toolchain figure that out for us.
      
        Furthermore, it optimizes JMPs used so that fetch and decode can be
        relieved with smaller versions of the JMPs, where possible.
      
        Some stats:
      
          x86_64 defconfig:
      
          Alternatives sites total:               2478
          Total padding added (in Bytes):         6051
      
        The padding is currently done for:
      
          X86_FEATURE_ALWAYS
          X86_FEATURE_ERMS
          X86_FEATURE_LFENCE_RDTSC
          X86_FEATURE_MFENCE_RDTSC
          X86_FEATURE_SMAP
      
        This is with the latest version of the patchset. Of course, on each
        machine the alternatives sites actually being patched are a proper
        subset of the total number."
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f8e92fb4
    • Ingo Molnar's avatar
      d2c032e3
    • Brian Gerst's avatar
      x86/compat: Remove sys32_vm86_warning · 7e8e385a
      Brian Gerst authored
      
      
      The check against lastcomm is racy, and the message it produces
      isn't necessary.  vm86 support can be disabled on a 32-bit
      kernel also, and doesn't have this message.  Switch to
      sys_ni_syscall instead.
      
      Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1425439896-8322-4-git-send-email-brgerst@gmail.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7e8e385a
    • Brian Gerst's avatar
      x86/compat: Merge native and compat 32-bit syscall tables · 2aa4a710
      Brian Gerst authored
      
      
      Combine the 32-bit syscall tables into one file.
      
      Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1425439896-8322-3-git-send-email-brgerst@gmail.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2aa4a710
    • Brian Gerst's avatar
      x86/compat: Remove compat_ni_syscall() · 29a5ff97
      Brian Gerst authored
      
      
      compat_ni_syscall() does the same thing as sys_ni_syscall().
      
      Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1425439896-8322-2-git-send-email-brgerst@gmail.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      29a5ff97
    • Linus Torvalds's avatar
      Linux 4.0-rc2 · 13a7a6ac
      Linus Torvalds authored
      v4.0-rc2
      13a7a6ac
    • Daniel Vetter's avatar
      drm/i915: Fix modeset state confusion in the load detect code · 9128b040
      Daniel Vetter authored
      This is a tricky story of the new atomic state handling and the legacy
      code fighting over each another. The bug at hand is an underrun of the
      framebuffer reference with subsequent hilarity caused by the load
      detect code. Which is peculiar since the the exact same code works
      fine as the implementation of the legacy setcrtc ioctl.
      
      Let's look at the ingredients:
      
      - Currently our code is a crazy mix of legacy modeset interfaces to
        set the parameters and half-baked atomic state tracking underneath.
        While this transition is going we're using the transitional plane
        helpers to update the atomic side (drm_plane_helper_disable/update
        and friends), i.e. plane->state->fb. Since the state structure owns
        the fb those functions take care of that themselves.
      
        The legacy state (specifically crtc->primary->fb) is still managed
        by the old code (and mostly by the drm core), with the fb reference
        counting done by callers (core drm for the ioctl or the i915 load
        detect code). The relevant commit is
      
        commit ea2c67bb
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Dec 23 10:41:52 2014 -0800
      
            drm/i915: Move to atomic plane helpers (v9)
      
      - drm_plane_helper_disable has special code to handle multiple calls
        in a row - it checks plane->crtc == NULL and bails out. This is to
        match the proper atomic implementation which needs the crtc to get
        at the implied locking context atomic updates always need. See
      
        commit acf24a39
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Tue Jul 29 15:33:05 2014 +0200
      
            drm/plane-helper: transitional atomic plane helpers
      
      - The universal plane code split out the implicit primary plane from
        the CRTC into it's own full-blown drm_plane object. As part of that
        the setcrtc ioctl (which updated both the crtc mode and primary
        plane) learned to set crtc->primary->crtc on modeset to make sure
        the plane->crtc assignments statate up to date in
      
        commit e13161af
      
      
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Apr 1 15:22:38 2014 -0700
      
            drm: Add drm_crtc_init_with_planes() (v2)
      
        Unfortunately we've forgotten to update the load detect code. Which
        wasn't a problem since the load detect modeset is temporary and
        always undone before we drop the locks.
      
      - Finally there is a organically grown history (i.e. don't ask) around
        who sets the legacy plane->fb for the various driver entry points.
        Originally updating that was the drivers duty, but for almost all
        places we've moved that (plus updating the refcounts) into the core.
        Again the exception is the load detect code.
      
      Taking all together the following happens:
      - The load detect code doesn't set crtc->primary->crtc. This is only
        really an issue on crtcs never before used or when userspace
        explicitly disabled the primary plane.
      
      - The plane helper glue code short-circuits because of that and leaves
        a non-NULL fb behind in plane->state->fb and plane->fb. The state
        fb isn't a real problem (it's properly refcounted on its own), it's
        just the canary.
      
      - Load detect code drops the reference for that fb, but doesn't set
        plane->fb = NULL. This is ok since it's still living in that old
        world where drivers had to clear the pointer but the core/callers
        handled the refcounting.
      
      - On the next modeset the drm core notices plane->fb and takes care of
        refcounting it properly by doing another unref. This drops the
        refcount to zero, leaving state->plane now pointing at freed memory.
      
      - intel_plane_duplicate_state still assume it owns a reference to that
        very state->fb and bad things start to happen.
      
      Fix this all by applying the same duct-tape as for the legacy setcrtc
      ioctl code and set crtc->primary->crtc properly.
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reported-and-tested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9128b040
    • Borislav Petkov's avatar
      perf/bench: Add -r all so that you can run all mem* routines · dfecb95c
      Borislav Petkov authored
      
      
      perf bench mem mem{set,cpy} -r all thus runs all available mem
      benchmarking routines.
      
      Reviewed-by: default avatarHitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      dfecb95c
    • Borislav Petkov's avatar
      perf/bench: Carve out mem routine benchmarking · 515e23f0
      Borislav Petkov authored
      
      
      ... so that we can call it multiple times. See next patch.
      
      Reviewed-by: default avatarHitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      515e23f0
    • Borislav Petkov's avatar
      perf/bench: Fix mem* routines usage after alternatives change · 0cf55934
      Borislav Petkov authored
      
      
      Adjust perf bench to the new changes in the alternatives code for
      memcpy/memset.
      
      Reviewed-by: default avatarHitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      0cf55934
  4. Mar 03, 2015
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 023a6007
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Two GPIO fixes:
      
         - Fix a translation problem in of_get_named_gpiod_flags()
      
         - Fix a long standing container_of() mistake in the TPS65912 driver"
      
      * tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: tps65912: fix wrong container_of arguments
        gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node
      023a6007
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-4.0-rc2' of... · 10d6dfc1
      Linus Torvalds authored
      Merge branch 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
      
      Pull thermal management fixes from Eduardo Valentin:
       "Specifics:
      
         - Several fixes in tmon tool.
      
         - Fixes in intel int340x for _ART and _TRT tables.
      
         - Add id for Avoton SoC into powerclamp driver.
      
         - Fixes in RCAR thermal driver to remove race conditions and fix fail
           path
      
         - Fixes in TI thermal driver: removal of unnecessary code and build
           fix if !CONFIG_PM_SLEEP
      
         - Cleanups in exynos thermal driver
      
         - Add stubs for include/linux/thermal.h.  Now drivers using thermal
           calls but that also work without CONFIG_THERMAL will be able to
           compile for systems that don't care about thermal.
      
        Note: I am sending this pull on Rui's behalf while he fixes issues in
        his Linux box"
      
      * 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
        thermal: int340x_thermal: Ignore missing _ART, _TRT tables
        thermal/intel_powerclamp: add id for Avoton SoC
        tools/thermal: tmon: silence 'set but not used' warnings
        tools/thermal: tmon: use pkg-config to determine library dependencies
        tools/thermal: tmon: support cross-compiling
        tools/thermal: tmon: add .gitignore
        tools/thermal: tmon: fixup tui windowing calculations
        tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
        tools/thermal: tmon: add min/max macros
        tools/thermal: tmon: add --target-temp parameter
        thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
        thermal: rcar: Make error and remove paths symmetrical with init
        thermal: rcar: Fix race condition between init and interrupt
        thermal: Introduce dummy functions when thermal is not defined
        ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
        thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP
      10d6dfc1
    • Linus Torvalds's avatar
      Merge tag 'md/4.0-fixes' of git://neil.brown.name/md · 1a6f77ab
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Three md fixes:
      
         - fix a read-balance problem that was reported 2 years ago, but that
           I never noticed the report :-(
      
         - fix for rare RAID6 problem causing incorrect bitmap updates when
           two devices fail.
      
         - add __ATTR_PREALLOC annotation now that it is possible"
      
      * tag 'md/4.0-fixes' of git://neil.brown.name/md:
        md: mark some attributes as pre-alloc
        raid5: check faulty flag for array status during recovery.
        md/raid1: fix read balance when a drive is write-mostly.
      1a6f77ab
    • Linus Torvalds's avatar
      Merge tag 'metag-fixes-v4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag · 49db1f0e
      Linus Torvalds authored
      Pull arch/metag fix from James Hogan:
       "This is just a single patch to fix the KSTK_EIP() and KSTK_ESP()
        macros for metag which have always been erronously returning the PC
        and stack pointer of the task's kernel context rather than from its
        user context saved at entry from userland into the kernel, which
        affects the contents of /proc/<pid>/maps and /proc/<pid>/stat"
      
      * tag 'metag-fixes-v4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
        metag: Fix KSTK_EIP() and KSTK_ESP() macros
      49db1f0e
  5. Mar 02, 2015
  6. Mar 01, 2015
    • Sebastian Andrzej Siewior's avatar
      locking/rtmutex: Set state back to running on error · 9d3e2d02
      Sebastian Andrzej Siewior authored
      
      
      The "usual" path is:
      
       - rt_mutex_slowlock()
       - set_current_state()
       - task_blocks_on_rt_mutex() (ret 0)
       - __rt_mutex_slowlock()
         - sleep or not but do return with __set_current_state(TASK_RUNNING)
       - back to caller.
      
      In the early error case where task_blocks_on_rt_mutex() return
      -EDEADLK we never change the task's state back to RUNNING. I
      assume this is intended. Without this change after ww_mutex
      using rt_mutex the selftest passes but later I get plenty of:
      
        | bad: scheduling from the idle thread!
      
      backtraces.
      
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMike Galbraith <umgwanakikbuti@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: afffc6c1 ("locking/rtmutex: Optimize setting task running after being blocked")
      Link: http://lkml.kernel.org/r/1425056229-22326-4-git-send-email-bigeasy@linutronix.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9d3e2d02
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ae1aa797
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Just general fixes: radeon, i915, atmel, tegra, amdkfd and one core
        fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (28 commits)
        drm: atmel-hlcdc: remove clock polarity from crtc driver
        drm/radeon: only enable DP audio if the monitor supports it
        drm/radeon: fix atom aux payload size check for writes (v2)
        drm/radeon: fix 1 RB harvest config setup for TN/RL
        drm/radeon: enable SRBM timeout interrupt on EG/NI
        drm/radeon: enable SRBM timeout interrupt on SI
        drm/radeon: enable SRBM timeout interrupt on CIK v2
        drm/radeon: dump full IB if we hit a packet error
        drm/radeon: disable mclk switching with 120hz+ monitors
        drm/radeon: use drm_mode_vrefresh() rather than mode->vrefresh
        drm/radeon: enable native backlight control on old macs
        drm/i915: Fix frontbuffer false positve.
        drm/i915: Align initial plane backing objects correctly
        drm/i915: avoid processing spurious/shared interrupts in low-power states
        drm/i915: Check obj->vma_list under the struct_mutex
        drm/i915: Fix a use after free, and unbalanced refcounting
        drm: atmel-hlcdc: remove useless pm_runtime_put_sync in probe
        drm: atmel-hlcdc: reset layer A2Q and UPDATE bits when disabling it
        drm: Fix deadlock due to getconnector locking changes
        drm/i915: Dell Chromebook 11 has PWM backlight
        ...
      ae1aa797