1. 03 8月, 2010 4 次提交
    • D
      modpost: support objects with more than 64k sections · 1ce53adf
      Denys Vlasenko 提交于
      This patch makes modpost able to process object files with more than
      64k sections. Needed for huge kernel builds (allyesconfig, for example)
      with -ffunction-sections. 64k sections handling is covered, for example,
      by this document:
      
      "IA-64 gABI Proposal 74: Section Indexes"
      http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.htmlSigned-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Signed-off-by: NAnders Kaseorg <andersk@mit.edu>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1ce53adf
    • U
      4696e295
    • 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
  2. 23 7月, 2010 1 次提交
    • S
      nconfig: Fix segfault when help contains special characters · 58f915a3
      Stephen Boyd 提交于
      nconfig segfaults when help text contains the character '%'. For a quick
      example, navigate to the kernel compression options and get the help for
      bzip2. Doing so triggers a call to mvwprintw() with a string containing
      '%' and no extra arguments to fill in the specifier's value. Fix this
      case by printing the literal string retrieved from the kconfig.
      
       #0  0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
       #1  0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
       #2  0x00002b52b623991b in _nc_printf_string () from
       /lib/libncursesw.so.5
       #3  0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
       #4  0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
       #5  0x00000000004151d8 in fill_window (win=0x21b64c0,
           text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
           speed is intermediate.\nDecompression speed is slowest among the
           three.  The kernel\nsize is about 10% smaller with bzip2, in
           comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:229
       #6  0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
               title=0x157fa30 "Bzip2",
       	    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
       	    ratio and speed is intermediate.\nDecompression speed is
       	    slowest among the three.  The kernel\nsize is about 10%
       	    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:535
       #7  0x00000000004055b2 in show_help (menu=0x157f9d0)
               at scripts/kconfig/nconf.c:1257
       #8  0x0000000000405897 in conf_choice (menu=0x157f130)
       	    at scripts/kconfig/nconf.c:1321
       #9  0x0000000000405326 in conf (menu=0x157d130) at
       	    scripts/kconfig/nconf.c:1208
       #10 0x00000000004052e8 in conf (menu=0xb434a0) at
       	    scripts/kconfig/nconf.c:1203
       #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)
      
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Nir Tzachar <nir.tzachar@gmail.com>
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      58f915a3
  3. 21 7月, 2010 1 次提交
  4. 20 7月, 2010 1 次提交
    • M
      kbuild: Make the setlocalversion script POSIX-compliant · 6dc0c2f3
      Michał Górny 提交于
      The 'source' builtin is a bash alias to the '.' (dot) builtin. While the
      former is supported only by bash, the latter is specified in POSIX and
      works fine with all POSIX-compliant shells I am aware of.
      
      The '$_' special parameter is specific to bash. It is partially
      supported in dash too but it always evaluates to the current script path
      (which causes the script to enter a loop recursively re-executing
      itself). This is why I have replaced the two occurences of '$_' with the
      explicit parameter.
      
      The 'local' builtin is another example of bash-specific code. Although
      it is supported by all POSIX-compliant shells I am aware of, it is not
      part of POSIX specification and thus the code should not rely on it
      assigning a specific value to the local variable. Moreover, the 'posh'
      shell has a limited version of 'local' builtin not supporting direct
      variable assignments. Thus, I have broken one of the 'local'
      declarations down into a (non-POSIX) 'local' declaration and a plain
      (POSIX-compliant) variable assignment.
      Signed-off-by: NMichał Górny <gentoo@mgorny.alt.pl>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6dc0c2f3
  5. 08 7月, 2010 1 次提交
  6. 18 6月, 2010 1 次提交
    • M
      kbuild: Clean up and speed up the localversion logic · 09155120
      Michal Marek 提交于
      Now that we run scripts/setlocalversion during every build, it makes
      sense to move all the localversion logic there. This cleans up the
      toplevel Makefile and also makes sure that the script is called only
      once in 'make prepare' (previously, it would be called every time due to
      a variable expansion in an ifneq statement). No user-visible change is
      intended, unless one runs the setlocalversion script directly.
      Reported-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      09155120
  7. 12 6月, 2010 1 次提交
    • K
      kbuild: Fix modpost segfault · 1c938663
      Krzysztof Halasa 提交于
      Alan <alan@clueserver.org> writes:
      
      > program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
      > Module.symvers -S vmlinux.o
      >
      > Program received signal SIGSEGV, Segmentation fault.
      
      It just hit me.
      It's the offset calculation in reloc_location() which overflows:
              return (void *)elf->hdr + sechdrs[section].sh_offset +
                     (r->r_offset - sechdrs[section].sh_addr);
      
      E.g. for the first rodata r entry:
      r->r_offset < sechdrs[section].sh_addr
      and the expression in the parenthesis produces 0xFFFFFFE0 or something
      equally wise.
      Reported-by: NAlan <alan@clueserver.org>
      Signed-off-by: NKrzysztof Hałasa <khc@pm.waw.pl>
      Tested-by: NAlan <alan@clueserver.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1c938663
  8. 10 6月, 2010 1 次提交
  9. 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
  10. 03 6月, 2010 1 次提交
  11. 28 5月, 2010 4 次提交
  12. 25 5月, 2010 5 次提交
  13. 22 5月, 2010 1 次提交
  14. 19 5月, 2010 1 次提交
    • O
      MODULE_DEVICE_TABLE(isapnp, ...) does nothing · fedb3d27
      Ondrej Zary 提交于
      On Monday 23 November 2009 04:29:53 Rusty Russell wrote:
      > On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote:
      > > The problem is that
      > > scripts/mod/file2alias.c simply ignores isapnp.
      >
      > AFAICT it always has, and noone has complained until now.  Perhaps
      > something was still reading /lib/modules/`uname -r`/modules.isapnpmap?
      
      The patch below works fine (at least with Debian). It needs your first
      patch that moves the definitions to mod_devicetable.h. Verified that
      aliases for these modules are generated correctly:
      
      drivers/media/radio/radio-sf16fmi.c
      drivers/net/ne.c
      drivers/net/3c515.c
      drivers/net/smc-ultra.c
      drivers/pcmcia/i82365.c
      drivers/scsi/aha1542.c
      drivers/scsi/aha152x.c
      drivers/scsi/sym53c416.c
      drivers/scsi/g_NCR5380.c
      
      Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380)
      cards - they now work automatically.
      
      Generate pnp:d aliases for isapnp_device_tables. This allows udev to load
      these modules automatically.
      Signed-off-by: NOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      fedb3d27
  15. 18 5月, 2010 1 次提交
  16. 14 4月, 2010 6 次提交
  17. 07 4月, 2010 1 次提交
    • B
      x86: Add optimized popcnt variants · d61931d8
      Borislav Petkov 提交于
      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: NBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20100318112015.GC11152@aftab>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      d61931d8
  18. 03 4月, 2010 1 次提交
  19. 29 3月, 2010 1 次提交
  20. 25 3月, 2010 3 次提交
  21. 23 3月, 2010 3 次提交
    • J
      kbuild: Include gen_initramfs_list.sh and the file list in the .d file · b8341936
      Jason Gunthorpe 提交于
      Expand the dependency set used for the initrd to include the
      CONFIG_INITRAMFS_SOURCE file and the generator script itself.
      Otherwise changing the initramfs file list does not rebuild the CPIO.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      b8341936
    • L
      kconfig: recalc symbol value before showing search results · da6df879
      Li Zefan 提交于
      A symbol's value won't be recalc-ed until we save config file or
      enter the menu where the symbol sits.
      
      So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:
      
        Symbol: FUNCTION_GRAPH_TRACER [=y]
        Prompt: Kernel Function Graph Tracer
          Defined at kernel/trace/Kconfig:140
          Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
          ...
      
      From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
      but it still shows FUNCTION_GRAPH_TRACER=y.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      da6df879
    • S
      headerdep: perlcritic warning · 1dcd8100
      Stephen Hemminger 提交于
      Minor perlcritic warning:
      headerdep.pl: "return" statement with explicit "undef" at line 84, column 2.  See page 199 of PBP.  (Severity: 5)
      
      The rationale according to PBP is that an explicit return of undef
      (contrary to most people's expectations) doesn't
      always evaluate as false. It has to with the fact that perl return value
      depends on context the function is called. If function is used in
      list context, the appropriate return value for false is an empty list;
      whereas in scalar context the return value for false is undefined.
      By just using a "return" both cases are handled.
      
      In the context of a trivial script this doesn't matter. But one script
      may be cut-paste into later code (most people like me only know 50%
      of perl), that is why perlcritic always complains
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1dcd8100