26 May, 2011

3 commits

  • * 'kconfig-for-40' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    xconfig: merge code path to conf_write()
    kconfig: do not record timestamp in .config
    gconfig: Hide unused left treeview when start up the interface
    gconfig: enable rules hint for main treeviews
    MAINTAINERS: Update KCONFIG entry
    kconfig-language: add to hints
    kconfig: Document the new "visible if" syntax
    kconfig: quiet commands when V=0
    kconfig: change update-po-config to reflect new layout of arch/um
    kconfig: make update-po-config work in KBUILD_OUTPUT
    kconfig: rearrange clean-files
    kconfig: change gconf to modify hostprogs-y like nconf and mconf
    kconfig: change qconf to modify hostprogs-y like nconf and mconf
    kconfig: only build kxgettext when needed
    nconfig: Silence unused return values from wattrset
    kconfig: Do not record timestamp in auto.conf and autoconf.h
    kconfig: get rid of unused flags
    kconfig: allow multiple inclusion of the same file
    kconfig: Avoid buffer underrun in choice input

    Linus Torvalds
     
  • * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    export_report: use warn() to issue WARNING, so they go to stderr
    export_report: sort SECTION 2 output
    export_report: do collectcfiles work in perl itself
    kbuild: make versioncheck work in KBUILD_OUTDIR
    kbuild: make includecheck work in KBUILD_OUTDIR
    kbuild: make headerdep work in KBUILD_OUTDIR
    kbuild: add targets to PHONY
    kbuild: don't warn about include/linux/version.h not including itself
    eradicate bashisms in scripts/patch-kernel

    Linus Torvalds
     
  • * 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    kbuild: Create a kernel-headers RPM
    rpm-pkg: Fix when current directory is a symlink
    Replace '-' in kernel version with '_'

    Linus Torvalds
     

25 May, 2011

6 commits

  • Currently, printk lines with a only KERN_PREFIX and a quoted string
    without a comma or close paren that exceed 80 columns are flagged with a
    warning.

    ie:
    printk(KERN_WARNING "some long string that extends beond 80 cols..."
    "and is continued on another line\n");

    Allow this form instead of emitting a warning.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Many module or file local logging functions use specific prefixes other
    than pr|dev|netdev. Allow all forms like foo_printk and foo_err to be
    longer than 80 columns.

    Also allow MODULE_ declarations to be longer than 80 columns.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a warning for unterminated quoted strings with line continuations as
    these frequently add unwanted whitespace.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Avoid to have multiple path saving the config. This fixes an error check
    miss when the window is being closed and the user requested the config
    to be written.

    Reported-by: Hiromu Yakura
    Pointed-out-by: Michal Marek
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o
    scripts/kallsyms.c: fix potential segfault
    scripts/gen_initramfs_list.sh: Convert to a /bin/sh script
    kbuild: Fix GNU make v3.80 compatibility
    kbuild: Fix passing -Wno-* options to gcc 4.4+
    kbuild: move scripts/basic/docproc.c to scripts/docproc.c
    kbuild: Fix Makefile.asm-generic for um
    kbuild: Allow to combine multiple W= levels
    kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0
    Fix handling of backlash character in LINUX_COMPILE_BY name
    kbuild: asm-generic support
    kbuild: implement several W= levels
    kbuild: Fix build with binutils <= 2.19
    initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries
    kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macros
    kbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macros
    kbuild: Use the deterministic mode of ar
    kbuild: Call gzip with -n
    kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile
    Kconfig: improve KALLSYMS_ALL documentation

    Fix up trivial conflict in Makefile

    Linus Torvalds
     
  • To compile binaries which depend on new kernel interfaces, we need a
    kernel-headers RPM

    Signed-off-by: Arun Sharma
    Signed-off-by: Michal Marek

    Arun Sharma
     

24 May, 2011

