04 May, 2009

3 commits

  • mips emit the following debug sections:
    .mdebug* and .pdr

    They were included in the check for non-allocatable section
    and caused modpost to warn.

    Manuel Lauss suggested to fix this by adding the relevant
    sections to the list of sections we do not check.

    Signed-off-by: Sam Ravnborg
    Reported-by: Manuel Lauss

    Sam Ravnborg
     
  • Jean reported that he saw one warning for each module like the one below:
    WARNING: arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.o (.comment.SUSE.OPTs): unexpected non-allocatable section.

    The warning appeared with the improved version of the
    check of the flags in the sections.

    That check already ignored sections named ".comment" - but SUSE store
    additional info in the comment section and has named it in a SUSE
    specific way. Therefore modpost failed to ignore the section.

    The fix is to extend the pattern so we ignore all sections
    that start with the name ".comment.".

    Signed-off-by: Sam Ravnborg
    Reported-by: Jean Delvare
    Tested-by: Jean Delvare

    Sam Ravnborg
     
  • The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
    unexpected non-allocatable section warnings when cross-compiling
    for an architecture with a different endianness.

    Fix endianness of all the fields in the ELF header and
    section headers, not just some of them so we are not
    hit by this anohter time.

    Signed-off-by: Anders Kaseorg
    Reported-by: Sean MacLennan
    Tested-by: Sean MacLennan
    Signed-off-by: Sam Ravnborg

    Anders Kaseorg
     

03 May, 2009

