1. 31 Jul, 2014 1 commit
    • Linus Torvalds's avatar
      Fix gcc-4.9.0 miscompilation of load_balance() in scheduler · c0e67945
      Linus Torvalds authored
      commit 2062afb4 upstream.
      
      Michel Dänzer and a couple of other people reported inexplicable random
      oopses in the scheduler, and the cause turns out to be gcc mis-compiling
      the load_balance() function when debugging is enabled.  The gcc bug
      apparently goes back to gcc-4.5, but slight optimization changes means
      that it now showed up as a problem in 4.9.0 and 4.9.1.
      
      The instruction scheduling problem causes gcc to schedule a spill
      operation to before the stack frame has been created, which in turn can
      corrupt the spilled value if an interrupt comes in.  There may be other
      effects of this bug too, but that's the code generation problem seen in
      Michel's case.
      
      This is fixed in current gcc HEAD, but the workaround as suggested by
      Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
      when compiling the kernel, which disables the gcc code that causes the
      problem.  This can result in slightly worse debug information for
      variable accesses, but that is infinitely preferable to actual code
      generation problems.
      
      Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
      non-debug builds to verify that the debug build would be identical: we
      can do
      
          export GCC_COMPARE_DEBUG=1
      
      to make gcc internally verify that the result of the build is
      independent of the "-g" flag (it will make the compiler build everything
      twice, toggling the debug flag, and compare the results).
      
      Without the "-fno-var-tracking-assignments" option, the build would fail
      (even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
      compare failure.
      
      See also gcc bugzilla:
      
        https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
      
      Reported-by: default avatarMichel Dänzer <michel@daenzer.net>
      Suggested-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c0e67945
  2. 28 Jul, 2014 1 commit
  3. 17 Jul, 2014 1 commit
  4. 09 Jul, 2014 1 commit
  5. 07 Jul, 2014 1 commit
  6. 01 Jul, 2014 1 commit
  7. 26 Jun, 2014 1 commit
  8. 16 Jun, 2014 1 commit
  9. 08 Jun, 2014 1 commit
  10. 02 Jun, 2014 1 commit
  11. 25 May, 2014 1 commit
  12. 21 May, 2014 1 commit
  13. 09 May, 2014 1 commit
  14. 05 May, 2014 1 commit
  15. 28 Apr, 2014 1 commit
  16. 20 Apr, 2014 1 commit
  17. 13 Apr, 2014 1 commit
  18. 09 Apr, 2014 1 commit
  19. 08 Apr, 2014 1 commit
    • Jason Cooper's avatar
      scripts: objdiff: detect object code changes between two commits · 79192ca8
      Jason Cooper authored
      
      objdiff is useful when doing large code cleanups.  For example, when
      removing checkpatch warnings and errors from new drivers in the staging
      tree.
      
      objdiff can be used in conjunction with a git rebase to confirm that
      each commit made no changes to the resulting object code.  It has the
      same return values as diff(1).
      
      This was written specifically to support adding the skein and threefish
      cryto drivers to the staging tree.  I needed a programmatic way to
      confirm that commits changing >90% of the lines didn't inadvertently
      change the code.
      
      Temporary files (objdump output) are stored in
      
        /path/to/linux/.tmp_objdiff
      
      'make mrproper' will remove this directory.
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      79192ca8
  20. 31 Mar, 2014 3 commits
  21. 29 Mar, 2014 1 commit
    • Paul Gortmaker's avatar
      kbuild: unconditionally clobber include/linux/version.h on distclean · 9c8cdb71
      Paul Gortmaker authored
      
      As of v3.7, the UAPI changes relocated headers around such that the
      kernel version header lived in a new place.
      
      If a person is bisecting and if you go back to pre-UAPI days,
      you will create an include/linux/version.h  -- then if you checkout a
      post-UAPI kernel, and even run "make distclean" it still won't delete
      that old version file.  So you get a situation like this:
      
      $ grep -R LINUX_VERSION_CODE include/
      include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
      include/linux/version.h:#define LINUX_VERSION_CODE 132646
      
      The value in that second line is representative of a v2.6.38 version.
      And it will be sourced/used, hence leading to strange behaviours, such
      as drivers/staging content (which typically hasn't been purged of version
      ifdefs) failing to build.
      
      Since it is a subtle mode of failure, lets always clobber the old
      file when doing a distclean.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      9c8cdb71
  22. 25 Mar, 2014 1 commit
  23. 17 Mar, 2014 1 commit
  24. 10 Mar, 2014 1 commit
  25. 03 Mar, 2014 1 commit
  26. 25 Feb, 2014 2 commits
  27. 24 Feb, 2014 1 commit
  28. 20 Feb, 2014 1 commit
    • Jason Cooper's avatar
      kbuild: dtbs_install: new make target · f4d4ffc0
      Jason Cooper authored
      
      Unlike other build products in the Linux kernel, there is no 'make
      *install' mechanism to put devicetree blobs in a standard place.
      
      This commit adds a new 'dtbs_install' make target which copies all of
      the dtbs into the INSTALL_DTBS_PATH directory. INSTALL_DTBS_PATH can be
      set before calling make to change the default install directory. If not
      set then it defaults to:
      
      	$INSTALL_PATH/dtbs/$KERNELRELEASE.
      
      This is done to keep dtbs from different kernel versions separate until
      things have settled down.  Once the dtbs are stable, and not so strongly
      linked to the kernel version, the devicetree files will most likely move
      to their own repo.  Users will need to upgrade install scripts at that
      time.
      
      v7: (reworked by Grant Likely)
      - Moved rules from arch/arm/Makefile to arch/arm/boot/dts/Makefile so
        that each dtb install could have a separate target and be reported as
        part of the make output.
      - Fixed dependency problem to ensure $KERNELRELEASE is calculated before
        attempting to install
      - Removed option to call external script. Copying the files should be
        sufficient and a build system can post-process the install directory.
        Despite the fact an external script is used for installing the kernel,
        I don't think that is a pattern that should be encouraged. I would
        rather see buildroot type tools post process the install directory to
        rename or move dtb files after installing to a staging directory.
        - Plus it is easy to add a hook after the fact without blocking the
          rest of this feature.
      - Move the helper targets into scripts/Makefile.lib with the rest of the
        common dtb rules
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Rob Herring <robh+dt@kernel.org>
      f4d4ffc0
  29. 16 Feb, 2014 1 commit
  30. 10 Feb, 2014 1 commit
  31. 06 Feb, 2014 1 commit
    • Prarit Bhargava's avatar
      scripts/tags.sh: Ignore *.mod.c · ae63b2d7
      Prarit Bhargava authored
      
      CONFIG_MODVERSIONS=y results in a .mod.c for every compiled file in the
      kernel. Issuing a 'make cscope' on a compiled kernel tree results in
      the cscope files containing *.mod.c files.
      
      [prarit@prarit linux]# make cscope
      [prarit@prarit linux]# cat cscope.files | grep mod.c | wc -l
      4807
      
      These files are not useful for cscope and should be ignored. For example,
      
         #   line  filename / context / line
         1    105  arch/x86/kvm/kvm-intel.mod.c <<GLOBAL>>
                   { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
         2    508  drivers/block/mtip32xx/mtip32xx.h <<GLOBAL>>
                   int numa_node;
         3     55  drivers/block/mtip32xx/mtip32xx.mod.c <<GLOBAL>>
                   { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
         4     37  drivers/cpufreq/acpi-cpufreq.mod.c <<GLOBAL>>
                   { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
         <snip>
      
      Add an export to RCS_FIND_IGNORE so it can be used in scripts/tags.sh
      and add explicitly ignore *.mod.c files.
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kirill Tkhai <tkhai@yandex.ru>
      Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      ae63b2d7
  32. 03 Feb, 2014 1 commit
  33. 27 Jan, 2014 2 commits
    • Josh Triplett's avatar
      Makefile: Build with -Werror=date-time if the compiler supports it · fe7c36c7
      Josh Triplett authored
      
      GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use
      of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build
      non-deterministic.  Now that the kernel does not use any of those
      macros, turn on -Werror=date-time if available, to keep it that way.
      
      The kernel already (optionally) records this information at build time
      in a single place; other kernel code should not duplicate that.
      Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      fe7c36c7
    • Geoff Levand's avatar
      kbuild: Fix debugging info generation for .S files · 7db43632
      Geoff Levand authored
      
      Change the debuging info generation flag in KBUILD_AFLAGS from '-gdwarf-2' to
      '-Wa,--gdwarf-2'.  This will properly generate the debugging info for .S files
      when CONFIG_DEBUG_INFO=y.
      
      It seems current gcc does not pass a '--gdwarf-2' option on to the assembler
      when '-gdwarf-2' is on its command line (note the differece in the gcc and as
      flags).  This change provides the correct assembler flag to gcc, and so does
      not rely on gcc to emit a flag for the assembler.
      
      Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      7db43632
  34. 20 Jan, 2014 1 commit
  35. 12 Jan, 2014 1 commit
  36. 06 Jan, 2014 1 commit
    • Emil Medve's avatar
      kbuild: Fix silent builds with make-4 · e36aaea2
      Emil Medve authored
      
      make-4 changed the way/order it presents the command line options
      into MAKEFLAGS
      
      In make-3.8x, '-s' would always be first into a group of options
      with the '-'/hyphen removed
      
      $ make -p -s 2>/dev/null | grep ^MAKEFLAGS
      MAKEFLAGS = sp
      
      In make-4, '-s' seems to always be last into a group of options
      with the '-'/hyphen removed
      
      $ make -s -p 2>/dev/null | grep ^MAKEFLAGS
      MAKEFLAGS = ps
      Signed-off-by: default avatarEmil Medve <Emilian.Medve@Freescale.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      e36aaea2