8 commits

  • The better fix would be to stop using the parent directory (principle of
    least surprise), but as long as we use it, use it consistently.

    Signed-off-by: Michal Marek

    Michal Marek
     
  • Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • Also count CONFIG_MODVERSIONS warnings, and print a NOTE at start of
    SECTION 2 if any were issued. Section 2 will be empty if the build is
    lacking this CONFIG_ item, and user may have missed the warnings, as
    they're off screen.

    Signed-off-by: Jim Cromie
    Signed-off-by: Michal Marek

    Jim Cromie
     
  • Sort SECTION 2 modules by name. Within those module listings, sort
    the symbol providers by name, and remove the count, as it is
    misleading; its the kernel-wide count of uses of that symbol, not the
    count pertaining to the module being outlined. (this can be seen by
    grepping the output for a single symbol). The count is still used to
    sort the symbols.

    Signed-off-by: Jim Cromie
    Signed-off-by: Michal Marek

    Jim Cromie
     
  • Avoid spawning a shell pipeline doing cat, grep, sed, and do it all
    inside perl. The globbing construct works at least as far back
    as 5.8.9

    Note that this is not just an optimization; the sed command
    in the pipeline was unterminated, due to lack of escape on the
    end-of-line (\$) in the regex, resulting in this:

    $ perl ../linux-2.6/scripts/export_report.pl > /dev/null
    sed: -e expression #1, char 5: unterminated `s' command
    sh: .mod.c/: not found

    Comments on an earlier patch sought an all-perl implementation.

    Signed-off-by: Jim Cromie
    cc: Michal Marek ,
    cc: linux-kbuild@vger.kernel.org
    cc: Arnaud Lacombe lacombar@gmail.com
    cc: Stephen Hemminger shemminger@vyatta.com
    Signed-off-by: Michal Marek

    Jim Cromie
     
  • When the gconfig program starts in full mode view, it shows the
    left treeview which belongs to the 'split mode view'. The patch
    fix this visual issue.

    Signed-off-by: Eduardo Silva
    Signed-off-by: Michal Marek

    Eduardo Silva
     
  • Due to the large amount of rows in the treeviews, is difficult to
    match columns with rows, setting the rules hint to 'true' allows the
    treeview to alternate background colors in the rows making the data
    more readable.

    Signed-off-by: Eduardo Silva
    Tested-by: Randy Dunlap
    Signed-off-by: Michal Marek

    Eduardo Silva
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

21 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     

20 May, 2011

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (107 commits)
    perf stat: Add more cache-miss percentage printouts
    perf stat: Add -d -d and -d -d -d options to show more CPU events
    ftrace/kbuild: Add recordmcount files to force full build
    ftrace: Add self-tests for multiple function trace users
    ftrace: Modify ftrace_set_filter/notrace to take ops
    ftrace: Allow dynamically allocated function tracers
    ftrace: Implement separate user function filtering
    ftrace: Free hash with call_rcu_sched()
    ftrace: Have global_ops store the functions that are to be traced
    ftrace: Add ops parameter to ftrace_startup/shutdown functions
    ftrace: Add enabled_functions file
    ftrace: Use counters to enable functions to trace
    ftrace: Separate hash allocation and assignment
    ftrace: Create a global_ops to hold the filter and notrace hashes
    ftrace: Use hash instead for FTRACE_FL_FILTER
    ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions
    perf bench, x86: Add alternatives-asm.h wrapper
    x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit
    x86, mem: memset_64.S: Optimize memset by enhanced REP MOVSB/STOSB
    x86, mem: memmove_64.S: Optimize memmove by enhanced REP MOVSB/STOSB
    ...

    Linus Torvalds
     

19 May, 2011

