Skip to content
  1. Mar 29, 2014
  2. Jul 09, 2013
  3. Jul 03, 2013
    • 张忠山's avatar
      kbuild: create directory for dir/file.o · 4d47dde4
      张忠山 authored
      
      
      When add a obj with dir to obj-y, like this
      
          obj-y += dir/file.o
      
      The $(obj)/dir not created, this patch fix this.
      
      When try to add a file(which in a subdir) to my board's obj-y, the build
      progress crashed.
      
      For example, I use at91rm9200ek board, and in kernel dir run:
      
        mkdir objtree
        make O=objtree at91rm9200_defconfig
        mkdir arch/arm/mach-at91/dir
        touch arch/arm/mach-at91/dir/file.c
      
      and edit arch/arm/mach-at91/dir/file.c to add some code.
      then edit arch/arm/mach-at91/Makefile, change the following line:
      
        obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o
      
      to:
      
        obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o
      
      Now build it:
      
        make O=objtree
      
      Then the error appears:
        ...
        CC      arch/arm/mach-at91/board-rm9200dk.o
        CC      arch/arm/mach-at91/board-rm9200ek.o
        CC      arch/arm/mach-at91/dir/file.o
        linux-2.6/arch/arm/mach-at91/dir/file.c:5:
          fatal error: opening dependency file
          arch/arm/mach-at91/dir/.file.o.d: No such file or directory
      
      Check the objtree:
        LANG=en ls objtree/arch/arm/mach-at91/dir
        ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory
      
      It's apparently that the target dir not created for file.o
      
      Check kbuild source code. It seems that kbuild create dirs for that in
      $(obj-dirs).  But if the dir need not to create a built-in.o, It should
      never in  $(obj-dirs).
      
      So I make this patch to make sure It in  $(obj-dirs)
      
      this bug caused by commit
         f5fb9765
      
      Signed-off-by: default avatar张忠山 <zzs0213@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      4d47dde4
  4. Jun 13, 2013
  5. May 23, 2013
    • Matthijs Kooijman's avatar
      kbuild: Don't assume dts files live in arch/*/boot/dts · ad061568
      Matthijs Kooijman authored
      
      
      In commit b40b25ff (kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp),
      dts building was changed to always use the C preprocessor. This meant
      that the .dts file passed to dtc is not the original, but the
      preprocessed one.
      
      When compiling with a separate build directory (i.e., with O=), this
      preprocessed file will not live in the same directory as the original.
      When the .dts file includes .dtsi files, dtc will look for them in the
      build directory, not in the source directory and compilation will fail.
      
      The commit referenced above tried to fix this by passing arch/*/boot/dts
      as an include path to dtc. However, for mips, the .dts files are not in
      this directory, so dts compilation on mips breaks for some targets.
      
      Instead of hardcoding this particular include path, this commit just
      uses the directory of the .dts file that is being compiled, which
      effectively restores the previous behaviour wrt includes. For most .dts
      files, this path is just the same as the previous hardcoded
      arch/*/boot/dts path.
      
      This was tested on a mips (rt3052) and an arm (bcm2835) target.
      
      Signed-off-by: default avatarMatthijs Kooijman <matthijs@stdin.nl>
      Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      ad061568
  6. Apr 05, 2013
    • Stephen Warren's avatar
      kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp · b40b25ff
      Stephen Warren authored
      
      
      Replace cmd_dtc with cmd_dtc_cpp, and delete the latter.
      
      Previously, a special file extension (.dtsp) was required to trigger
      the C pre-processor to run on device tree files. This was ugly. Now that
      previous changes have enhanced cmd_dtc_cpp to collect dependency
      information from both gcc -E and dtc, we can transparently run the pre-
      processor on all device tree files, irrespective of whether they
      use /include/ or #include syntax to include *.dtsi.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
      b40b25ff
    • Stephen Warren's avatar
      kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtc · 85f02be8
      Stephen Warren authored
      
      
      Prior to this change, when compiling *.dts to *.dtb, the dependency
      output from dtc would be used, and when compiling *.dtsp to *.dtb, the
      dependency output from gcc -E alone would be used, despite dtc also
      being invoked (on a temporary file that was guaranteed to have no
      dependencies).
      
      With this change, when compiling *.dtsp to *.dtb, the dependency files
      from both gcc -E and dtc are used. This will allow cmd_dtc_cpp to
      replace cmd_dtc in a future change. In turn, that will allow the C pre-
      processor to be run transparently on *.dts, without the need to a
      separate rule or file extension to trigger it.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
      85f02be8
    • Stephen Warren's avatar
      kbuild: create an "include chroot" for DT bindings · c58299aa
      Stephen Warren authored
      
      
      The recent dtc+cpp support allows header files and C pre-processor
      defines/macros to be used when compiling device tree files. These
      headers will typically define various constants that are part of the
      device tree bindings.
      
      The original patch which set up the dtc+cpp include path only considered
      using those headers from device tree files. However, most are also
      useful for kernel code which needs to interpret the device tree.
      
      In both the DT files and the kernel, I'd like to include the DT-related
      headers in the same way, for example, <dt-bindings/gpio/tegra-gpio.h>.
      That will simplify any text which discusses the DT header locations.
      
      Creating a <dt-bindings/> for kernel source to use is as simple as
      placing files into include/dt-bindings/.
      
      However, when compiling DT files, the include path should be restricted
      so that only the dt-bindings path is available; arbitrary kernel headers
      shouldn't be exposed. For this reason, create a specific include
      directory for use by dtc+cpp, and symlink dt-bindings from there to the
      actual location of include/dt-bindings/. For want of a better location,
      place this "include chroot" into the existing dts/ directory.
      
      arch/*/boot/dts/include/dt-bindings -> ../../../../../include/dt-bindings
      
      Some headers used by device tree files may not be useful to the kernel;
      they may be used simply to aid in constructing the DT file (e.g. macros
      to create a node), but not define any information that the kernel needs
      to share. These may be placed directly into arch/*/boot/dts/ along with
      the DT files themselves.
      
      Acked-by: default avatarMichal Marek <mmarek@suse.cz>
      Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      c58299aa
  7. Mar 15, 2013
    • Rusty Russell's avatar
      CONFIG_SYMBOL_PREFIX: cleanup. · b92021b0
      Rusty Russell authored
      
      
      We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
      "_".  But Al Viro broke this in "consolidate cond_syscall and
      SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
      do so.
      
      Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
      prefix it so something.  So various places define helpers which are
      defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:
      
      1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
      2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
      3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
      4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
      5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
      6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
      7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
         CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
         for pasting.
      
      (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).
      
      Let's solve this properly:
      1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
      2) Make linux/export.h usable from asm.
      3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
      4) Make everyone use them.
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Tested-by: James Hogan <james.hogan@imgtec.com> (metag)
      b92021b0
  8. Feb 13, 2013
    • Stephen Warren's avatar
      kbuild: limit dtc+cpp include path · e570d7c1
      Stephen Warren authored
      
      
      Device tree source files may now include header files. The intent is
      that those header files define/name constants used as part of the DT
      bindings. Currently this feature is open to abuse, since any kernel
      header file at all can be included, This could allow device tree files
      to become dependant on kernel headers files, and thus make them no
      longer OS-independent. This would also prevent separating the device
      tree source files from the kernel repository.
      
      Solve this by limiting the cpp include path for device tree files to
      separate directories.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      e570d7c1
  9. Feb 08, 2013
  10. Nov 30, 2012
    • Stephen Warren's avatar
      kbuild: centralize .dts->.dtb rule · 90b335fb
      Stephen Warren authored
      
      
      All architectures that use cmd_dtc do so in almost the same way. Create
      a central build rule to avoid duplication. The one difference is that
      most current uses of dtc build $(obj)/%.dtb from $(src)/dts/%.dts rather
      than building the .dtb in the same directory as the .dts file. This
      difference will be eliminated arch-by-arch in future patches.
      
      MIPS is the exception here; it already uses the exact same rule as the
      new common rule, so the duplicate is removed in this patch to avoid any
      conflict. arch/mips changes courtesy of Ralf Baechle.
      
      Update Documentation/kbuild to remove the explicit call to cmd_dtc from
      the example, now that the rule exists in a centralized location.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: linux@lists.openrisc.net
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: microblaze-uclinux@itee.uq.edu.au
      Cc: Chris Zankel <chris@zankel.net>
      Cc: linux-xtensa@linux-xtensa.org
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      90b335fb
  11. Mar 26, 2012
  12. Jan 14, 2012
    • Stephen Warren's avatar
      Kbuild: Use dtc's -d (dependency) option · 7c431851
      Stephen Warren authored
      
      
      This hooks dtc into Kbuild's dependency system.
      
      Thus, for example, "make dtbs" will rebuild tegra-harmony.dtb if only
      tegra20.dtsi has changed yet tegra-harmony.dts has not. The previous
      lack of this feature recently caused me to have very confusing "git
      bisect" results.
      
      For ARM, it's obvious what to add to $(targets). I'm not familiar enough
      with other architectures to know what to add there. Powerpc appears to
      already add various .dtb files into $(targets), but the other archs may
      need something added to $(targets) to work.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
      [mmarek: Dropped arch/c6x part to avoid merging commits from the middle
      of the merge window]
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      7c431851
  13. Jan 08, 2012
    • Michal Marek's avatar
      kbuild: Fix comment in Makefile.lib · 5bb0571b
      Michal Marek authored
      
      
      KBUILD_MODNAME is not defined for files that are linked into multiple
      modules, and trying to change reality to match documentation would
      result in all sorts of trouble. E.g. options for built-in modules would
      be called either foo_bar.param, foo.param, or bar.param, depending on
      the configuration. So just change the comment.
      
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      5bb0571b
  14. Aug 31, 2011
  15. Jun 09, 2011
  16. Apr 18, 2011
  17. Jan 13, 2011
    • Lasse Collin's avatar
      decompressors: add XZ decompressor module · 24fa0402
      Lasse Collin authored
      In userspace, the .lzma format has become mostly a legacy file format that
      got superseded by the .xz format.  Similarly, LZMA Utils was superseded by
      XZ Utils.
      
      These patches add support for XZ decompression into the kernel.  Most of
      the code is as is from XZ Embedded <http://tukaani.org/xz/embedded.html
      
      >.
      It was written for the Linux kernel but is usable in other projects too.
      
      Advantages of XZ over the current LZMA code in the kernel:
        - Nice API that can be used by other kernel modules; it's
          not limited to kernel, initramfs, and initrd decompression.
        - Integrity check support (CRC32)
        - BCJ filters improve compression of executable code on
          certain architectures. These together with LZMA2 can
          produce a few percent smaller kernel or Squashfs images
          than plain LZMA without making the decompression slower.
      
      This patch: Add the main decompression code (xz_dec), testing module
      (xz_dec_test), wrapper script (xz_wrap.sh) for the xz command line tool,
      and documentation.  The xz_dec module is enough to have a usable XZ
      decompressor e.g.  for Squashfs.
      
      Signed-off-by: default avatarLasse Collin <lasse.collin@tukaani.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alain Knaff <alain@knaff.lu>
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24fa0402
  18. Dec 23, 2010
    • Dirk Brandewie's avatar
      of: Add support for linking device tree blobs into vmlinux · aab94339
      Dirk Brandewie authored
      
      
      This patch adds support for linking device tree blob(s) into
      vmlinux. Modifies asm-generic/vmlinux.lds.h to add linking
      .dtb sections into vmlinux. To maintain compatiblity with the of/fdt
      driver code platforms MUST copy the blob to a non-init memory location
      before the kernel frees the .init.* sections in the image.
      
      Modifies scripts/Makefile.lib to add a kbuild command to
      compile DTS files to device tree blobs and a rule to create objects to
      wrap the blobs for linking.
      
      STRUCT_ALIGNMENT is defined in vmlinux.lds.h for use in the rule to
      create wrapper objects for the dtb in Makefile.lib.  The
      STRUCT_ALIGN() macro in vmlinux.lds.h is modified to use the
      STRUCT_ALIGNMENT definition.
      
      The DTB's are placed on 32 byte boundries to allow parsing the blob
      with driver/of/fdt.c during early boot without having to copy the blob
      to get the structure alignment GCC expects.
      
      A DTB is linked in by adding the DTB object to the list of objects to
      be linked into vmlinux in the archtecture specific Makefile using
         obj-y += foo.dtb.o
      
      Signed-off-by: default avatarDirk Brandewie <dirk.brandewie@gmail.com>
      Acked-by: default avatarMichal Marek <mmarek@suse.cz>
      [grant.likely@secretlab.ca: cleaned up whitespace inconsistencies]
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      aab94339
  19. Oct 28, 2010
  20. Sep 22, 2010
  21. Apr 06, 2010
    • Borislav Petkov's avatar
      x86: Add optimized popcnt variants · d61931d8
      Borislav Petkov authored
      
      
      Add support for the hardware version of the Hamming weight function,
      popcnt, present in CPUs which advertize it under CPUID, Function
      0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
      default lib/hweight.c sw versions.
      
      A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
      a 3x speedup on a F10h machine.
      
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20100318112015.GC11152@aftab>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      d61931d8
  22. Mar 11, 2010
  23. Jan 13, 2010
    • Jonathan Nieder's avatar
      kbuild: really fix bzImage build with non-bash sh · 1373411a
      Jonathan Nieder authored
      
      
      In an x86 build with CONFIG_KERNEL_LZMA enabled and dash as sh,
      arch/x86/boot/compressed/vmlinux.bin.lzma ends with
      '\xf0\x7d\x39\x00' (16 bytes) instead of the 4 bytes intended and
      the resulting vmlinuz fails to boot.  This improves on the
      previous behavior, in which the file contained the characters
      '-ne ' as well, but not by much.
      
      Previous commits replaced "echo -ne" first with "/bin/echo -ne",
      then "printf" in the hope of improving portability, but none of
      these commands is guaranteed to support hexadecimal escapes on
      POSIX systems.  So use the shell to convert from hexadecimal to
      octal.
      
      With this change, an LZMA-compressed kernel built with dash as sh
      boots correctly again.
      
      Reported-by: default avatarSebastian Dalfuß <sd@sedf.de>
      Reported-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
      Reported-by: default avatarMichael Guntsche <mike@it-loops.com>
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Cc: Michael Tokarev <mjt@tls.msk.ru>
      Cc: Alek Du <alek.du@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      1373411a
  24. Jan 11, 2010
    • Albin Tonnerre's avatar
      lib: add support for LZO-compressed kernels · 7dd65feb
      Albin Tonnerre authored
      
      
      This patch series adds generic support for creating and extracting
      LZO-compressed kernel images, as well as support for using such images on
      the x86 and ARM architectures, and support for creating and using
      LZO-compressed initrd and initramfs images.
      
      Russell King said:
      
      : Testing on a Cortex A9 model:
      : - lzo decompressor is 65% of the time gzip takes to decompress a kernel
      : - lzo kernel is 9% larger than a gzip kernel
      :
      : which I'm happy to say confirms your figures when comparing the two.
      :
      : However, when comparing your new gzip code to the old gzip code:
      : - new is 99% of the size of the old code
      : - new takes 42% of the time to decompress than the old code
      :
      : What this means is that for a proper comparison, the results get even better:
      : - lzo is 7.5% larger than the old gzip'd kernel image
      : - lzo takes 28% of the time that the old gzip code took
      :
      : So the expense seems definitely worth the effort.  The only reason I
      : can think of ever using gzip would be if you needed the additional
      : compression (eg, because you have limited flash to store the image.)
      :
      : I would argue that the default for ARM should therefore be LZO.
      
      This patch:
      
      The lzo compressor is worse than gzip at compression, but faster at
      extraction.  Here are some figures for an ARM board I'm working on:
      
      Uncompressed size: 3.24Mo
      gzip  1.61Mo 0.72s
      lzo   1.75Mo 0.48s
      
      So for a compression ratio that is still relatively close to gzip, it's
      much faster to extract, at least in that case.
      
      This part contains:
       - Makefile routine to support lzo compression
       - Fixes to the existing lzo compressor so that it can be used in
         compressed kernels
       - wrapper around the existing lzo1x_decompress, as it only extracts one
         block at a time, while we need to extract a whole file here
       - config dialog for kernel compression
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: default avatarAlbin Tonnerre <albin.tonnerre@free-electrons.com>
      Tested-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarRussell King <rmk@arm.linux.org.uk>
      Acked-by: default avatarRussell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7dd65feb
  25. Dec 15, 2009
    • Alan Jenkins's avatar
      module: make MODULE_SYMBOL_PREFIX into a CONFIG option · 9e1b9b80
      Alan Jenkins authored
      
      
      The next commit will require the use of MODULE_SYMBOL_PREFIX in
      .tmp_exports-asm.S.  Currently it is mixed in with C structure
      definitions in "asm/module.h".  Move the definition of this arch option
      into Kconfig, so it can be easily accessed by any code.
      
      This also lets modpost.c use the same definition.  Previously modpost
      relied on a hardcoded list of architectures in mk_elfconfig.c.
      
      A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs,
      showed the generated code was unchanged.  vmlinux was identical save
      for build ids, and an apparently randomized suffix on a single "__key"
      symbol in the kallsyms data).
      
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: Mike Frysinger <vapier@gentoo.org> (blackfin)
      CC: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      9e1b9b80
  26. Dec 12, 2009
  27. Oct 11, 2009
  28. Jun 18, 2009
    • Peter Oberparleiter's avatar
      gcov: add gcov profiling infrastructure · 2521f2c2
      Peter Oberparleiter authored
      Enable the use of GCC's coverage testing tool gcov [1] with the Linux
      kernel.  gcov may be useful for:
      
       * debugging (has this code been reached at all?)
       * test improvement (how do I change my test to cover these lines?)
       * minimizing kernel configurations (do I need this option if the
         associated code is never run?)
      
      The profiling patch incorporates the following changes:
      
       * change kbuild to include profiling flags
       * provide functions needed by profiling code
       * present profiling data as files in debugfs
      
      Note that on some architectures, enabling gcc's profiling option
      "-fprofile-arcs" for the entire kernel may trigger compile/link/
      run-time problems, some of which are caused by toolchain bugs and
      others which require adjustment of architecture code.
      
      For this reason profiling the entire kernel is initially restricted
      to those architectures for which it is known to work without changes.
      This restriction can be lifted once an architecture has been tested
      and found compatible with gcc's profiling. Profiling of single files
      or directories is still available on all platforms (see config help
      text).
      
      [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
      
      
      
      Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2521f2c2
  29. May 09, 2009
  30. Apr 19, 2009
    • Sam Ravnborg's avatar
      kbuild: introduce subdir-ccflags-y · 720097d8
      Sam Ravnborg authored
      
      
      Following patch introduce support for setting options
      to gcc that has effect for current directory and all
      subdirectories.
      
      The typical use case are an architecture or a subsystem that
      decide to cover all files with -Werror.
      Today alpha, mips and sparc uses -Werror in almost all their
      Makefile- with subdir-ccflag-y it is now simpler to do so
      as only the top-level directories needs to be covered.
      
      Likewise if we decide to cover a full subsystem such
      as net/ with -Werror this is done by adding a single
      line to net/Makefile.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      720097d8
  31. Mar 24, 2009
    • Jason Baron's avatar
      dynamic debug: combine dprintk and dynamic printk · e9d376f0
      Jason Baron authored
      
      
      This patch combines Greg Bank's dprintk() work with the existing dynamic
      printk patchset, we are now calling it 'dynamic debug'.
      
      The new feature of this patchset is a richer /debugfs control file interface,
      (an example output from my system is at the bottom), which allows fined grained
      control over the the debug output. The output can be controlled by function,
      file, module, format string, and line number.
      
      for example, enabled all debug messages in module 'nf_conntrack':
      
      echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control
      
      to disable them:
      
      echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control
      
      A further explanation can be found in the documentation patch.
      
      Signed-off-by: default avatarGreg Banks <gnb@sgi.com>
      Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e9d376f0
  32. Jan 04, 2009
    • H. Peter Anvin's avatar
      bzip2/lzma: handle failures from bzip2 and lzma correctly · 0f5e2d24
      H. Peter Anvin authored
      
      
      Impact: Bug fix
      
      If bzip2 or lzma fails (for example, if they aren't installed on the
      system), we need to propagate the failure out to "make".  However,
      they were masked by being followed by a semicolon.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      0f5e2d24
    • Alain Knaff's avatar
      bzip2/lzma: library support for gzip, bzip2 and lzma decompression · bc22c17e
      Alain Knaff authored
      
      
      Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code
      
      This is the first part of the bzip2/lzma patch
      
      The bzip patch is based on an idea by Christian Ludwig, includes support for
      compressing the kernel with bzip2 or lzma rather than gzip. Both
      compressors give smaller sizes than gzip.  Lzma's decompresses faster
      than bzip2.
      
      It also supports ramdisks and initramfs' compressed using these two
      compressors.
      
      The functionality has been successfully used for a couple of years by
      the udpcast project
      
      This version applies to "tip" kernel 2.6.28
      
      This part contains:
      - changed inflate.c to accomodate rest of patch
      - implementation of bzip2 compression (not used at this stage yet)
      - implementation of lzma compression (not used at this stage yet)
      - Makefile routines to support bzip2 and lzma kernel compression
      
      Signed-off-by: default avatarAlain Knaff <alain@knaff.lu>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      bc22c17e
  33. Dec 03, 2008
    • Sam Ravnborg's avatar
      kbuild: expand -I in KBUILD_CPPFLAGS · d8672b40
      Sam Ravnborg authored
      
      
      kbuild failed to expand include flags in KBUILD_CPPFLAGS
      resulting in code like this in arch Makefiles:
      
      ifeq ($(KBUILD_SRC),)
      KBUILD_CPPFLAGS += -Iinclude/foo
      else
      KBUILD_CPPFLAGS += -I$(srctree)/include/foo
      endif
      
      Move use of LINUXINCLUDE into Makefile.lib to allow
      us to expand -I directives of KBUILD_CPPFLAGS so
      we can avoid the above code.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      d8672b40
  34. Oct 16, 2008
    • Jason Baron's avatar
      driver core: basic infrastructure for per-module dynamic debug messages · 346e15be
      Jason Baron authored
      
      
      Base infrastructure to enable per-module debug messages.
      
      I've introduced CONFIG_DYNAMIC_PRINTK_DEBUG, which when enabled centralizes
      control of debugging statements on a per-module basis in one /proc file,
      currently, <debugfs>/dynamic_printk/modules. When, CONFIG_DYNAMIC_PRINTK_DEBUG,
      is not set, debugging statements can still be enabled as before, often by
      defining 'DEBUG' for the proper compilation unit. Thus, this patch set has no
      affect when CONFIG_DYNAMIC_PRINTK_DEBUG is not set.
      
      The infrastructure currently ties into all pr_debug() and dev_dbg() calls. That
      is, if CONFIG_DYNAMIC_PRINTK_DEBUG is set, all pr_debug() and dev_dbg() calls
      can be dynamically enabled/disabled on a per-module basis.
      
      Future plans include extending this functionality to subsystems, that define 
      their own debug levels and flags.
      
      Usage:
      
      Dynamic debugging is controlled by the debugfs file, 
      <debugfs>/dynamic_printk/modules. This file contains a list of the modules that
      can be enabled. The format of the file is as follows:
      
      	<module_name> <enabled=0/1>
      		.
      		.
      		.
      
      	<module_name> : Name of the module in which the debug call resides
      	<enabled=0/1> : whether the messages are enabled or not
      
      For example:
      
      	snd_hda_intel enabled=0
      	fixup enabled=1
      	driver enabled=0
      
      Enable a module:
      
      	$echo "set enabled=1 <module_name>" > dynamic_printk/modules
      
      Disable a module:
      
      	$echo "set enabled=0 <module_name>" > dynamic_printk/modules
      
      Enable all modules:
      
      	$echo "set enabled=1 all" > dynamic_printk/modules
      
      Disable all modules:
      
      	$echo "set enabled=0 all" > dynamic_printk/modules
      
      Finally, passing "dynamic_printk" at the command line enables
      debugging for all modules. This mode can be turned off via the above
      disable command.
      
      [gkh: minor cleanups and tweaks to make the build work quietly]
      
      Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      346e15be
  35. May 23, 2008
    • Steven Rostedt's avatar
      kbuild: create new CFLAGS_REMOVE_(basename).o option · 656ee82c
      Steven Rostedt authored
      
      
      We currently have a way to add special CFLAGS to code, but we do not have a
      way to remove them if needed.
      
      With the case of ftrace, some files should simply not be profiled. Adding
      the -pg flag to these files is simply a waste, and adding "notrace" to each
      and every function is ugly.
      
      Currently we put in "Makefile turd" [1] to stop the compiler from adding -pg
      to certain files. This was clumsy and awkward.
      
      This patch now adds the revese of CFLAGS_(basename).o with
      CFLAGS_REMOVE_(basename).o.  This allows developers to prevent certain
      CFLAGS from being used to compile files. For example, we can now do
      
      CFLAGS_REMOVE_string.o = -pg
      
      to remove the -pg option from the string.o file in the lib directory.
      
      Note: a space delimited list of options may be added to the REMOVE macro.
      
      [1] - what David Miller called the workaronud to remove -pg
      
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      656ee82c
Loading