03 Feb, 2008

5 commits


02 Feb, 2008

1 commit

  • Some crazy devices in the wild have a vendor id of 0x0000. If we try to
    add a module alias with this id, we just can't do it due to a check in
    the file2alias.c file. Change the test to verify that both the vendor
    and product ids are 0x0000 to show a real "blank" module alias.

    Note, the module-init-tools package also needs to be changed to properly
    generate the depmod tables.

    Cc: Janusz
    Cc: stable
    Cc: Jon Masters
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Jan, 2008

34 commits

  • If there is a mixture of specifying sections for code in gcc
    and assembler then if the assembler code do not add
    the "ax" flags the linker will see this as two different sections
    and generate unique sections for each. ld does so by adding a dot
    and a number.
    Teach modpost to warn if a section shows up that match this
    pattern - but do this only for non-debug sections.

    It will result in warnings like this:

    WARNING: vmlinux.o (.sched.text.1): unexpected section name.
    The (.[number]+) following section name are ld generated and not expected.
    Did you forget to use "ax"/"aw" in a .S file?
    Note that for example contains
    section definitions for use in .S files.

    All warnings seen with a defconfig build for:
    x86 (32+64bit) and sparc64 has been fixed (via respective maintainers).

    arm, powerpc (64 bit), s390 (32 bit), ia64, alpha, sh4 checked - no
    warnings seen with a defconfig build.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • If the config option CONFIG_SECTION_MISMATCH is not set and
    we see a Section mismatch present the following to the user:

    modpost: Found 1 section mismatch(es).
    To see additional details select "Enable full Section mismatch analysis"
    in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).

    If the option CONFIG_SECTION_MISMATCH is selected
    then be verbose in the Section mismatch reporting from mdopost.
    Sample outputs:

    WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
    The function discover_ebda() references
    the variable __initdata ebda_addr.
    This is often because discover_ebda lacks a __initdata
    annotation or the annotation of ebda_addr is wrong.

    WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
    The variable pci_serial_quirks references
    the function __devexit pci_plx9050_exit()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
    The symbol arch_register_cpu is exported and annotated __cpuinit
    Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Change kconfig behavior so that mixing bool and tristate config
    settings in a choice is possible and has the desired effect of offering
    just the tristate options individually if the choice gets set to M, and
    a normal boolean selection if the choice gets set to Y.

    Also fix scripts/kconfig/conf's handling of children of choice values -
    there may be more than one immediate child, and all of them need to be
    processed.

    Signed-off-by: Jan Beulich
    Cc: "Roman Zippel"
    Signed-off-by: Sam Ravnborg

    Jan Beulich
     
  • Remove the deprecated __attribute_used__.

    [Introduce __section in a few places to silence checkpatch /sam]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • Signed-off-by: Daniel De Graaf
    Signed-off-by: Sam Ravnborg

    Daniel De Graaf
     
  • Kconfig had a synonym "enable" for "select" that was neither documented
    nor used.

    Signed-off-by: Adrian Bunk
    Cc: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • Refactor code so the warning report function
    does nothing else than reporting warnings.
    As a side effect some other code paths were cleaned
    up by this.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Introducing helpers to retreive symbol and section
    names cleaned up the code a bit.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • The typical layout is now:
    WARNING: vmlinux.o(.text+0x372ec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm in 'psycho_scan_bus'

    This is first step towards more readable warnings.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Setting the option DEBUG_SECTION_MISMATCH will
    report additional section mismatch'es but this
    should in the end makes it possible to get rid of
    all of them.

    See help text in lib/Kconfig.debug for details.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Introducing separate sections for __dev* (HOTPLUG),
    __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
    allows us to do a much more reliable Section mismatch
    check in modpost. We are no longer dependent on the actual
    configuration of for example HOTPLUG.

    This has the effect that all users see much more
    Section mismatch warnings than before because they
    were almost all hidden when HOTPLUG was enabled.
    The advantage of this is that when building a piece
    of code then it is much more likely that the Section
    mismatch errors are spotted and the warnings will be
    felt less random of nature.

    Signed-off-by: Sam Ravnborg
    Cc: Greg KH
    Cc: Randy Dunlap
    Cc: Adrian Bunk

    Sam Ravnborg
     
  • Now that match() is introduced use it consistently so
    we can share the section name definitions.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Change the logic in modpost so we identify all the
    bad combinations of sections that refer to other
    sections.
    Compared to the previous approach we are much less
    dependent on knowledge of what additional sections
    the tool chain uses and thus we can keep the false
    positives low.

    The implmentation is changed to use a table based
    lookup and we now check all combinations in first
    pass so we no longer need separate passes for init
    and exit sections.

    Tested that the same warnings are generated for
    an allyesconfig build without CONFIG_HOTPLUG.

    Signed-off-by: Sam Ravnborg
    Cc: Randy Dunlap
    Cc: Adrian Bunk

    Sam Ravnborg
     
  • Split a too long function up in smaller bits to make
    prgram logic easier to follow.
    A few related changes done due to parameter
    changes.

    No functional changes.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • The relocation record sometimes contained an address
    which was not an exactly match for a symbol.

    Implment some simple logic such that if there
    is a symbol within 20 bytes of the address contained
    in the relocation record then print the name of this
    symbol.

    With this change modpost could find symbol names
    for the remaining .init.text symbols in my
    allyesconfig build for x86_64.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • It is very convinient to say:
    scripts/mod/modpost mm/built-in.o

    to check if any section mismatch errors occured
    in mm/ (as an example).
    Fix it so this is possible again.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Remove the tmp file when exiting. Noticed by Arjan van de Ven.
    Catch mktemp failure and exit with message.
    Trap kill or other signals and exit cleanly.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Sam Ravnborg

    Randy Dunlap
     
  • Use the environment option to provide the ARCH symbol
    and the KERNELVERSION symbol.

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     
  • Add the possibility to import a value from the environment into kconfig
    via the option syntax. Beside flexibility this has the advantage
    providing proper dependencies.
    Documented the options syntax.

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     
  • Rename E_CHOICE to E_LIST to explicitly add support for expression
    lists. Add a helper macro expr_list_for_each_sym to more easily iterate
    over the list.

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     
  • Gettext support for symbol names are unnecessary.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • Gettext support for conf.c

    [Include locale.h by Kyle].

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel
    Cc: Kyle McMartin

    EGRY Gabor
     
  • Gettext support for lxdialog.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • Full gettext support for menuconfig.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • Full gettext support for xconfig.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • This patch removes the indirect I18N support for config file.

    Signed-off-by: Egry Gabor
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • Gettext support for menu and toolbar.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • This patch adds missing gettext macros.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • This patch removes the unnecessary whitespaces from
    end of help lines of Kconfig files.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • This patch adds tracking messages.

    Signed-off-by: Egry Gabor
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    EGRY Gabor
     
  • Rather than fixing the output directory in the generated Makefile,
    determine it from the placement of Makefile. This allows moving
    the build tree around or accessing it through different mount paths.

    (The lastword definition is a compatibility one for make prior to 3.81;
    newer make will simply ignore it and use the [faster] built-in.)

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

    Jan Beulich
     
  • akpm complained about overly long lines in modpost.c and
    when started additional style issues were fixed:

    o Updated my copyright
    o Removed unneeded {}
    o Drop assignments in if ()
    o Spaces around operators
    o Break long lines
    o locate * near variable not type
    o Fix a format specifier for sizeof()
    o Corrected placement of '{' and '}'
    o spaces to tabs (but use tabs only for indention)

    modpost.c is not checkpatch clean. Readability were favoured
    on top of checkpatch compliance.
    But checkpatch were used to find additional stuff to clean up.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • rand and srand functions conform also to C89 in addition to POSIX.1-2001,
    which makes them a bit more portable (work also on MinGW host). Linux man
    page also says:
    "The versions of rand() and srand() in the Linux C Library use the same
    random number generator as random() and srandom()".

    * Use C89 conformant functions rand() and srand()

    Signed-off-by: Ladislav Michl
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel

    Ladislav Michl
     
  • Sort includes and remove leading whitespace.

    Signed-off-by: Ladislav Michl
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel <zippel@linux-m68k.org

    Ladislav Michl