4 commits

  • Modifications to recordmcount must be performed on all object
    files to stay consistent with what the kernel code may expect.
    Add the recordmcount files to the main dependencies to make sure
    any change to them causes a full recompile.

    Signed-off-by: Michal Marek
    Link: http://lkml.kernel.org/r/20110517133646.GP13293@sepie.suse.cz
    Signed-off-by: Steven Rostedt

    Michal Marek
     
  • Binutils 2.18.50 made a backwards-incompatible change in the way it
    writes ELF objects with over 65280 sections, to improve conformance
    with the ELF specification and interoperability with other ELF tools.
    Specifically, it no longer adds 256 to section indices SHN_LORESERVE
    and higher to skip over the reserved range SHN_LORESERVE through
    SHN_HIRESERVE; those values are only considered special in the
    st_shndx field, and not in other places where section indices are
    stored. See:

    http://sourceware.org/bugzilla/show_bug.cgi?id=5900
    http://groups.google.com/group/generic-abi/browse_thread/thread/e8bb63714b072e67/6c63738f12cc8a17

    Signed-off-by: Anders Kaseorg
    Signed-off-by: Rusty Russell

    Anders Kaseorg
     
  • This patch places every exported symbol in its own section
    (i.e. "___ksymtab+printk"). Thus the linker will use its SORT() directive
    to sort and finally merge all symbol in the right and final section
    (i.e. "__ksymtab").

    The symbol prefixed archs use an underscore as prefix for symbols.
    To avoid collision we use a different character to create the temporary
    section names.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Rusty Russell (folded in '+' fixup)
    Tested-by: Dirk Behme

    Alessio Igor Bogani
     
  • Haavard's e-mail address at Atmel is no longer valid.

    Signed-off-by: Jean Delvare
    Acked-by: Havard Skinnemoen
    Signed-off-by: Jiri Kosina

    Jean Delvare
     

17 May, 2011

