1. 17 4月, 2014 1 次提交
  2. 10 4月, 2014 1 次提交
  3. 14 2月, 2014 1 次提交
  4. 20 3月, 2013 1 次提交
    • J
      genksyms: pass symbol-prefix instead of arch · d70f82ac
      James Hogan 提交于
      Pass symbol-prefix to genksyms instead of arch, so that the decision
      what symbol prefix to use is kept in one place.
      
      Basically genksyms used to take a -a $ARCH argument and it used that to
      determine whether to add an underscore symbol prefix. It's now changed
      to take a -s $SYMBOL_PREFIX argument so that the caller decides whether
      a symbol prefix is required. The build system then uses
      CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX to determine whether to pass the
      argument.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      d70f82ac
  5. 08 10月, 2012 1 次提交
    • D
      X.509: Add simple ASN.1 grammar compiler · 4520c6a4
      David Howells 提交于
      Add a simple ASN.1 grammar compiler.  This produces a bytecode output that can
      be fed to a decoder to inform the decoder how to interpret the ASN.1 stream it
      is trying to parse.
      
      Action functions can be specified in the grammar by interpolating:
      
      	({ foo })
      
      after a type, for example:
      
      	SubjectPublicKeyInfo ::= SEQUENCE {
      		algorithm		AlgorithmIdentifier,
      		subjectPublicKey	BIT STRING ({ do_key_data })
      		}
      
      The decoder is expected to call these after matching this type and parsing the
      contents if it is a constructed type.
      
      The grammar compiler does not currently support the SET type (though it does
      support SET OF) as I can't see a good way of tracking which members have been
      encountered yet without using up extra stack space.
      
      Currently, the grammar compiler will fail if more than 256 bytes of bytecode
      would be produced or more than 256 actions have been specified as it uses
      8-bit jump values and action indices to keep space usage down.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      4520c6a4
  6. 26 1月, 2012 1 次提交
  7. 31 8月, 2011 1 次提交
  8. 19 5月, 2011 1 次提交
  9. 17 5月, 2011 3 次提交
  10. 02 5月, 2011 1 次提交
  11. 29 4月, 2011 1 次提交
  12. 28 4月, 2011 1 次提交
    • S
      kbuild: implement several W= levels · 28bc20dc
      Sam Ravnborg 提交于
      Building a kernel with "make W=1" produces far too much noise to be
      useful.
      
      Divide the warning options in three groups:
      
          W=1 - warnings that may be relevant and does not occur too often
          W=2 - warnings that occur quite often but may still be relevant
          W=3 - the more obscure warnings, can most likely be ignored
      
      When building the whole kernel, those levels produce:
      
      W=1 - 4859 warnings
      W=2 - 1394 warnings
      W=3 - 86666 warnings
      
      respectively. Warnings have been counted with Geert's script at
      
      http://www.kernel.org/pub/linux/kernel/people/geert/linux-log/linux-log-summary.pl
      
      Many warnings occur from .h files so fixing one file may have a nice
      effect on the total number of warnings.
      
      With these changes I am actually tempted to try W=1 now and then.
      Previously there was just too much noise.
      
      Borislav:
      
      - make the W= levels exclusive
      - move very noisy and making little sense for the kernel warnings to W=3
      - drop -Woverlength-strings due to useless warning message
      - copy explanatory text for the different warning levels to 'make help'
      - recount warnings per level
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NBorislav Petkov <bp@alien8.de>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      28bc20dc
  13. 20 4月, 2011 1 次提交
  14. 18 4月, 2011 1 次提交
  15. 09 3月, 2011 1 次提交
  16. 19 11月, 2010 1 次提交
    • W
      ftrace: Speed up recordmcount · 45677454
      Wu Zhangjin 提交于
      cmd_record_mcount is used to locate the _mcount symbols in the object
      files, only the files compiled with -pg has the _mcount symbol, so, it
      is only needed for such files, but the current cmd_record_mcount is used
      for all of the object files, so, we need to fix it and speed it up.
      
      Since -pg may be removed by the method used in kernel/trace/Makefile:
      
      ORIG_CFLAGS := $(KBUILD_CFLAGS)
      KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
      
      Or may be removed by the method used in arch/x86/kernel/Makefile:
      
      CFLAGS_REMOVE_file.o = -pg
      
      So, we must check the last variable stores the compiling flags, that is
      c_flags(Please refer to cmd_cc_o_c and rule_cc_o_c defined in
      scripts/Makefile.build) and since the CFLAGS_REMOVE_file.o is already
      filtered in _c_flags(Please refer to scripts/Makefile.lib) and _c_flags
      has less symbols, therefore, we only need to check _c_flags.
      
      ---------------
      Changes from v1:
      
        o Don't touch Makefile for CONFIG_FTRACE_MCOUNT_RECORD is enough
        o Use _c_flags intead of KBUILD_CFLAGS to cover CONFIG_REMOVE_file.o = -pg
        (feedback from Steven Rostedt <rostedt@goodmis.org>)
      Acked-by: NMichal Marek <mmarek@suse.cz>
      Signed-off-by: NWu Zhangjin <wuzhangjin@gmail.com>
      LKML-Reference: <3dc8cddf022eb7024f9f2cf857529a15bee8999a.1288196498.git.wuzhangjin@gmail.com>
      
      [ changed if [ .. == .. ] to if [ .. = .. ] to handle dash environments ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      45677454
  17. 19 10月, 2010 1 次提交
    • S
      ftrace: Remove recursion between recordmcount and scripts/mod/empty · d7b4d6de
      Steven Rostedt 提交于
      When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
      all objects are run through the recordmcount program to create a
      separate section that stores all the callers of mcount.
      
      The build process has a special file: scripts/mod/empty.o. This is
      built from empty.c which is literally an empty file (except for a
      single comment). This file is used to find information about the target
      elf format, like endianness and word size.
      
      The problem comes up when we need to build recordmcount. The
      build process requires that empty.o is built first. The build rules
      for empty.o will try to execute recordmcount on the empty.o file.
      We get an error that recordmcount does not exist.
      
      To avoid this recursion, the build file will skip running recordmcount
      if the file that it is building is script/mod/empty.o.
      
      [ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Tested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kbuild@vger.kernel.org
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d7b4d6de
  18. 16 10月, 2010 1 次提交
  19. 15 10月, 2010 1 次提交
    • S
      ftrace/x86: Add support for C version of recordmcount · 72441cb1
      Steven Rostedt 提交于
      This patch adds the support for the C version of recordmcount and
      compile times show ~ 12% improvement.
      
      After verifying this works, other archs can add:
      
       HAVE_C_MCOUNT_RECORD
      
      in its Kconfig and it will use the C version of recordmcount
      instead of the perl version.
      
      Cc: <linux-arch@vger.kernel.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kbuild@vger.kernel.org
      Cc: John Reiser <jreiser@bitwagon.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      72441cb1
  20. 02 9月, 2010 1 次提交
  21. 03 8月, 2010 2 次提交
    • S
      kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line · 80c00ba9
      Sam Ravnborg 提交于
      It is now possible to assign options to AS and CC
      on the command line - which is only used for built-in code.
      
      {A,C}FLAGS_KERNEL was used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC without overriding
      the original value.
      
      Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
      that is used by arch specific files and free up
      {A,C}FLAGS_KERNEL so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      80c00ba9
    • S
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg 提交于
      It is now possible to assign options to AS, CC and LD
      on the command line - which is only used when building modules.
      
      {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC, LD when building modules
      without overriding the original value.
      
      Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
      that is used by arch specific files and free up
      {A,C,LD}FLAGS_MODULE so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      
      Note: Previously we had a MODFLAGS variable for both
      AS and CC. But in favour of consistency this was dropped.
      So in some cases arch Makefile has one assignmnet replaced by
      two assignmnets.
      
      Note2: MODFLAGS was not documented and is dropped
      without any notice. I do not expect much/any breakage
      from this.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6588169d
  22. 04 6月, 2010 1 次提交
    • D
      Makefile.build: make KBUILD_SYMTYPES work again · e26d6b83
      Don Zickus 提交于
      commit 37a8d9f6 tried to combine some
      duplicate code and accidentally broke how KBUILD_SYMTYPES worked
      
      This fixes the code to match the original intention by the author who
      originally added the code I believe.
      
      The fixes include:
      - removing extra whitespaces in the if-statements
      - moving the if-statement from around the -r to the -T
      - adding a second arg to cmd_gensymtypes to simplify the options passed
        to genksyms.
      
      Tested by instrumenting genksyms and seeing what options were passed in
      during a make, KBUILD_SYMTYPES make, and when a foo.symref was created.
      
      Everything compiled and looked ok.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e26d6b83
  23. 02 2月, 2010 1 次提交
  24. 17 12月, 2009 1 次提交
  25. 21 9月, 2009 1 次提交
    • T
      kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. · 42f29a25
      Tim Abbott 提交于
      Adding a reference to <linux/linkage.h> to x86's <asm/cache.h> causes
      the x86 linker script to have syntax errors, because the ALIGN and
      ENTRY keywords get redefined to the assembly implementations of those.
      One could fix this by adjusting the include structure, but I think any
      solution based on that approach would be fragile.
      
      Currently, it is impossible when writing a header to do something
      different for assembly files and linker scripts, even though there are
      clearly cases where one wants them to define macros differently for
      the two (ENTRY being an excellent example).
      So I think the right solution here is to introduce a new preprocessor
      definition, called LINKER_SCRIPT that is set along with __ASSEMBLY__
      for linker scripts, and to use that to not define ALIGN and ENTRY in
      linker scripts.
      I suspect we'll find other uses for this mechanism in
      the future.
      Signed-off-by: NTim Abbott <tabbott@ksplice.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      42f29a25
  26. 20 9月, 2009 3 次提交
    • S
      arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 · 51b563fc
      Sam Ravnborg 提交于
      Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:
      
          Bash 4 filters out variables which contain a dot in them.
          This happends to be the case of CPPFLAGS_vmlinux.lds.
          This is rather unfortunate, as it now causes
          build failures when using SHELL=/bin/bash to compile,
          or when bash happens to be used by make (eg when it's /bin/sh)
      
      Remove the common definition of CPPFLAGS_vmlinux.lds by
      pushing relevant stuff to either Makefile.build or the
      arch specific kernel/Makefile where we build the linker script.
      
      This is also nice cleanup as we move the information out where
      it is used.
      
      Notes for the different architectures touched:
      
      arm - we use an already exported symbol
      cris - we use a config symbol aleady available
             [Not build tested]
      mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
             Added a few variables to CPPFLAGS - they are only used by
             the linker script.
             [Not build tested]
      powerpc - removed assignment that is not needed
                [not build tested]
      sparc - simplified it using $(BITS)
      um - introduced a few new exported variables to deal with this
      xtensa - added options to CPP invocation
               [not build tested]
      
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      51b563fc
    • A
      kbuild: fail build if recordmcount.pl fails · 66a57062
      Andi Kleen 提交于
      When this script fails the build should fail too. Otherwise there
      are mysterious build failures later.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      66a57062
    • A
      kbuild: echo the record_mcount command · c3c63b6b
      Andi Kleen 提交于
      I had some problems with record_mcount in the Makefile and it was hard
      to track down. Echo it by default to make it easier to diagnose.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      c3c63b6b
  27. 19 4月, 2009 1 次提交
    • S
      kbuild: introduce subdir-ccflags-y · 720097d8
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      720097d8
  28. 15 1月, 2009 1 次提交
  29. 14 1月, 2009 1 次提交
  30. 20 12月, 2008 2 次提交
    • J
      kbuild: strip generated symbols from *.ko · ad7a953c
      Jan Beulich 提交于
      This patch changes the way __crc_ symbols are being resolved from
      using ld to do so to using the assembler, thus allowing these symbols
      to be marked local (the linker creates then as global ones) and hence
      allow stripping (for modules) or ignoring (for vmlinux) them. While at
      this, also strip other generated symbols during module installation.
      
      One potentially debatable point is the handling of the flags passeed
      to gcc when translating the intermediate assembly file into an object:
      passing $(c_flags) unchanged doesn't work as gcc passes --gdwarf2 to
      gas whenever is sees any -g* option, even for -g0, and despite the
      fact that the compiler would have already produced all necessary debug
      info in the C->assembly translation phase. I took the approach of just
      filtering out all -g* options, but an alternative to such negative
      filtering might be to have a positive filter which might, in the ideal
      case allow just all the -Wa,* options to pass through.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ad7a953c
    • S
      kbuild: simplify use of genksyms · 37a8d9f6
      Sam Ravnborg 提交于
      Avoid duplicating long list of options in two places
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      37a8d9f6
  31. 04 12月, 2008 1 次提交
    • A
      genksyms: track symbol checksum changes · 64e6c1e1
      Andreas Gruenbacher 提交于
      Sometimes it is preferable to avoid changes of exported symbol checksums
      (to avoid breaking externally provided modules).  When a checksum change
      occurs, it can be hard to figure out what caused this change: underlying
      types may have changed, or additional type information may simply have
      become available at the point where a symbol is exported.
      
      Add a new --reference option to genksyms which allows it to report why
      checksums change, based on the type information dumps it creates with the
      --dump-types flag.  Genksyms will read in such a dump from a previous run,
      and report which symbols have changed (and why).
      
      The behavior can be controlled for an entire build as follows: If
      KBUILD_SYMTYPES is set, genksyms uses --dump-types to produce *.symtypes
      dump files.  If any *.symref files exist, those will be used as the
      reference to check against.  If KBUILD_PRESERVE is set, checksum changes
      will fail the build.
      Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      64e6c1e1
  32. 31 10月, 2008 1 次提交
  33. 23 10月, 2008 1 次提交
  34. 14 10月, 2008 1 次提交