1. 03 Mar, 2010 24 commits
  2. 22 Feb, 2010 1 commit
  3. 17 Feb, 2010 2 commits
  4. 05 Feb, 2010 3 commits
    • Andi Kleen's avatar
      kbuild: move -fno-dwarf2-cfi-asm to powerpc only · d0679c73
      Andi Kleen authored
      Better dwarf2 unwind information is a good thing, it allows better
      debugging with kgdb and crash and helps systemtap.
      
      Commit 00308649 ("Build with
      -fno-dwarf2-cfi-asm") disabled some CFI information globally to work
      around a module loader bug on powerpc.
      
      But this disables the better unwind tables for all architectures, not just
      powerpc.  Move the workaround to powerpc and also add a suitable comment
      that's it really a workaround.
      
      This improves dwarf2 unwind tables on x86 at least.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      d0679c73
    • Hui Zhu's avatar
      markup_oops.pl: minor fixes · 59dde385
      Hui Zhu authored
      1. Fix a little format issue.
      2. Check the return of "Getopt::Long::GetOptions".  Output usage and
         exit if it get error.
      3. Change $ARGV[$#ARGV] to $ARGV[0].
      4. Change the code which get $modulefile from modinfo.  Replace the
         pipeline with `modinfo -F filename $module`.
      4. Change usage from "Specify the module directory name" to "Specify the
         module filename".
      Signed-off-by: default avatarHui Zhu <teawater@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      59dde385
    • Hui Zhu's avatar
      markup_oops.pl: add options to improve cross-sompilation environments · 52e13e21
      Hui Zhu authored
      The markup_oops.pl have 3 troubles to support cross-compiler environment:
      1.  It use objdump directly.
      2.  It use modinfo to get the message of module.
      3.  It use hex function that cannot support 64-bit number in 32-bit arch.
      
      This patch add 3 options to markup_oops.pl:
      1. -c CROSS_COMPILE	Specify the prefix used for toolchain.
      2. -m MODULE_DIRNAME	Specify the module directory name.
      3. Change hex function to Math::BigInt->from_hex.
      
      After this patch, parse the x8664 oops in x86, we can:
      cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m ./e.ko vmlinux
      
      Thanks,
      Hui
      Signed-off-by: default avatarHui Zhu <teawater@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: ozan@pardus.org.tr
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      52e13e21
  5. 02 Feb, 2010 10 commits
    • Michal Marek's avatar
    • Michal Marek's avatar
      MAINTAINERS: add a few more patterns to kbuild · 70fb7ba6
      Michal Marek authored
      Also, add a note that "unmaintained" files below scripts/ should go via
      the kbuild tree (best current practice).
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      70fb7ba6
    • John Saalwaechter's avatar
      scripts: use %_tmppath in "make rpm-pkg" · 880df92f
      John Saalwaechter authored
      The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's
      BuildRoot. The user, however, may have a custom setting for %_tmppath,
      which should be used in BuildRoot.  This patch changes mkspec's
      BuildRoot output to appropriately use %_tmppath.
      Signed-off-by: default avatarJohn Saalwaechter <saalwaechter@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      880df92f
    • Hui Zhu's avatar
      markup_oops.pl: fix for faulting instruction in the first line of a range · 0139f1d9
      Hui Zhu authored
      I got a "No matching code found" when I use markup_oops.pl parse a error
      in a x86_64 module.
      
      cat e.c
      
      int init_module(void)
      {
      	char	*buf = 0;
      
      	buf[0] = 3;
      
      	return 0;
      }
      
      void cleanup_module(void)
      {
      	//char	*buf = 0;
      
      	//buf[0] = 3;
      }
      
      MODULE_AUTHOR("Hui Zhu");
      MODULE_LICENSE("GPL");
      
      0000000000000000 <init_module>:
      init_module():
      /home/teawater/study/kernel/stack2core/example/e.c:10
         0:	c6 04 25 00 00 00 00 	movb   $0x3,0x0
         7:	03
      /home/teawater/study/kernel/stack2core/example/e.c:13
         8:	31 c0                	xor    %eax,%eax
         a:	c3                   	retq
         b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
      
      0000000000000010 <cleanup_module>:
      cleanup_module():
      /home/teawater/study/kernel/stack2core/example/e.c:20
        10:	f3 c3                	repz retq
        12:	90                   	nop
        13:	90                   	nop
      Disassembly of section .modinfo:
      
      This is because the faulting instruction "movb   $0x3,0x0" is the first
      line of the range.
      
      In the markup_oops.pl:
      main::(./scripts/markup_oops.pl:245):
      245:				if (InRange($1, $target)) {
        DB<2> p $line
      ffffffffa001b000:	c6 04 25 00 00 00 00 	movb   $0x3,0x0
        DB<3> p $counter
      0
      
      It just set $center in next loop. So it cannot get the $center.
      
      And even if $center is set to the right value 0.
      if ($center == 0) {
      	print "No matching code found \n";
      	exit;
      }
      The first line $center will be 0, so I change the default value to -1.
      Signed-off-by: default avatarHui Zhu <teawater@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      0139f1d9
    • Don Zickus's avatar
      scripts: change scripts to use system python instead of env · 94a47083
      Don Zickus authored
      Just a small change to a couple of scripts to go from
      
       #!/usr/bin/env python
      
      to
      
       #!/usr/bin/python
      
      This shouldn't effect anyone, unless they don't install python there.
      
      In preparation for python3, Fedora is doing a big push to change the scripts
      to use the system python.  This allows developers to put the python3 in
      their path without fear of breaking existing scripts.
      
      Now I am pretty sure anyone using python3 for testing purposes will probably
      not run any of the scripts I changed, but Fedora has this automated tool
      that checks for this stuff so I thought I would try to push it upstream.
      Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
      Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Acked-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      94a47083
    • Himanshu Chauhan's avatar
      scripts/kallsyms: suppress build warning · 71d41aed
      Himanshu Chauhan authored
      Suppress a warn_unused_result warning.
      
      fgets is called as a part of error handling.  It is called just to drop a
      line and return immediately.  read_map is reading the file in a loop and
      read_symbol reads line by line.  So I think there is no point in using
      return value for useful checking.  Other checks like 3 items were returned
      or !EOF have already been done.
      Signed-off-by: default avatarHimanshu Chauhan <hschauhan@nulltrace.org>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      71d41aed
    • Michal Marek's avatar
      scripts/mkcompile_h: don't test for hardcoded paths · d4987bd7
      Michal Marek authored
      Don't test for /bin/{dnsdomainname,domainname}, simply try to execute
      the command and check if it returned something.
      Reported-by: default avatarGlenn Sommer <glemsom@gmail.com>
      Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Tested-by: default avatarGlenn Sommer <glemsom@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      d4987bd7
    • Andi Kleen's avatar
      Improve kconfig symbol hashing · e66f25d7
      Andi Kleen authored
      While looking for something else I noticed that the symbol
      hash function used by kconfig is quite poor. It doesn't
      use any of the standard hash techniques but simply
      adds up the string and then uses power of two masking,
      which is both known to perform poorly.
      
      The current x86 kconfig has over 7000 symbols.
      
      When I instrumented it showed that the minimum hash chain
      length was 16 and a significant number of them was over
      30.
      
      It didn't help that the hash table size was only 256 buckets.
      
      This patch increases the hash table size to a larger prime
      and switches to a FNV32 hash. I played around with a couple of hash
      functions, but that one seemed to perform best with reasonable
      hash table sizes.
      
      Increasing the hash table size even further didn't
      seem like a good idea, because there are a couple of global
      walks which walk the complete hash table.
      
      I also moved the unnamed bucket to 0. It's still the longest
      of all the buckets (44 entries), but hopefully it's not
      often hit except for the global walk which doesn't care.
      
      The result is a much nicer distribution:
      (first column bucket length, second number of buckets with that length)
      
      1: 3505
      2: 1236
      3: 294
      4: 52
      5: 3
      47: 1		<--- this is the unnamed symbols bucket
      
      There are still some 5+ buckets, but increasing the hash table
      even more would be likely not worth it.
      
      This also cleans up the code slightly by removing hard coded
      magic numbers.
      
      I didn't notice a big performance difference either way
      on my Nehalem system, but I presume it'll help somewhat
      on slower systems.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      e66f25d7
    • Joe Perches's avatar
    • David Rientjes's avatar
      kbuild: improve version string logic · 85a256d8
      David Rientjes authored
      The LOCALVERSION= string passed to "make" will now always be appended to
      the kernel version after CONFIG_LOCALVERSION, if it exists, regardless of
      whether CONFIG_LOCALVERSION_AUTO is set or not.  This allows users to
      uniquely identify their kernel builds with a string.
      
      If CONFIG_LOCALVERSION_AUTO is enabled, the unique SCM tag reported by
      setlocalversion (or .scmversion) is appended to the kernel version, if it
      exists.  When CONFIG_LOCALVERSION_AUTO is not enabled, a `+' is appended
      to the kernel version to represent that the kernel has been revised since
      the last release unless "make LOCALVERSION=" was used to uniquely identify
      the build.
      
      The end result is this:
      
       - when LOCALVERSION= is passed to "make", it is appended to the kernel
         version,
      
       - when CONFIG_LOCALVERSION_AUTO is enabled, a unique SCM identifier is
         appended if the respository has been revised beyond a tagged commit,
         and
      
       - when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the
         repository has been revised beyond a tagged commit and LOCALVERSION=
         was not passed to "make".
      
      Examples:
      
      With CONFIG_LOCALVERSION_AUTO: "make" results in
      v2.6.32-rc4-00149-ga3ccf63e.  If there are uncommited changes to the
      respository, it results in v2.6.32-rc4-00149-ga3ccf63e-dirty.  If
      "make LOCALVERSION=kbuild" were used, it results in
      v2.6.32-rc4-kbuild-00149-ga3ccf63e-dirty.
      
      Without CONFIG_LOCALVERSION_AUTO, "make" results in v2.6.32-rc4+
      unless the repository is at the Linux v2.6.32-rc4 commit (in which
      case the version would be v2.6.32-rc4).  If "make LOCALVERSION=kbuild"
      were used, it results in v2.6.32-rc4-kbuild.
      
      Also renames variables such as localver-auto and _localver-auto to more
      accurately describe what they represent: localver-extra and
      scm-identifier, respectively.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      85a256d8