13 commits

  • …wireless-next-2.6 into for-davem

    Conflicts:
    drivers/net/wireless/iwlwifi/iwl-agn-tx.c
    net/mac80211/sta_info.h

    John W. Linville
     
  • Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
    at compile time and not in ftrace_call_adjust at run time.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Steven Rostedt

    Martin Schwidefsky
     
  • Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
    at compile time and not in ftrace_call_adjust at run time.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Steven Rostedt

    Martin Schwidefsky
     
  • Introduce mcount_adjust{,_32,_64} to the C implementation of
    recordmcount analog to $mcount_adjust in the perl script.
    The adjustment is added to the address of the relocations
    against the mcount symbol. If this adjustment is done by
    recordmcount at compile time the ftrace_call_adjust function
    can be turned into a nop.

    Cc: John Reiser
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Steven Rostedt

    Martin Schwidefsky
     
  • The code to get the symbol, string, and relp pointers in the two functions
    sift_rel_mcount() and nop_mcount() are identical and also non-trivial.
    Moving this duplicate code into a single helper function makes the code
    easier to read and more maintainable.

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023739.723658553@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The code in sift_rel_mcount() and nop_mcount() to get the mcount symbol
    number is identical. Replace the two locations with a call to a function
    that does the work.

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023739.488093407@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When mcount is called in a section that ftrace will not modify it into
    a nop, we want to warn about this. But not warn about this always. Now
    if the user builds the kernel with the option RECORDMCOUNT_WARN=1 then
    the build will warn about mcount callers that are ignored and will just
    waste execution time.

    Acked-by: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: http://lkml.kernel.org/r/20110421023738.714956282@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • There's some sections that should not have mcount recorded and should not have
    modifications to the that code. But currently they waste some time by calling
    mcount anyway (which simply returns). As the real answer should be to
    either whitelist the section or have gcc ignore it fully.

    This change adds a option to recordmcount to warn when it finds a section
    that is ignored by ftrace but still contains mcount callers. This is not on
    by default as developers may not know if the section should be completely
    ignored or added to the whitelist.

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023738.476989377@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • There are sections that are ignored by ftrace for the function tracing because
    the text is in a section that can be removed without notice. The mcount calls
    in these sections are ignored and ftrace never sees them. The downside of this
    is that the functions in these sections still call mcount. Although the mcount
    function is defined in assembly simply as a return, this added overhead is
    unnecessary.

    The solution is to convert these callers into nops at compile time.
    A better solution is to add 'notrace' to the section markers, but as new sections
    come up all the time, it would be nice that they are delt with when they
    are created.

    Later patches will deal with finding these sections and doing the proper solution.

    Thanks to H. Peter Anvin for giving me the right nops to use for x86.

    Cc: "H. Peter Anvin"
    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023738.237101176@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • PROGBITS is not enough to determine if the section should be modified
    or not. Only process sections that are marked as executable.

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023737.991485123@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The .kprobe.text section is safe to modify mcount to nop and tracing.
    Add it to the whitelist in recordmcount.c and recordmcount.pl.

    Cc: John Reiser
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/20110421023737.743350547@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The Linux style for switch statements is:

    switch (var) {
    case x:
    [...]
    break;
    }

    Not:
    switch (var) {
    case x: {
    [...]
    } break;

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023737.523968644@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The Linux ftrace subsystem style for comparing is:

    var == 1
    var > 0

    and not:

    1 == var
    0 < var

    It is considered that Linux developers are smart enough not to do the

    if (var = 1)

    mistake.

    Cc: John Reiser
    Link: http://lkml.kernel.org/r/20110421023737.290712238@goodmis.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

16 May, 2011

1 commit

  • Based on a patch by Rabin Vincent.

    Fix building with KBUILD_NOCMDDEP=1, which currently does not work
    because it does not build built-in.o with no dependencies:

    LD fs/notify/built-in.o
    ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory
    ld: cannot find fs/notify/inotify/built-in.o: No such file or directory
    ld: cannot find fs/notify/fanotify/built-in.o: No such file or directory

    Reported-and-tested-by: Rabin Vincent
    Signed-off-by: Michal Marek

    Michal Marek
     

12 May, 2011

2 commits

  • Description:
    This bug hardly appears during real kernel compiling,
    because the vmlinux symbols table is huge.

    But we can still catch it under strict condition , as follows.
    $ echo "c101b97b T do_fork" | ./scripts/kallsyms --all-symbols
    #include
    ......
    ......
    .globl kallsyms_token_table
    ALGN
    kallsyms_token_table:
    Segmentation fault (core dumped)
    $

    If symbols table is small, all entries in token_profit[0x10000] may
    decrease to 0 after several calls of compress_symbols() in optimize_result().
    In that case, find_best_token() always return 0 and
    best_table[i] is set to "\0\0" and best_table_len[i] is set to 2.

    As a result, expand_symbol(best_table[0]="\0\0", best_table_len[0]=2, buf)
    in write_src() will run in infinite recursion until stack overflows,
    causing segfault.

    This patch checks the find_best_token() return value. If all entries in
    token_profit[0x10000] become 0 according to return value, it breaks the loop
    in optimize_result().
    And expand_symbol() works well when best_table_len[i] is 0.

    Signed-off-by: Xiaochen Wang
    Acked-by: Paulo Marques
    Signed-off-by: Michal Marek

    Xiaochen Wang
     
  • Replace bashisms with POSIX-compatible shell scripting.

    Notably, de-duplicate '/' using a sed command from elsewhere in the same script
    rather than "${name//\/\///}".

    Commit by Jamey Sharp and Josh Triplett.

    Signed-off-by: Jamey Sharp
    Signed-off-by: Josh Triplett
    Cc: Andrew Morton
    Signed-off-by: Michal Marek

    Jamey Sharp
     

11 May, 2011

1 commit

  • Broadcom has released cards based on a new AMBA-based bus type. From a
    programming point of view, this new bus type differs from AMBA and does
    not use AMBA common registers. It also differs enough from SSB. We
    decided that a new bus driver is needed to keep the code clean.

    In its current form, the driver detects devices present on the bus and
    registers them in the system. It allows registering BCMA drivers for
    specified bus devices and provides them basic operations. The bus driver
    itself includes two important bus managing drivers: ChipCommon core
    driver and PCI(c) core driver. They are early used to allow correct
    initialization.

    Currently code is limited to supporting buses on PCI(e) devices, however
    the driver is designed to be used also on other hosts. The host
    abstraction layer is implemented and already used for PCI(e).

    Support for PCI(e) hosts is working and seems to be stable (access to
    80211 core was tested successfully on a few devices). We can still
    optimize it by using some fixed windows, but this can be done later
    without affecting any external code. Windows are just ranges in MMIO
    used for accessing cores on the bus.

    Cc: Greg KH
    Cc: Michael Büsch
    Cc: Larry Finger
    Cc: George Kashperko
    Cc: Arend van Spriel
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Russell King
    Cc: Arnd Bergmann
    Cc: Andy Botting
    Cc: linuxdriverproject
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Rafał Miłecki
    Signed-off-by: John W. Linville

    Rafał Miłecki