1. 14 Feb, 2017 5 commits
    • Michael Ellerman's avatar
      selftests/powerpc: Fix remaining fallout from recent changes · 68bd42d9
      Michael Ellerman authored
      In benchmarks we need to use $(TEST_GEN_PROGS) after we include lib.mk,
      because lib.mk does the substitution to add $(OUTPUT).
      
      In math the vmx and fpu names were typoed so they no longer matched
      correctly, put back the 'v' and 'f'.
      
      In tm we need to substitute $(OUTPUT) into SIGNAL_CONTEXT_CHK_TESTS so
      that the rule matches.
      
      In pmu there is an extraneous ':' on the end of $$BUILD_TARGET for the
      clean and install rules, which breaks the logic in the child Makefiles.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      68bd42d9
    • Michael Ellerman's avatar
      selftests/powerpc: Fix the clean rule since recent changes · 2e8ec87d
      Michael Ellerman authored
      The clean rule is broken for the powerpc tests:
      
        make[1]: Entering directory 'tools/testing/selftests/powerpc'
        Makefile:63: warning: overriding recipe for target 'clean'
        ../lib.mk:51: warning: ignoring old recipe for target 'clean'
        /bin/sh: 3: Syntax error: end of file unexpected (expecting "done")
        Makefile:63: recipe for target 'clean' failed
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      2e8ec87d
    • Michael Ellerman's avatar
      selftests: Fix the .S and .S -> .o rules · 634ce97c
      Michael Ellerman authored
      Both these rules incorrectly use $< (first prerequisite) rather than
      $^ (all prerequisites), meaning they don't work if we're using more than
      one .S file as input. Switch them to using $^.
      
      They also don't include $(CPPFLAGS) and other variables used in the
      default rules, which breaks targets that require those. Fix that by
      using the builtin $(COMPILE.S) and $(LINK.S) rules.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      634ce97c
    • Michael Ellerman's avatar
      selftests: Fix the .c linking rule · 2047f1d8
      Michael Ellerman authored
      Currently we can't build some tests, for example:
      
        $ make -C tools/testing/selftests/ TARGETS=vm
        ...
        gcc -Wall -I ../../../../usr/include   -lrt -lpthread ../../../../usr/include/linux/kernel.h userfaultfd.c -o tools/testing/selftests/vm/userfaultfd
        /tmp/ccmOkQSM.o: In function `stress':
        userfaultfd.c:(.text+0xc60): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xca5): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xcee): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xd30): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xd77): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xe7d): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xe9f): undefined reference to `pthread_cancel'
        userfaultfd.c:(.text+0xec6): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xf14): undefined reference to `pthread_join'
        /tmp/ccmOkQSM.o: In function `userfaultfd_stress':
        userfaultfd.c:(.text+0x13e2): undefined reference to `pthread_attr_setstacksize'
        collect2: error: ld returned 1 exit status
      
      This is because the rule for linking .c files to binaries is incorrect.
      
      The first bug is that it uses $< (first prerequisite) instead of $^ (all
      preqrequisites), fix it by using ^$.
      
      Secondly the ordering of the prerequisites vs $(LDLIBS) is wrong,
      meaning on toolchains that use --as-needed we fail to link (as above).
      Fix that by placing $(LDLIBS) *after* ^$.
      
      Finally switch to using the default rule $(LINK.c), so that we get
      $(CPPFLAGS) etc. included.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      2047f1d8
    • Michael Ellerman's avatar
      selftests: Fix selftests build to just build, not run tests · d83c3ba0
      Michael Ellerman authored
      In commit 88baa78d ("selftests: remove duplicated all and clean
      target"), the "all" target was removed from individual Makefiles and
      added to lib.mk.
      
      However the "all" target was added to lib.mk *after* the existing
      "runtests" target. This means "runtests" becomes the first (default)
      target for most of our Makefiles.
      
      This has the effect of causing a plain "make" to build *and run* the
      tests. Which is at best rude, but depending on which tests are run could
      oops someone's build machine.
      
        $ make -C tools/testing/selftests/
        ...
        make[1]: Entering directory 'tools/testing/selftests/bpf'
        gcc -Wall -O2 -I../../../../usr/include   test_verifier.c -o tools/testing/selftests/bpf/test_verifier
        gcc -Wall -O2 -I../../../../usr/include   test_maps.c -o tools/testing/selftests/bpf/test_maps
        gcc -Wall -O2 -I../../../../usr/include   test_lru_map.c -o tools/testing/selftests/bpf/test_lru_map
        #0 add+sub+mul FAIL
        Failed to load prog 'Function not implemented'!
        #1 unreachable FAIL
        Unexpected error message!
        #2 unreachable2 FAIL
        ...
      
      Fix it by moving the "all" target to the start of lib.mk, making it the
      default target.
      
      Fixes: 88baa78d ("selftests: remove duplicated all and clean target")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      d83c3ba0
  2. 08 Feb, 2017 3 commits
  3. 19 Jan, 2017 10 commits
  4. 11 Jan, 2017 4 commits
  5. 05 Jan, 2017 6 commits
  6. 26 Dec, 2016 2 commits
    • Linus Torvalds's avatar
      Linux 4.10-rc1 · 7ce7d89f
      Linus Torvalds authored
      7ce7d89f
    • Larry Finger's avatar
      powerpc: Fix build warning on 32-bit PPC · 8ae679c4
      Larry Finger authored
      I am getting the following warning when I build kernel 4.9-git on my
      PowerBook G4 with a 32-bit PPC processor:
      
          AS      arch/powerpc/kernel/misc_32.o
        arch/powerpc/kernel/misc_32.S:299:7: warning: "CONFIG_FSL_BOOKE" is not defined [-Wundef]
      
      This problem is evident after commit 989cea5c ("kbuild: prevent
      lib-ksyms.o rebuilds"); however, this change in kbuild only exposes an
      error that has been in the code since 2005 when this source file was
      created.  That was with commit 9994a338 ("powerpc: Introduce
      entry_{32,64}.S, misc_{32,64}.S, systbl.S").
      
      The offending line does not make a lot of sense.  This error does not
      seem to cause any errors in the executable, thus I am not recommending
      that it be applied to any stable versions.
      
      Thanks to Nicholas Piggin for suggesting this solution.
      
      Fixes: 9994a338 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S")
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8ae679c4
  7. 25 Dec, 2016 10 commits
    • Linus Torvalds's avatar
      avoid spurious "may be used uninitialized" warning · d33d5a6c
      Linus Torvalds authored
      The timer type simplifications caused a new gcc warning:
      
        drivers/base/power/domain.c: In function ‘genpd_runtime_suspend’:
        drivers/base/power/domain.c:562:14: warning: ‘time_start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start));
      
      despite the actual use of "time_start" not having changed in any way.
      It appears that simply changing the type of ktime_t from a union to a
      plain scalar type made gcc check the use.
      
      The variable wasn't actually used uninitialized, but gcc apparently
      failed to notice that the conditional around the use was exactly the
      same as the conditional around the initialization of that variable.
      
      Add an unnecessary initialization just to shut up the compiler.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d33d5a6c
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ddc76df
      Linus Torvalds authored
      Pull timer type cleanups from Thomas Gleixner:
       "This series does a tree wide cleanup of types related to
        timers/timekeeping.
      
         - Get rid of cycles_t and use a plain u64. The type is not really
           helpful and caused more confusion than clarity
      
         - Get rid of the ktime union. The union has become useless as we use
           the scalar nanoseconds storage unconditionally now. The 32bit
           timespec alike storage got removed due to the Y2038 limitations
           some time ago.
      
           That leaves the odd union access around for no reason. Clean it up.
      
        Both changes have been done with coccinelle and a small amount of
        manual mopping up"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        ktime: Get rid of ktime_equal()
        ktime: Cleanup ktime_set() usage
        ktime: Get rid of the union
        clocksource: Use a plain u64 instead of cycle_t
      3ddc76df
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b272f732
      Linus Torvalds authored
      Pull SMP hotplug notifier removal from Thomas Gleixner:
       "This is the final cleanup of the hotplug notifier infrastructure. The
        series has been reintgrated in the last two days because there came a
        new driver using the old infrastructure via the SCSI tree.
      
        Summary:
      
         - convert the last leftover drivers utilizing notifiers
      
         - fixup for a completely broken hotplug user
      
         - prevent setup of already used states
      
         - removal of the notifiers
      
         - treewide cleanup of hotplug state names
      
         - consolidation of state space
      
        There is a sphinx based documentation pending, but that needs review
        from the documentation folks"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/armada-xp: Consolidate hotplug state space
        irqchip/gic: Consolidate hotplug state space
        coresight/etm3/4x: Consolidate hotplug state space
        cpu/hotplug: Cleanup state names
        cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions
        staging/lustre/libcfs: Convert to hotplug state machine
        scsi/bnx2i: Convert to hotplug state machine
        scsi/bnx2fc: Convert to hotplug state machine
        cpu/hotplug: Prevent overwriting of callbacks
        x86/msr: Remove bogus cleanup from the error path
        bus: arm-ccn: Prevent hotplug callback leak
        perf/x86/intel/cstate: Prevent hotplug callback leak
        ARM/imx/mmcd: Fix broken cpu hotplug handling
        scsi: qedi: Convert to hotplug state machine
      b272f732
    • Linus Torvalds's avatar
      Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · 10bbe759
      Linus Torvalds authored
      Pull turbostat updates from Len Brown.
      
      * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: remove obsolete -M, -m, -C, -c options
        tools/power turbostat: Make extensible via the --add parameter
        tools/power turbostat: Denverton uses a 25 MHz crystal, not 19.2 MHz
        tools/power turbostat: line up headers when -M is used
        tools/power turbostat: fix SKX PKG_CSTATE_LIMIT decoding
        tools/power turbostat: Support Knights Mill (KNM)
        tools/power turbostat: Display HWP OOB status
        tools/power turbostat: fix Denverton BCLK
        tools/power turbostat: use intel-family.h model strings
        tools/power/turbostat: Add Denverton RAPL support
        tools/power/turbostat: Add Denverton support
        tools/power/turbostat: split core MSR support into status + limit
        tools/power turbostat: fix error case overflow read of slm_freq_table[]
        tools/power turbostat: Allocate correct amount of fd and irq entries
        tools/power turbostat: switch to tab delimited output
        tools/power turbostat: Gracefully handle ACPI S3
        tools/power turbostat: tidy up output on Joule counter overflow
      10bbe759
    • Nicholas Piggin's avatar
      mm: add PageWaiters indicating tasks are waiting for a page bit · 62906027
      Nicholas Piggin authored
      Add a new page flag, PageWaiters, to indicate the page waitqueue has
      tasks waiting. This can be tested rather than testing waitqueue_active
      which requires another cacheline load.
      
      This bit is always set when the page has tasks on page_waitqueue(page),
      and is set and cleared under the waitqueue lock. It may be set when
      there are no tasks on the waitqueue, which will cause a harmless extra
      wakeup check that will clears the bit.
      
      The generic bit-waitqueue infrastructure is no longer used for pages.
      Instead, waitqueues are used directly with a custom key type. The
      generic code was not flexible enough to have PageWaiters manipulation
      under the waitqueue lock (which simplifies concurrency).
      
      This improves the performance of page lock intensive microbenchmarks by
      2-3%.
      
      Putting two bits in the same word opens the opportunity to remove the
      memory barrier between clearing the lock bit and testing the waiters
      bit, after some work on the arch primitives (e.g., ensuring memory
      operand widths match and cover both bits).
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Bob Peterson <rpeterso@redhat.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Lutomirski <luto@kernel.org>
      Cc: Andreas Gruenbacher <agruenba@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      62906027
    • Nicholas Piggin's avatar
      mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked · 6326fec1
      Nicholas Piggin authored
      A page is not added to the swap cache without being swap backed,
      so PageSwapBacked mappings can use PG_owner_priv_1 for PageSwapCache.
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Bob Peterson <rpeterso@redhat.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Lutomirski <luto@kernel.org>
      Cc: Andreas Gruenbacher <agruenba@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6326fec1
    • Thomas Gleixner's avatar
      ktime: Get rid of ktime_equal() · 1f3a8e49
      Thomas Gleixner authored
      No point in going through loops and hoops instead of just comparing the
      values.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      1f3a8e49
    • Thomas Gleixner's avatar
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner authored
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
    • Thomas Gleixner's avatar
      ktime: Get rid of the union · 2456e855
      Thomas Gleixner authored
      ktime is a union because the initial implementation stored the time in
      scalar nanoseconds on 64 bit machine and in a endianess optimized timespec
      variant for 32bit machines. The Y2038 cleanup removed the timespec variant
      and switched everything to scalar nanoseconds. The union remained, but
      become completely pointless.
      
      Get rid of the union and just keep ktime_t as simple typedef of type s64.
      
      The conversion was done with coccinelle and some manual mopping up.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      2456e855
    • Thomas Gleixner's avatar
      clocksource: Use a plain u64 instead of cycle_t · a5a1d1c2
      Thomas Gleixner authored
      There is no point in having an extra type for extra confusion. u64 is
      unambiguous.
      
      Conversion was done with the following coccinelle script:
      
      @rem@
      @@
      -typedef u64 cycle_t;
      
      @fix@
      typedef cycle_t;
      @@
      -cycle_t
      +u64
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: John Stultz <john.stultz@linaro.org>
      a5a1d1c2