1. 20 2月, 2008 1 次提交
    • G
      kbuild: fix reversed symbol name order in modpost · b1d2675a
      Geert Uytterhoeven 提交于
      XXXINIT_TO_INIT and XXXEXIT_TO_EXIT warnings use the reversed symbol name order
      in the suggestion, e.g.:
      
          WARNING: vmlinux.o(.meminit.text+0x36c): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
          The function __meminit free_area_init_core() references
          a function __init setup_usemap().
          If free_area_init_core is only used by setup_usemap then
          annotate free_area_init_core with a matching annotation.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      b1d2675a
  2. 15 2月, 2008 1 次提交
  3. 14 2月, 2008 2 次提交
    • M
      Linux Kernel Markers: create modpost file · b2e3e658
      Mathieu Desnoyers 提交于
      This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
      to the Module.symvers file, the build will now write a Module.markers file
      when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
      format string of each marker, separated by \t characters.  This simple text
      file can be used by offline build procedures for instrumentation code,
      analogous to how System.map and Module.symvers can be useful to have for
      kernels other than the one you are running right now.
      
      The strings are made easy to extract by having the __trace_mark macro define
      the name and format together in a single array called __mstrtab_* in the
      __markers_strings section.  This is straightforward and reliable as long as
      the marker structs are always defined by this macro.  It is an unreasonable
      amount of hairy work to extract the string pointers from the __markers section
      structs, which entails handling a relocation type for every machine under the
      sun.
      
      Mathieu :
      - Ran through checkpatch.pl
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: David Smith <dsmith@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b2e3e658
    • R
      kconfig: fix select in combination with default · 587c9061
      Roman Zippel 提交于
      > The attached .config (with current -git) results in a compile
      > error since it contains:
      >
      > CONFIG_X86=y
      > # CONFIG_EMBEDDED is not set
      > CONFIG_SERIO=m
      > CONFIG_SERIO_I8042=y
      >
      > Looking at drivers/input/serio/Kconfig I simply don't get how this
      > can happen.
      
      You've hit the rather subtle rules of select vs default. What happened is
      that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
      of y is used instead.
      We already had the problem in the past that select and default don't work
      well together, so this patch cleans this up and makes the rule hopefully
      more straightforward. Basically now the value is calculated like this:
      
      	(value && dependency) || select
      
      where the value is the user choice (if available and the symbol is
      visible) or default.
      
      In this case it means SERIO and SERIO_I8042 are both set to y due to their
      default and if SERIO didn't had the default, then the SERIO_I8042 value
      would be limited to m due to the dependency.
      
      I tested this patch with more 10000 random configs and above case is the
      only the difference that showed up, so I hope there is nothing that
      depended on the old more complex and subtle rules.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Tested-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      587c9061
  4. 12 2月, 2008 1 次提交
    • S
      kbuild: fix make V=1 · fab1e310
      Sam Ravnborg 提交于
      When make -s support were added to filechk to
      combination created with make V=1 were not
      covered.
      Fix it by explicitly cover this case too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Mike Frysinger <vapier@gentoo.org>
      fab1e310
  5. 09 2月, 2008 7 次提交
    • M
      Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit> · ed2c9fa5
      Michal Sojka 提交于
      If CONIFIG_LOCALVERSION is set for example to -loop, the following error
      message was generated.
      
      dpkg-deb - error: Debian revision (`loop') doesn't contain any digits
      dpkg-deb: 1 errors in control file
      
      The patch solves this by adding a numeric revision to package version.
      Signed-off-by: NMichal Sojka <sojkam1@fel.cvut.cz>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ed2c9fa5
    • M
      d75f4c68
    • G
      kbuild/modpost: Use warn() for announcing section mismatches · 7c0ac495
      Geert Uytterhoeven 提交于
      modpost: Use warn() for announcing section mismatches, for easy grepping for
      warnings in build logs.
      
      Also change an existing call from fprintf() to warn() while we're at it.
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      7c0ac495
    • U
      Add binoffset to gitignore · ff739b61
      Uwe Kleine-König 提交于
      Signed-off-by: NUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ff739b61
    • S
      kbuild/modpost: improve warnings if symbol is unknown · f666751a
      Sam Ravnborg 提交于
      If we cannot determine the symbol then print
      (unknown) to hint the reader that we failed to
      find the symbol.
      This happens with REL relocation records
      in arm object files.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      f666751a
    • A
      update checkpatch.pl to version 0.14 · 13214adf
      Andy Whitcroft 提交于
      This version brings the remainder of the queued fixes.  A number of fixes
      for items missed reported by Andrew Morton and others.  Also a handful
      of new checks and fixes for false positives.  Of note:
      
       - new warning associated with --file to try and avoid cleanup only patches,
       - corrected handling of completly empty files,
       - corrected report handling with multiple files,
       - handling of possible types in the face of multiple declarations,
       - detection of unnessary braces on complex if statements (where present), and
       - all new comment spacing handling.
      
      Andi Kleen (1):
            Introduce a warning when --file mode is used
      
      Andy Whitcroft (14):
            Version: 0.14
            clean up some space violations in checkpatch.pl
            a completly empty file should not provoke a whinge
            reset report lines buffers between files
            unary ++/-- may abutt close braces
            __typeof__ is also unary
            comments: revamp comment handling
            add --summary-file option adding filename to summary line
            trailing backslashes are not trailing statements
            handle operators passed as parameters such as to ASSERTCMP
            possible types -- enhance debugging
            check for boolean operations with constants
            possible types: handle multiple declarations
            detect and report if statements where all branches are single statements
      
      Arjan van de Ven (1):
            quiet option should not print the summary on no errors
      
      Bartlomiej Zolnierkiewicz (1):
            warn about using __FUNCTION__
      
      Timur Tabi (1):
            loosen spacing checks for __asm__
      Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13214adf
    • A
      update checkpatch.pl to version 0.13 · c2fdda0d
      Andy Whitcroft 提交于
      This version brings a large number of fixes which have built up over
      the Christmas period.  Mostly these are fixes for false positives, both
      through improvments to unary checks and possible type detection.  It
      also brings new checks for while location and CVS keywords.  Of note:
      
        - a number of fixes to unary detection
        - detection of a number of new forms of types to improve type matching
        - better inline handling
        - recognision of '%' as an operator
      
      Andy Whitcroft (28):
            Version: 0.13
            unary detection: maintain bracket state across lines
            move to pre-sanitising the entire file
            the text of a #error statement should be treated like it is in quotes
            line sanitisation needs to target double backslash correctly
            tighten comment guestimation for lines starting ' * '
            debug: add a debug framework
            prevent unclosed single quotes from spreading
            add % as an operator
            the text of a #warning statement should be treated like it is in quotes
            possible matching applies in typedefs
            single statement block checks must not trigger when two or more statements
            possible types: local variables may also be const
            treat inline as a type attribute to even when out of place
            possible types: sparse annotations are valid indicators
            possible types: beef up the possible type testing
            check for hanging while statements on the wrong line
            utf8 checks need to occur against the raw lines
            function brace checks should use any whitespece matches
            comments should take up space in the line when sanitised
            remove debugging from if assignment checks
            possible types -- ensure we detect all pointer casts
            fix tests for function spacing in the presence of #define
            clean up the UTF-8 error message to be clearer
            test-lib: invert the status report, output success counts
            detect and report CVS keywords
            tests: break out tests
            Add $Id$ to the CVS keyword checks
      
      Benny Halevy (1):
            checkpatch.pl: recognize the #elif preprocessor directive
      
      Geert Uytterhoeven (1):
            print the filenames of patches where available
      
      Mauro Carvalho Chehab (1):
            Fix missing \n in checkpatch.pl
      Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2fdda0d
  6. 08 2月, 2008 3 次提交
  7. 07 2月, 2008 3 次提交
  8. 03 2月, 2008 5 次提交
  9. 02 2月, 2008 1 次提交
    • G
      USB: handle idVendor of 0x0000 · de6f92b9
      Greg Kroah-Hartman 提交于
      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 <janumix@poczta.fm>
      Cc: stable <stable@kernel.org>
      Cc: Jon Masters <jcm@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      de6f92b9
  10. 29 1月, 2008 16 次提交
    • S
      kbuild: warn about ld added unique sections · e241a630
      Sam Ravnborg 提交于
      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 <linux/init.h> 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: NSam Ravnborg <sam@ravnborg.org>
      e241a630
    • S
      kbuild: add verbose option to Section mismatch reporting in modpost · 588ccd73
      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: NSam Ravnborg <sam@ravnborg.org>
      588ccd73
    • J
      kconfig: tristate choices with mixed tristate and boolean values · f5eaa323
      Jan Beulich 提交于
      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: NJan Beulich <jbeulich@novell.com>
      Cc: "Roman Zippel" <zippel@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      f5eaa323
    • A
      remove __attribute_used__ · 3ff6eecc
      Adrian Bunk 提交于
      Remove the deprecated __attribute_used__.
      
      [Introduce __section in a few places to silence checkpatch /sam]
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      3ff6eecc
    • D
      kbuild: support ARCH=x86 in buildtar · bc395add
      Daniel De Graaf 提交于
      Signed-off-by: NDaniel De Graaf <danieldegraaf@gmail.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      bc395add
    • A
      kconfig: remove "enable" · 9649ef87
      Adrian Bunk 提交于
      Kconfig had a synonym "enable" for "select" that was neither documented
      nor used.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      9649ef87
    • S
      kbuild: simplified warning report in modpost · 58fb0d4f
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      58fb0d4f
    • S
      kbuild: introduce a few helpers in modpost · ff13f926
      Sam Ravnborg 提交于
      Introducing helpers to retreive symbol and section
      names cleaned up the code a bit.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ff13f926
    • S
      kbuild: use simpler section mismatch warnings in modpost · 157c23c8
      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: NSam Ravnborg <sam@ravnborg.org>
      157c23c8
    • S
      kbuild: introduce new option to enhance section mismatch analysis · 91341d4b
      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: NSam Ravnborg <sam@ravnborg.org>
      91341d4b
    • S
      Use separate sections for __dev/__cpu/__mem code/data · eb8f6890
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Adrian Bunk <bunk@kernel.org>
      eb8f6890
    • S
      kbuild: check section names consistently in modpost · 6c5bd235
      Sam Ravnborg 提交于
      Now that match() is introduced use it consistently so
      we can share the section name definitions.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      6c5bd235
    • S
      kbuild: introduce blacklisting in modpost · 10668220
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Adrian Bunk <bunk@kernel.org>
      10668220
    • S
      kbuild: code refactoring in modpost · 5b24c071
      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: NSam Ravnborg <sam@ravnborg.org>
      5b24c071
    • S
      kbuild: try harder to find symbol names in modpost · 9ad21c3f
      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: NSam Ravnborg <sam@ravnborg.org>
      9ad21c3f
    • S
      kbuild: fix so modpost can now check any .o file · d1f25e66
      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: NSam Ravnborg <sam@ravnborg.org>
      d1f25e66