02 Feb, 2010

14 commits

  • 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: Don Zickus
    Acked-by: WANG Cong
    Acked-by: Jarod Wilson
    Signed-off-by: Michal Marek

    Don Zickus
     
  • 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: Himanshu Chauhan
    Cc: WANG Cong
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Himanshu Chauhan
     
  • Don't test for /bin/{dnsdomainname,domainname}, simply try to execute
    the command and check if it returned something.

    Reported-by: Glenn Sommer
    Acked-by: WANG Cong
    Tested-by: Glenn Sommer
    Signed-off-by: Michal Marek

    Michal Marek
     
  • 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
    Signed-off-by: Michal Marek

    Andi Kleen
     
  • Signed-off-by: Joe Perches
    Acked-by: WANG Cong
    Signed-off-by: Michal Marek

    Joe Perches
     
  • 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-ga3ccf63. If there are uncommited changes to the
    respository, it results in v2.6.32-rc4-00149-ga3ccf63-dirty. If
    "make LOCALVERSION=kbuild" were used, it results in
    v2.6.32-rc4-kbuild-00149-ga3ccf63-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: David Rientjes
    Signed-off-by: Michal Marek

    David Rientjes
     
  • This patch fixes two problems reported by Jan Engelhardt:
    1) Border is now properly placed, to always be visible
    2) Long menu items are properly displayed

    Reported-by: Jan Engelhardt
    Signed-off-by: Nir Tzachar
    Signed-off-by: Michal Marek

    Nir Tzachar
     
  • scripts/kconfig/nconf.gui.c:23: warning: no previous prototype for 'set_normal_colors'
    scripts/kconfig/nconf.gui.c:68: warning: no previous prototype for 'normal_color_theme'
    scripts/kconfig/nconf.gui.c:100: warning: no previous prototype for 'no_colors_theme'
    scripts/kconfig/nconf.c:455: warning: no previous prototype for 'process_special_keys'
    scripts/kconfig/nconf.c:487: warning: no previous prototype for 'get_next_hot'
    scripts/kconfig/nconf.c:506: warning: no previous prototype for 'canbhot'
    scripts/kconfig/nconf.c:514: warning: no previous prototype for 'is_hot'
    scripts/kconfig/nconf.c:522: warning: no previous prototype for 'make_hot'
    scripts/kconfig/nconf.c:582: warning: no previous prototype for 'item_make'
    scripts/kconfig/nconf.c:626: warning: no previous prototype for 'item_add_str'
    scripts/kconfig/nconf.c:656: warning: no previous prototype for 'item_tag'
    scripts/kconfig/nconf.c:668: warning: no previous prototype for 'curses_item_index'
    scripts/kconfig/nconf.c:673: warning: no previous prototype for 'item_data'
    scripts/kconfig/nconf.c:684: warning: no previous prototype for 'item_is_tag'
    scripts/kconfig/nconf.c:691: warning: no previous prototype for 'set_config_filename'

    Signed-off-by: Michal Marek

    Michal Marek
     
  • This patch was inspired by the kernel projects page, where an ncurses
    replacement for menuconfig was mentioned (by Sam Ravnborg).

    Building on menuconfig, this patch implements a more modern look
    interface using ncurses and ncurses' satellite libraries (menu, panel,
    form). The implementation does not depend on lxdialog, which is
    currently distributed with the kernel.

    Signed-off-by: Nir Tzachar
    Signed-off-by: Michal Marek

    nir.tzachar@gmail.com
     
  • It is the last place when the file is read, so close it.

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Michal Marek

    Alexander Beregalov
     
  • Help text for certain config options is very extensive (the text
    includes the names of all other options the option in question depends
    on). Long lines are not wrapped, making it impossible to see the list
    without scrolling horizontally.

    This patch adds some logic which wraps help screen lines at word
    boundaries to prevent truncating.

    Tested by running

    ARCH=powerpc make menuconfig O=/tmp/build

    which shows that the long lines are now wrapped, and

    ARCH=powerpc make xconfig O=/tmp/build

    to demonstrate that it still compiles and operates as expected.

    Signed-off-by: Vadim Bendebury
    Signed-off-by: Michal Marek

    Vadim Bendebury (вб)
     
  • This patch adds support for decoding ARM oopses to scripts/decodecode.
    The following things are handled:

    - ARCH and CROSS_COMPILE environment variables are respected.

    - The Code: in x86 oopses is in bytes, while it is in either words (4
    bytes) or halfwords for ARM.

    - Some versions of ARM objdump refuse to disassemble instructions
    generated by literal constants (".word 0x..."). The workaround is to
    strip the object file first.

    - The faulting instruction is marked (liked so) in ARM, but
    in x86.

    - ARM mnemonics may include characters such as [] which need to be
    escaped before being passed to sed for the "
    Signed-off-by: Michal Marek

    Rabin Vincent
     
  • This adds CROSS_COMPILE as a kconfig string so you can store it in
    .config. Then you can use plain "make" in the configured kernel build
    directory to do the right cross compilation without setting the
    command-line or environment variable every time.

    With this, you can set up different build directories for different kernel
    configurations, whether native or cross-builds, and then use the simple:

    make -C /build/dir M=module-source-dir

    idiom to build modules for any given target kernel, indicating which one
    by nothing but the build directory chosen.

    I tried a version that defaults the string with env="CROSS_COMPILE" so
    that in a "make oldconfig" with CROSS_COMPILE in the environment you can
    just hit return to store the way you're building it. But the kconfig
    prompt for strings doesn't give you any way to say you want an empty
    string instead of the default, so I punted that.

    Signed-off-by: Roland McGrath
    Cc: Sam Ravnborg
    Cc: Anibal Monsalve Salazar
    Cc: Steven Rostedt
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Roland McGrath
     
  • This patch fixes the link error "built-in.o: no such file or directory".
    The problem happens if "dirx/Makefile" contains only "obj-m += diry/
    dirz/" and the empty "dirx/built-in.o" is missing. Adding $(subdir-m)
    into check for builtin-target fixes this error.

    Signed-off-by: Jiafu He
    Signed-off-by: Michal Marek

    Jiafu He
     