3 commits

  • The powerpc kernel always requires an Open Firmware like device tree
    to supply device information. On systems without OF, this comes from
    a flattened device tree blob. This blob is usually generated by dtc,
    a tool which compiles a text description of the device tree into the
    flattened format used by the kernel. Sometimes, the bootwrapper makes
    small changes to the pre-compiled device tree blob (e.g. filling in
    the size of RAM). To do this it uses the libfdt library.

    Because these are only used on powerpc, the code for both these tools
    is included under arch/powerpc/boot (these were imported and are
    periodically updated from the upstream dtc tree).

    However, the microblaze architecture, currently being prepared for
    merging to mainline also uses dtc to produce device tree blobs. A few
    other archs have also mentioned some interest in using dtc.
    Therefore, this patch moves dtc and libfdt from arch/powerpc into
    scripts, where it can be used by any architecture.

    The vast bulk of this patch is a literal move, the rest is adjusting
    the various Makefiles to use dtc and libfdt correctly from their new
    locations.

    Signed-off-by: David Gibson
    Signed-off-by: Linus Torvalds

    David Gibson
     
  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
    kbuild: fix comment in modpost.c
    kbuild: fix scripts/setlocalversion with git
    kbuild: fix Module.markers permission error under cygwin
    docs: also clean index.html
    kbuild: remove a tag file before it is regenerated
    kbuild: "make prepare" should be "make modules_prepare"
    kbuild: clean Module.markers and modules.order for out-of-tree modules
    avr32: drop unused CLEAN_FILES

    Linus Torvalds
     
  • scripts/kernel-doc can (incorrectly) delete struct members that are
    surrounded by /* ... */ /* ... */ if there is a /*
    private: */ comment in there somewhere also.

    Fix that by making the "/* private:" only allow whitespace between /* and
    "private:", not anything/everything in the world.

    This fixes some erroneous kernel-doc warnings that popped up while
    processing include/linux/usb/composite.h.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

01 May, 2009

5 commits

  • When you put
    .section ".foo"
    in an assembly file instead of
    .section "foo", "ax"
    , one of the possible symptoms is that modpost will see an
    ld-generated section name ".foo.1" in section_rel() or section_rela().
    But this heuristic has two problems: it will miss a bad section that
    has no relocations, and it will incorrectly flag many gcc-generated
    sections as bad when compiling with -ffunction-sections
    -fdata-sections.

    On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
    WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.

    So instead of checking whether the section name matches a particular
    pattern, we directly check for a missing SHF_ALLOC in the section
    flags.

    Signed-off-by: Anders Kaseorg
    Tested-by: Ralf Baechle
    Signed-off-by: Sam Ravnborg

    Anders Kaseorg
     
  • There is some confusion on naming of the head section.
    Correct naming is .head.text.

    Fix comment so we use correct naming.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • When using trees like wireless-testing, which have untagged tags,
    scripts/setlocalversion does not display any git indication for
    localversion.

    This patch fixes it: If git is available, but no usable tag is found,
    it uses -g${head}. It skips the detection of unanottated tags via
    git name-rev.

    Signed-off-by: Nico Schottelius
    Signed-off-by: Sam Ravnborg

    Nico Schottelius
     
  • While building the kernel, we end-up calling modpost with -K and -M
    options for the same file (Modules.markers). This is resulting in
    modpost's main function calling read_markers() and then write_markers() on
    the same file.

    We then have read_markers() mmap'ing the file, and writer_markers()
    opening that same file for writing.

    The issue is that read_markers() exits without munmap'ing the file and is
    as a matter holding a reference on Modules.markers. When write_markers()
    is opening that very same file for writing, we still have a reference on
    it and cygwin (Windows?) is then making fopen() fail with EPERM.

    Calling release_file() before exiting read_markers() clears that reference
    (and memory leak) and fopen() then succeeds.

    Tested on both cygwin (1.3.22) and Linux. Also ran modpost within
    valgrind on Linux to make sure that the munmap'ed file was not accessed
    after read_markers()

    Signed-off-by: Cedric Hombourger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Cedric Hombourger
     
  • If a tag file is not removed before it is regenerated, the newly
    generated data is appended to the old, which preserves stale data and
    makes the tag file grow over time.

    Signed-off-by: Matt Kraai
    Signed-off-by: Sam Ravnborg

    Matt Kraai
     

28 Apr, 2009

1 commit

  • The old refok sections

    .text.init.refok
    .data.init.refok
    .exit.text.refok

    have been deprecated since commit
    312b1485fb509c9bc32eda28ad29537896658cb8. After the other patches in
    this patch series nothing is put in these sections, so clean things up
    by eliminating all the remaining references to them.

    Signed-off-by: Tim Abbott
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     

19 Apr, 2009

1 commit

  • 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: Sam Ravnborg
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner

    Sam Ravnborg
     

14 Apr, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    docbook: make cleandocs
    kbuild: fix spurious initramfs rebuild
    Documentation: explain the difference between __bitwise and __bitwise__
    kbuild: make it possible for the linker to discard local symbols from vmlinux
    kbuild: remove pointless strdup() on arguments passed to new_module() in modpost
    kbuild: fix a few typos in top-level Makefile
    kbuild: introduce destination-y for exported headers
    kbuild: use git svn instead of git-svn in setlocalversion
    kconfig: fix update-po-config to accect backslash in input
    kbuild: fix option processing for -I in headerdep

    Linus Torvalds
     

13 Apr, 2009

1 commit

  • * 'gm_20090410' of git://repo.or.cz/linux-2.6/trivial-mods:
    MAINTAINERS - Update MN10300 patterns
    MAINTAINERS - Update frv arch patterns
    scripts/get_maintainer.pl - Allow multiple files on command line
    MAINTAINERS - Update Freescale sound patterns
    MAINTAINERS - Add additional patterns
    MAINTAINERS - Add missing "/" to some pattern directories
    MAINTAINERS - Update DRIVER CORE patterns
    MAINTAINERS - Update M68K patterns
    MAINTAINERS - Coalesce sections "DVB" and "Video for Linux"
    MAINTAINERS - Remove cyblafb frame buffer no longer in tree
    MAINTAINERS - Remove x86/Voyager no longer in tree
    MAINTAINERS - Update FPU Emulator contact address and web page
    MAINTAINERS - i2c_tiny_usb T: should be W:
    MAINTAINERS - Add Linus Torvalds' git
    MAINTAINERS - standardize "T: git urls"
    MAINTAINERS - Remove HP Fibre Channel HBA no longer in tree
    MAINTAINERS - Standardize style
    MAINTAINERS - Add file patterns
    Add scripts/get_maintainer.pl

    Acked-by: Pavel Machek
    Acked-by: Andrew Morton

    Linus Torvalds
     

11 Apr, 2009

9 commits

  • When gen_initramfs_list is used to generate make dependencies, it
    includes symbolic links, for which make tracks the link target. Any
    change to that target will cause an initramfs rebuild, even if the
    symlink points to something outside of the initramfs directory.

    If the target happens to be /tmp, the rebuild occurs for each kernel
    build, since gen_initramfs_list uses mktemp...

    Proposed way to fix it is to omit symbolic links from generated
    dependencies, but this has a small drawback: changing perm/owner on a
    symlink will go unnoticed.

    Signed-off-by: Maxime Bizon
    Signed-off-by: Sam Ravnborg

    Maxime Bizon
     
  • new_module() itself already calls strdup() on its modname parameter.

    Signed-off-by: Jan Beulich
    Signed-off-by: Sam Ravnborg

    Jan Beulich
     
  • xtensa and arm have asked for a possibility to export headers
    and locate them in a specific directory when exported.
    Introduce destiantion-y to support this.

    This patch in additiona adds some limited
    documentation for the variables used for exported headers.

    Signed-off-by: Sam Ravnborg
    Cc: Oskar Schirmer
    Cc: Mikael Starvik

    Sam Ravnborg
     
  • Use the correct git syntax instead of the deprecated git-.

    Signed-off-by: Peter Korsgaard
    Signed-off-by: Sam Ravnborg

    Peter Korsgaard
     
  • Massimo Maiurana reported (slightly edited):

    =====
    In latest 2.6.29 "make update-po-config" fails at msguniq invocation
    with an "invalid control sequence" error.
    The offending string is the following, and it's located in
    drivers/staging/panel/Kconfig:72:

    "'\e[L' which are specific to the LCD, and a few ANSI codes. The"

    looks to me like gettext expects strings in printf format, so in
    this case it thinks "\e" is a control sequence but doesn't recognise
    it as a valid one.

    A valid solution would be to tell kxgettext to automatically
    escape this kind of strings in the */config.pot he produces, so that
    msguniq would not complain.
    =====

    This patch implements the suggested escaping.

    Reported-by: Massimo Maiurana
    Tested-by: Massimo Maiurana
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • -I takes an argument. Without this change only a 1 is added to
    @opt_include which is not helpful.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Vegard Nossum
    Signed-off-by: Sam Ravnborg

    Uwe Kleine-König
     
  • Improve handling of "by:" signoffs
    Sorting and frequency checks are done by name/email, not
    by "by:" tag.

    Signed-off-by: Joe Perches

    Joe Perches
     
  • A script to parse file pattern information in MAINTAINERS
    and return selected information about a file or patch

    usage: scripts/get_maintainer.pl [options] patchfile
    scripts/get_maintainer.pl [options] -f file
    version: 0.14

    MAINTAINERS field selection options:
    --email => print email address(es) if any
    --git => include git "*-by:" signers in commit count order
    --git-chief-penguins => include (Linus Torvalds)
    --git-min-signatures => number of signatures required (default: 1)
    --git-max-maintainers => maximum maintainers to add (default: 5)
    --git-since => git history to use (default: 1-year-ago)
    --m => include maintainer(s) if any
    --n => include name 'Full Name '
    --l => include list(s) if any
    --s => include subscriber only list(s) if any
    --scm => print SCM tree(s) if any
    --status => print status if any
    --subsystem => print subsystem name if any
    --web => print website(s) if any

    Output type options:
    --separator [, ] => separator for multiple entries on 1 line
    --multiline => print 1 entry per line

    Default options:
    [--email --git --m --n --l --multiline]

    Other options:
    --version => show version
    --help => show this help information

    Signed-off-by: Joe Perches
    Acked-by: Pavel Machek

    Joe Perches
     
  • * git://git.infradead.org/~dwmw2/firmware-2.6:
    qla1280: Fix off-by-some error in firmware loading.
    Add README.AddingFirmware file. Basically telling people not to.
    firmware: Remove newly-added slicoss and sxg firmware images
    firmware/WHENCE: Add missing origin information for Ambassador atmsar11.fw
    ALSA: wavefront - Always use request_firmware()
    Remove fdump tool for av7110 firmware
    firmware: convert av7110 driver to request_firmware()
    Partially revert "V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card"
    Revert "fix modules_install via NFS"

    Add-add conflicts in firmware/WHENCE fixed manually

    Linus Torvalds
     

