1. 22 Nov, 2014 3 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · 4ec69c7e
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "We have couple of fixes for dmaengine queued up:
         - dma mempcy fix for dma configuration of sun6i by Maxime
         - pl330 fixes: First the fixing allocation for data buffers by Liviu
           and then Jon's fixe for fifo width and usage"
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: Fix allocation size for PL330 data buffer depth.
        dmaengine: pl330: Limit MFIFO usage for memcpy to avoid exhausting entries
        dmaengine: pl330: Align DMA memcpy operations to MFIFO width
        dmaengine: sun6i: Fix memcpy operation
      4ec69c7e
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · e6a588d0
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "More 3.18 fixes for MIPS:
      
         - backtraces were not quite working on on 64-bit kernels
         - loongson needs a different cache coherency setting
         - Loongson 3 is a MIPS64 R2 version but due to erratum we treat is an
           older architecture revision.
         - fix build errors due to undefined references to __node_distances
           for certain configurations.
         - fix instruction decodig in the jump label code.
         - for certain configurations copy_{from,to}_user destroy the content
           of $3 so that register needs to be marked as clobbed by the calling
           code.
         - Hardware Table Walker fixes.
         - fill the delay slot of the last instruction of memcpy otherwise
           whatever ends up there randomly might have undesirable effects.
         - ensure get_user/__get_user always zero the variable to be read even
           in case of an error"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: jump_label.c: Handle the microMIPS J instruction encoding
        MIPS: jump_label.c: Correct the span of the J instruction
        MIPS: Zero variable read by get_user / __get_user in case of an error.
        MIPS: lib: memcpy: Restore NOP on delay slot before returning to caller
        MIPS: tlb-r4k: Add missing HTW stop/start sequences
        MIPS: asm: uaccess: Add v1 register to clobber list on EVA
        MIPS: oprofile: Fix backtrace on 64-bit kernel
        MIPS: Loongson: Set Loongson-3's ISA level to MIPS64R1
        MIPS: Loongson: Fix the write-combine CCA value setting
        MIPS: IP27: Fix __node_distances undefined error
        MIPS: Loongson3: Fix __node_distances undefined error
      e6a588d0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux · 4fc82c0a
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
       "One fix from Scott, he says:
      
        This patch fixes a crash (introduced in v3.18-rc1) in the FSL MSI driver
        when threaded IRQs are enabled"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
        powerpc/fsl_msi: mark the msi cascade handler IRQF_NO_THREAD
      4fc82c0a
  2. 21 Nov, 2014 4 commits
  3. 20 Nov, 2014 1 commit
  4. 19 Nov, 2014 11 commits
  5. 18 Nov, 2014 4 commits
  6. 17 Nov, 2014 6 commits
  7. 16 Nov, 2014 11 commits
    • Linus Torvalds's avatar
      Merge tag 'md/3.18-fix' of git://neil.brown.name/md · 0fbae136
      Linus Torvalds authored
      Pull md bugfix from Neil Brown:
       "One fix for md for 3.18.
      
        This fixes a regression introduced in 3.13"
      
      * tag 'md/3.18-fix' of git://neil.brown.name/md:
        md: Always set RECOVERY_NEEDED when clearing RECOVERY_FROZEN
      0fbae136
    • Peter Rosin's avatar
      ARM: at91/dt: Fix sama5d3x typos · e899dbaf
      Peter Rosin authored
      Some DT files had a typo with a missing "5" in sama5d3x first compatible string.
      Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
      [nicolas.ferre@atmel.com: modify commit log]
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      e899dbaf
    • Olof Johansson's avatar
      Merge tag 'omap-fixes-against-v3.18-rc4' of... · f7efdad0
      Olof Johansson authored
      Merge tag 'omap-fixes-against-v3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Merge "omap fixes against v3.18-rc4" from Tony Lindgren:
      
      Few omap fixes for hangs and wrong pinctrl defines, and update
      MAINTAINERS file to avoid missing PMIC and SoC related patches:
      
      - Fix random hangs on am437x because of incorrect default
        value for the DDR regulator
      
      - Fix wrong partition name for NAND on am335x-evm
      
      - Fix wrong pinctrl defines for dra7xx
      
      - Update maintainers entries for PMICs and SoCs
      
      * tag 'omap-fixes-against-v3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        pinctrl: dra: dt-bindings: Fix output pull up/down
        MAINTAINERS: Update entry for omap related .dts files to cover new SoCs
        MAINTAINERS: add more files under OMAP SUPPORT
        ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage
        ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
        ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
        ARM: dts: am335x-evm: Fix 5th NAND partition's name
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      f7efdad0
    • Olof Johansson's avatar
      Merge tag 'mvebu-fixes-3.18' of git://git.infradead.org/linux-mvebu into fixes · ae8f5041
      Olof Johansson authored
      Merge "mvebu fixes for v3.18" from Jason Cooper:
      
       - Armada XP
          - Generalize i2c quirk
      
       - orion
          - Fix irq storm caused by specific sequence of request_irq
      
      * tag 'mvebu-fixes-3.18' of git://git.infradead.org/linux-mvebu:
        ARM: orion: Fix for certain sequence of request_irq can cause irq storm
        ARM: mvebu: armada xp: Generalize use of i2c quirk
      ae8f5041
    • NeilBrown's avatar
      md: Always set RECOVERY_NEEDED when clearing RECOVERY_FROZEN · 45eaf45d
      NeilBrown authored
      md_check_recovery will skip any recovery and also clear
      MD_RECOVERY_NEEDED if MD_RECOVERY_FROZEN is set.
      So when we clear _FROZEN, we must set _NEEDED and ensure that
      md_check_recovery gets run.
      Otherwise we could miss out on something that is needed.
      
      In particular, this can make it impossible to remove a
      failed device from an array is the  'recovery-needed' processing
      didn't happen.
      Suitable for stable kernels since 3.13.
      
      Cc: stable@vger.kernel.org (3.13+)
      Reported-and-tested-by: default avatarJoe Lawrence <joe.lawrence@stratus.com>
      Fixes: 30b8feb7Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      45eaf45d
    • David S. Miller's avatar
      sparc64: Fix constraints on swab helpers. · 5a2b59d3
      David S. Miller authored
      We are reading the memory location, so we have to have a memory
      constraint in there purely for the sake of showing the data flow
      to the compiler.
      Reported-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a2b59d3
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · dec943f5
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of six fixes and a MAINTAINER update.
      
        The fixes are two multipath (one in Test Unit Ready handling for the
        path checkers and one in the section of code that sends a start unit
        after failover; both of these were perturbed by the scsi-mq update), a
        CD-ROM door locking fix that was likewise introduced by scsi-mq and
        three driver fixes for a previous code update in cxgb4i, megaraid_sas
        and bnx2fc"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        bnx2fc: fix tgt spinlock locking
        megaraid_sas: fix bug in handling return value of pci_enable_msix_range()
        cxgb4i: send abort_rpl correctly
        cxgbi: add maintainer for cxgb3i/cxgb4i
        scsi: TUR path is down after adapter gets reset with multipath
        scsi: call device handler for failed TUR command
        scsi: only re-lock door after EH on devices that were reset
      dec943f5
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de55bbbf
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Microcode fixes, a Xen fix and a KASLR boot loading fix with certain
        memory layouts"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, microcode, AMD: Fix ucode patch stashing on 32-bit
        x86/core, x86/xen/smp: Use 'die_complete' completion when taking CPU down
        x86, microcode: Fix accessing dis_ucode_ldr on 32-bit
        x86, kaslr: Prevent .bss from overlaping initrd
        x86, microcode, AMD: Fix early ucode loading on 32-bit
      de55bbbf
    • Linus Torvalds's avatar
      x86-64: make csum_partial_copy_from_user() error handling consistent · 3b91270a
      Linus Torvalds authored
      Al Viro pointed out that the x86-64 csum_partial_copy_from_user() is
      somewhat confused about what it should do on errors, notably it mostly
      clears the uncopied end result buffer, but misses that for the initial
      alignment case.
      
      All users should check for errors, so it's dubious whether the clearing
      is even necessary, and Al also points out that we should probably clean
      up the calling conventions, but regardless of any future changes to this
      function, the fact that it is inconsistent is just annoying.
      
      So make the __get_user() failure path use the same error exit as all the
      other errors do.
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: David Miller <davem@davemloft.net>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b91270a
    • Dave Hansen's avatar
      x86: Require exact match for 'noxsave' command line option · 2cd3949f
      Dave Hansen authored
      We have some very similarly named command-line options:
      
      arch/x86/kernel/cpu/common.c:__setup("noxsave", x86_xsave_setup);
      arch/x86/kernel/cpu/common.c:__setup("noxsaveopt", x86_xsaveopt_setup);
      arch/x86/kernel/cpu/common.c:__setup("noxsaves", x86_xsaves_setup);
      
      __setup() is designed to match options that take arguments, like
      "foo=bar" where you would have:
      
      	__setup("foo", x86_foo_func...);
      
      The problem is that "noxsave" actually _matches_ "noxsaves" in
      the same way that "foo" matches "foo=bar".  If you boot an old
      kernel that does not know about "noxsaves" with "noxsaves" on the
      command line, it will interpret the argument as "noxsave", which
      is not what you want at all.
      
      This makes the "noxsave" handler only return success when it finds
      an *exact* match.
      
      [ tglx: We really need to make __setup() more robust. ]
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: x86@kernel.org
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/20141111220133.FE053984@viggo.jf.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2cd3949f
    • Stanislaw Gruszka's avatar
      sched/cputime: Fix clock_nanosleep()/clock_gettime() inconsistency · 6e998916
      Stanislaw Gruszka authored
      Commit d670ec13 "posix-cpu-timers: Cure SMP wobbles" fixes one glibc
      test case in cost of breaking another one. After that commit, calling
      clock_nanosleep(TIMER_ABSTIME, X) and then clock_gettime(&Y) can result
      of Y time being smaller than X time.
      
      Reproducer/tester can be found further below, it can be compiled and ran by:
      
      	gcc -o tst-cpuclock2 tst-cpuclock2.c -pthread
      	while ./tst-cpuclock2 ; do : ; done
      
      This reproducer, when running on a buggy kernel, will complain
      about "clock_gettime difference too small".
      
      Issue happens because on start in thread_group_cputimer() we initialize
      sum_exec_runtime of cputimer with threads runtime not yet accounted and
      then add the threads runtime to running cputimer again on scheduler
      tick, making it's sum_exec_runtime bigger than actual threads runtime.
      
      KOSAKI Motohiro posted a fix for this problem, but that patch was never
      applied: https://lkml.org/lkml/2013/5/26/191 .
      
      This patch takes different approach to cure the problem. It calls
      update_curr() when cputimer starts, that assure we will have updated
      stats of running threads and on the next schedule tick we will account
      only the runtime that elapsed from cputimer start. That also assure we
      have consistent state between cpu times of individual threads and cpu
      time of the process consisted by those threads.
      
      Full reproducer (tst-cpuclock2.c):
      
      	#define _GNU_SOURCE
      	#include <unistd.h>
      	#include <sys/syscall.h>
      	#include <stdio.h>
      	#include <time.h>
      	#include <pthread.h>
      	#include <stdint.h>
      	#include <inttypes.h>
      
      	/* Parameters for the Linux kernel ABI for CPU clocks.  */
      	#define CPUCLOCK_SCHED          2
      	#define MAKE_PROCESS_CPUCLOCK(pid, clock) \
      		((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
      
      	static pthread_barrier_t barrier;
      
      	/* Help advance the clock.  */
      	static void *chew_cpu(void *arg)
      	{
      		pthread_barrier_wait(&barrier);
      		while (1) ;
      
      		return NULL;
      	}
      
      	/* Don't use the glibc wrapper.  */
      	static int do_nanosleep(int flags, const struct timespec *req)
      	{
      		clockid_t clock_id = MAKE_PROCESS_CPUCLOCK(0, CPUCLOCK_SCHED);
      
      		return syscall(SYS_clock_nanosleep, clock_id, flags, req, NULL);
      	}
      
      	static int64_t tsdiff(const struct timespec *before, const struct timespec *after)
      	{
      		int64_t before_i = before->tv_sec * 1000000000ULL + before->tv_nsec;
      		int64_t after_i = after->tv_sec * 1000000000ULL + after->tv_nsec;
      
      		return after_i - before_i;
      	}
      
      	int main(void)
      	{
      		int result = 0;
      		pthread_t th;
      
      		pthread_barrier_init(&barrier, NULL, 2);
      
      		if (pthread_create(&th, NULL, chew_cpu, NULL) != 0) {
      			perror("pthread_create");
      			return 1;
      		}
      
      		pthread_barrier_wait(&barrier);
      
      		/* The test.  */
      		struct timespec before, after, sleeptimeabs;
      		int64_t sleepdiff, diffabs;
      		const struct timespec sleeptime = {.tv_sec = 0,.tv_nsec = 100000000 };
      
      		/* The relative nanosleep.  Not sure why this is needed, but its presence
      		   seems to make it easier to reproduce the problem.  */
      		if (do_nanosleep(0, &sleeptime) != 0) {
      			perror("clock_nanosleep");
      			return 1;
      		}
      
      		/* Get the current time.  */
      		if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &before) < 0) {
      			perror("clock_gettime[2]");
      			return 1;
      		}
      
      		/* Compute the absolute sleep time based on the current time.  */
      		uint64_t nsec = before.tv_nsec + sleeptime.tv_nsec;
      		sleeptimeabs.tv_sec = before.tv_sec + nsec / 1000000000;
      		sleeptimeabs.tv_nsec = nsec % 1000000000;
      
      		/* Sleep for the computed time.  */
      		if (do_nanosleep(TIMER_ABSTIME, &sleeptimeabs) != 0) {
      			perror("absolute clock_nanosleep");
      			return 1;
      		}
      
      		/* Get the time after the sleep.  */
      		if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &after) < 0) {
      			perror("clock_gettime[3]");
      			return 1;
      		}
      
      		/* The time after sleep should always be equal to or after the absolute sleep
      		   time passed to clock_nanosleep.  */
      		sleepdiff = tsdiff(&sleeptimeabs, &after);
      		if (sleepdiff < 0) {
      			printf("absolute clock_nanosleep woke too early: %" PRId64 "\n", sleepdiff);
      			result = 1;
      
      			printf("Before %llu.%09llu\n", before.tv_sec, before.tv_nsec);
      			printf("After  %llu.%09llu\n", after.tv_sec, after.tv_nsec);
      			printf("Sleep  %llu.%09llu\n", sleeptimeabs.tv_sec, sleeptimeabs.tv_nsec);
      		}
      
      		/* The difference between the timestamps taken before and after the
      		   clock_nanosleep call should be equal to or more than the duration of the
      		   sleep.  */
      		diffabs = tsdiff(&before, &after);
      		if (diffabs < sleeptime.tv_nsec) {
      			printf("clock_gettime difference too small: %" PRId64 "\n", diffabs);
      			result = 1;
      		}
      
      		pthread_cancel(th);
      
      		return result;
      	}
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20141112155843.GA24803@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6e998916