1. 15 Mar, 2016 1 commit
    • Daniel Wagner's avatar
      kbuild: Add option to turn incompatible pointer check into error · ea8daa7b
      Daniel Wagner authored
      With the introduction of the simple wait API we have two very
      similar APIs in the kernel. For example wake_up() and swake_up()
      is only one character away. Although the compiler will warn
      happily the wrong usage it keeps on going an even links the kernel.
      Thomas and Peter would rather like to see early missuses reported
      as error early on.
      
      In a first attempt we tried to wrap all swait and wait calls
      into a macro which has an compile time type assertion. The result
      was pretty ugly and wasn't able to catch all wrong usages.
      woken_wake_function(), autoremove_wake_function() and wake_bit_function()
      are assigned as function pointers. Wrapping them with a macro around is
      not possible. Prefixing them with '_' was also not a real option
      because there some users in the kernel which do use them as well.
      All in all this attempt looked to intrusive and too ugly.
      
      An alternative is to turn the pointer type check into an error which
      catches wrong type uses. Obviously not only the swait/wait ones. That
      isn't a bad thing either.
      Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      ea8daa7b
  2. 04 Mar, 2016 1 commit
    • Masahiro Yamada's avatar
      kbuild: suppress annoying "... is up to date." message · 2aedcd09
      Masahiro Yamada authored
      Under certain conditions, Kbuild shows "... is up to date" where
      if_changed or friends are used.
      
      For example, the incremental build of ARM64 Linux shows this message
      when the kernel image has not been updated.
      
        $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
          CHK     include/config/kernel.release
          CHK     include/generated/uapi/linux/version.h
          CHK     include/generated/utsrelease.h
          CHK     include/generated/bounds.h
          CHK     include/generated/timeconst.h
          CHK     include/generated/asm-offsets.h
          CALL    scripts/checksyscalls.sh
          CHK     include/generated/compile.h
          CHK     kernel/config_data.h
        make[1]: `arch/arm64/boot/Image.gz' is up to date.
          Building modules, stage 2.
          MODPOST 0 modules
      
      The following is the build rule in arch/arm64/boot/Makefile:
      
        $(obj)/Image.gz: $(obj)/Image FORCE
                $(call if_changed,gzip)
      
      If the Image.gz is newer than the Image and the command line has not
      changed (i.e., $(any-prereq) and $(arg-check) are both empty), the
      build rule $(call if_changed,gzip) is evaluated to be empty, then
      GNU Make reports the target is up to date.  In order to make GNU Make
      quiet, we need to give it something to do, for example, "@:".  This
      should be fixed in the Kbuild core part rather than in each Makefile.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      2aedcd09
  3. 17 Feb, 2016 1 commit
  4. 08 Feb, 2016 2 commits
    • Ard Biesheuvel's avatar
      scripts/link-vmlinux.sh: force error on kallsyms failure · a0439342
      Ard Biesheuvel authored
      Since the output of the invocation of scripts/kallsyms is piped directly
      into the assembler, error messages it emits are visible on stderr, but
      a non-zero return code is ignored, and the build simply proceeds in that
      case. However, the resulting kernel is most likely broken, and will crash
      at boot.
      
      So instead, capture the output of kallsyms in a separate .S file, and pass
      that to the assembler in a separate step.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      a0439342
    • Arnd Bergmann's avatar
      Kbuild: provide a __UNIQUE_ID for clang · b41c29b0
      Arnd Bergmann authored
      The default __UNIQUE_ID macro in compiler.h fails to work for some drivers:
      
      drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:615:1: error: redefinition of
            '__UNIQUE_ID_firmware615'
      BRCMF_FW_NVRAM_DEF(4354, "brcmfmac4354-sdio.bin", "brcmfmac4354-sdio.txt");
      
      This adds a copy of the version we use for gcc-4.3 and higher, as the same
      one works with all versions of clang that I could find in svn (2.6 and higher).
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      b41c29b0
  5. 28 Jan, 2016 1 commit
    • Russell King's avatar
      dtbsinstall: don't move target directory out of the way · 5399eb9b
      Russell King authored
      No other kernel installation target moves the target directory out of
      the way, even deleting an old version of it.  These are destructive
      operations, ones which the kernel build system should not be making.
      
      This behaviour prevents being able to do:
      
      	make install INSTALL_PATH=/some/path/boot
      	make dtbs_install INSTALL_DTBS_PATH=/some/path/boot
      
      As it causes the boot directory containing the kernel installed in
      step 1 to be moved to /some/path/boot.old.  Things get even more fun
      if you do:
      
      	make install dtbs_install INSTALL_PATH=/some/path/boot INSTALL_DTBS_PATH=/some/path/boot
      
      The kernel gets installed into /some/path/boot, then the directory gets
      renamed to /some/path/boot.old, and a new directory created to hold the
      dtbs.  Even more fun if you supply -j2 when we end up with races in
      make.
      
      Remove this behaviour.
      
      If this behaviour is required at installation time, this should be
      done by the installation external to the kernel makefiles, just like
      it would be done for 'make modules_install'.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      5399eb9b
  6. 24 Jan, 2016 34 commits