08 Apr, 2009

1 commit

  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
    branch tracer: Fix for enabling branch profiling makes sparse unusable
    ftrace: Correct a text align for event format output
    Update /debug/tracing/README
    tracing/ftrace: alloc the started cpumask for the trace file
    tracing, x86: remove duplicated #include
    ftrace: Add check of sched_stopped for probe_sched_wakeup
    function-graph: add proper initialization for init task
    tracing/ftrace: fix missing include string.h
    tracing: fix incorrect return type of ns2usecs()
    tracing: remove CALLER_ADDR2 from wakeup tracer
    blktrace: fix pdu_len when tracing packet command requests
    blktrace: small cleanup in blk_msg_write()
    blktrace: NUL-terminate user space messages
    tracing: move scripts/trace/power.pl to scripts/tracing/power.pl

    Linus Torvalds
     

07 Apr, 2009

1 commit

  • This reverts commit 8b249b6856f16f09b0e5b79ce5f4d435e439b9d6.

    This 'fix' is not necessary; we just need to undo the damage caused
    accidentally by Igor/Mauro in 4b29631db33292d416dc395c56122ea865e7635c
    ("V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card")

    Signed-off-by: David Woodhouse

    David Woodhouse
     

06 Apr, 2009

2 commits

  • * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (413 commits)
    tracing, net: fix net tree and tracing tree merge interaction
    tracing, powerpc: fix powerpc tree and tracing tree interaction
    ring-buffer: do not remove reader page from list on ring buffer free
    function-graph: allow unregistering twice
    trace: make argument 'mem' of trace_seq_putmem() const
    tracing: add missing 'extern' keywords to trace_output.h
    tracing: provide trace_seq_reserve()
    blktrace: print out BLK_TN_MESSAGE properly
    blktrace: extract duplidate code
    blktrace: fix memory leak when freeing struct blk_io_trace
    blktrace: fix blk_probes_ref chaos
    blktrace: make classic output more classic
    blktrace: fix off-by-one bug
    blktrace: fix the original blktrace
    blktrace: fix a race when creating blk_tree_root in debugfs
    blktrace: fix timestamp in binary output
    tracing, Text Edit Lock: cleanup
    tracing: filter fix for TRACE_EVENT_FORMAT events
    ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
    x86: kretprobe-booster interrupt emulation code fix
    ...

    Fix up trivial conflicts in
    arch/parisc/include/asm/ftrace.h
    include/linux/memory.h
    kernel/extable.c
    kernel/module.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param:
    module: use strstarts()
    strstarts: helper function for !strncmp(str, prefix, strlen(prefix))
    arm: allow usage of string functions in linux/string.h
    module: don't use stop_machine on module load
    module: create a request_module_nowait()
    module: include other structures in module version check
    module: remove the SHF_ALLOC flag on the __versions section.
    module: clarify the force-loading taint message.
    module: Export symbols needed for Ksplice
    Ksplice: Add functions for walking kallsyms symbols
    module: remove module_text_address()
    module: __module_address
    module: Make find_symbol return a struct kernel_symbol
    kernel/module.c: fix an unused goto label
    param: fix charp parameters set via sysfs

    Fix trivial conflicts in kernel/extable.c manually.

    Linus Torvalds
     