30 Jan, 2010

8 commits

  • Linus Torvalds
     
  • asic3 also needs tmio_core or otherwise will fail to build.

    Signed-off-by: Dmitry Artamonow
    Signed-off-by: Samuel Ortiz

    Dmitry Artamonow
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: update multi-touch protocol documentation
    Input: add the ABS_MT_PRESSURE event
    Input: winbond-cir - remove dmesg spam
    Input: lifebook - add another Lifebook DMI signature
    Input: ad7879 - support auxiliary GPIOs via gpiolib

    Linus Torvalds
     
  • After memory pressure has forced it to dip into the reserves, 2.6.32's
    5f8dcc21211a3d4e3a7a5ca366b469fb88117f61 "page-allocator: split per-cpu
    list into one-list-per-migrate-type" has been returning MIGRATE_RESERVE
    pages to the MIGRATE_MOVABLE free_list: in some sense depleting reserves.

    Fix that in the most straightforward way (which, considering the overheads
    of alternative approaches, is Mel's preference): the right migratetype is
    already in page_private(page), but free_pcppages_bulk() wasn't using it.

    How did this bug show up? As a 20% slowdown in my tmpfs loop kbuild
    swapping tests, on PowerMac G5 with SLUB allocator. Bisecting to that
    commit was easy, but explaining the magnitude of the slowdown not easy.

    The same effect appears, but much less markedly, with SLAB, and even
    less markedly on other machines (the PowerMac divides into fewer zones
    than x86, I think that may be a factor). We guess that lumpy reclaim
    of short-lived high-order pages is implicated in some way, and probably
    this bug has been tickling a poor decision somewhere in page reclaim.

    But instrumentation hasn't told me much, I've run out of time and
    imagination to determine exactly what's going on, and shouldn't hold up
    the fix any longer: it's valid, and might even fix other misbehaviours.

    Signed-off-by: Hugh Dickins
    Acked-by: Mel Gorman
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: check total number of devices when removing missing
    Btrfs: check return value of open_bdev_exclusive properly
    Btrfs: do not mark the chunk as readonly if in degraded mode
    Btrfs: run orphan cleanup on default fs root
    Btrfs: fix a memory leak in btrfs_init_acl
    Btrfs: Use correct values when updating inode i_size on fallocate
    Btrfs: remove tree_search() in extent_map.c
    Btrfs: Add mount -o compress-force

    Linus Torvalds
     
  • Here are the sparc bits to remove TIF_ABI_PENDING now that
    set_personality() is called at the appropriate place in exec.

    Signed-off-by: David S. Miller
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    David Miller
     
  • Now that the previous commit made it possible to do the personality
    setting at the point of no return, we do just that for ELF binaries.
    And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
    away, and we can just make SET_PERSONALITY() just do the obvious thing
    for a 32-bit compat process.

    Everything becomes much more straightforward this way.

    Signed-off-by: H. Peter Anvin
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • 'flush_old_exec()' is the point of no return when doing an execve(), and
    it is pretty badly misnamed. It doesn't just flush the old executable
    environment, it also starts up the new one.

    Which is very inconvenient for things like setting up the new
    personality, because we want the new personality to affect the starting
    of the new environment, but at the same time we do _not_ want the new
    personality to take effect if flushing the old one fails.

    As a result, the x86-64 '32-bit' personality is actually done using this
    insane "I'm going to change the ABI, but I haven't done it yet" bit
    (TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
    personality, but just the "pending" bit, so that "flush_thread()" can do
    the actual personality magic.

    This patch in no way changes any of that insanity, but it does split the
    'flush_old_exec()' function up into a preparatory part that can fail
    (still called flush_old_exec()), and a new part that will actually set
    up the new exec environment (setup_new_exec()). All callers are changed
    to trivially comply with the new world order.

    Signed-off-by: H. Peter Anvin
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

29 Jan, 2010

18 commits