02 Apr, 2009

2 commits


01 Apr, 2009

1 commit


31 Mar, 2009

1 commit

  • With CONFIG_MODVERSIONS, we version 'struct module' using a dummy
    export, but other things matter too:

    1) 'struct modversion_info' determines the layout of the __versions section,
    2) 'struct kernel_param' determines the layout of the __params section,
    3) 'struct kernel_symbol' determines __ksymtab*.
    4) 'struct marker' determines __markers.
    5) 'struct tracepoint' determines __tracepoints.

    So we rename 'struct_module' to 'module_layout' and include these in
    the signature. Now it's general we can add others later on without
    confusion.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

28 Mar, 2009

1 commit


27 Mar, 2009

2 commits

  • …el/git/tip/linux-2.6-tip

    * 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (50 commits)
    x86: headers cleanup - setup.h
    emu101k1.h: fix duplicate include of <linux/types.h>
    compiler-gcc4: conditionalize #error on __KERNEL__
    remove __KERNEL_STRICT_NAMES
    make netfilter use strict integer types
    make drm headers use strict integer types
    make MTD headers use strict integer types
    make most exported headers use strict integer types
    make exported headers use strict posix types
    unconditionally include asm/types.h from linux/types.h
    make linux/types.h as assembly safe
    Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
    headers_check fix cleanup: linux/reiserfs_fs.h
    headers_check fix cleanup: linux/nubus.h
    headers_check fix cleanup: linux/coda_psdev.h
    headers_check fix: x86, setup.h
    headers_check fix: x86, prctl.h
    headers_check fix: linux/reinserfs_fs.h
    headers_check fix: linux/socket.h
    headers_check fix: linux/nubus.h
    ...

    Manually fix trivial conflicts in:
    include/linux/netfilter/xt_limit.h
    include/linux/netfilter/xt_statistic.h

    Linus Torvalds
     
  • Ingo Molnar
     

25 Mar, 2009

2 commits

  • This patch combines Greg Bank's dprintk() work with the existing dynamic
    printk patchset, we are now calling it 'dynamic debug'.

    The new feature of this patchset is a richer /debugfs control file interface,
    (an example output from my system is at the bottom), which allows fined grained
    control over the the debug output. The output can be controlled by function,
    file, module, format string, and line number.

    for example, enabled all debug messages in module 'nf_conntrack':

    echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control

    to disable them:

    echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control

    A further explanation can be found in the documentation patch.

    Signed-off-by: Greg Banks
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron
     
  • Now platform_device is being widely used on SoC processors where the
    peripherals are attached to the system bus, which is simple enough.

    However, silicon IPs for these SoCs are usually shared heavily across
    a family of processors, even products from different companies. This
    makes the original simple driver name based matching insufficient, or
    simply not straight-forward.

    Introduce a module id table for platform devices, and makes it clear
    that a platform driver is able to support some shared IP and handle
    slight differences across different platforms (by 'driver_data').
    Module alias is handled automatically when a MODULE_DEVICE_TABLE()
    is defined.

    To not disturb the current platform drivers too much, the matched id
    entry is recorded and can be retrieved by platform_get_device_id().

    Signed-off-by: Eric Miao
    Cc: Kay Sievers
    Cc: Ben Dooks
    Signed-off-by: Greg Kroah-Hartman

    Eric Miao
     

16 Mar, 2009

2 commits

  • 'make randconfig' uses glibc's rand function, and the seed of
    that PRNG is set via:

    srand(time(NULL));

    But 'time()' only increases once every second - freezing the
    randconfig result within a single second.

    My Nehalem testbox does randconfig much faster than 1 second
    and i have a few scripts that do 'randconfig until condition X'
    loops.

    Those scripts currently waste a lot of CPU time due to randconfig
    changing its seed only once per second currently.

    Change the seed to be micrseconds based. (I checked the statistical
    spread of the seed - the now.tv_sec*now.tv_usec multiplication
    there further improves it.)

    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    [sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven]
    Signed-off-by: Sam Ravnborg

    Ingo Molnar
     
  • Ingo Molnar reported that 'make randconfig' was not covering
    choice blocks properly, resulting in certain config options
    being left out of randconfig testing altogether.

    With the following patch we:
    - properly randomize choice value for normal choice blocks
    - properly randomize for multi choice blocks
    - added several comments to explain what is going on

    The root cause of the bug was that SYMBOL_VALID was set on the
    symbol representing the choice block so clearing this did
    the trick initially.
    But testign revealed a few more issues that is now fixed.

    Reported-by: Ingo Molnar
    Cc: Ingo Molnar
    Cc: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

14 Mar, 2009

1 commit

  • Impact: bugfix, output more reliable symbol lookup result

    Debug tools(dump_stack(), ftrace...) are like to print out symbols.
    But it is always print out the first aliased symbol.(Aliased symbols
    are symbols with the same address), and the first aliased symbol is
    sometime not proper.

    # echo function_graph > current_tracer
    # cat trace
    ......
    1) 1.923 us | select_nohz_load_balancer();
    1) + 76.692 us | }
    1) | default_idle() {
    1) ==========> | __irqentry_text_start() {
    1) 0.000 us | native_apic_mem_write();
    1) | irq_enter() {
    1) 0.000 us | idle_cpu();
    1) | tick_check_idle() {
    1) 0.000 us | tick_check_oneshot_broadcast();
    1) | tick_nohz_stop_idle() {
    ......

    It's very embarrassing, it ouputs "__irqentry_text_start()",
    actually, it should output "smp_apic_timer_interrupt()".
    (these two symbol are the same address, but "__irqentry_text_start"
    is deemed to the first aliased symbol by scripts/kallsyms)

    This patch puts symbols like "__irqentry_text_start" to the second
    aliased symbols. And a more proper symbol name becomes the first.

    Aliased symbols mostly come from linker script. The solution is
    guessing "is this symbol defined in linker script", the symbols
    defined in linker script will not become the first aliased symbol.

    And if symbols are found to be equal in this "linker script provided"
    criteria, symbols are sorted by the number of prefix underscores.

    Signed-off-by: Lai Jiangshan
    Acked-by: Sam Ravnborg
    Reviewed-by: Paulo Marques
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan