1. 01 5月, 2009 5 次提交
  2. 28 4月, 2009 1 次提交
  3. 19 4月, 2009 1 次提交
    • S
      kbuild: introduce subdir-ccflags-y · 720097d8
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      720097d8
  4. 11 4月, 2009 8 次提交
  5. 07 4月, 2009 1 次提交
  6. 02 4月, 2009 1 次提交
  7. 01 4月, 2009 1 次提交
  8. 31 3月, 2009 1 次提交
    • R
      module: include other structures in module version check · 8c8ef42a
      Rusty Russell 提交于
      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: NRusty Russell <rusty@rustcorp.com.au>
      8c8ef42a
  9. 25 3月, 2009 2 次提交
    • J
      dynamic debug: combine dprintk and dynamic printk · e9d376f0
      Jason Baron 提交于
      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: NGreg Banks <gnb@sgi.com>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9d376f0
    • E
      platform: introduce module id table for platform devices · 57fee4a5
      Eric Miao 提交于
      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: NEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57fee4a5
  10. 16 3月, 2009 2 次提交
    • I
      kconfig: improve seed in randconfig · b0fe5510
      Ingo Molnar 提交于
      '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: NIngo Molnar <mingo@elte.hu>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      [sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      b0fe5510
    • S
      kconfig: fix randconfig for choice blocks · 184832c9
      Sam Ravnborg 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      184832c9
  11. 14 3月, 2009 1 次提交
    • L
      kallsyms, tracing: output more proper symbol name · b478b782
      Lai Jiangshan 提交于
      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: NLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: NPaulo Marques <pmarques@grupopie.com>
      LKML-Reference: <49BA06E2.7080807@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b478b782
  12. 07 3月, 2009 3 次提交
    • J
      kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree · b925dbfe
      Josh Hunt 提交于
      Running 'make rpm' fails when CONFIG_LOCALVERSION_AUTO=y and using a kernel source
      tree under SCM.  This is due to KERNELRELEASE being different when the initial make
      is run and when make is run from rpmbuild.
      
      mkspec creates kernel.spec using KERNELRELEASE:
      
      <mkspec>
      echo "%files"
      echo '%defattr (-, root, root)'
      echo "%dir /lib/modules"
      echo "/lib/modules/$KERNELRELEASE"
      echo "/lib/firmware"
      echo "/boot/*"
      echo ""
      </mkspec>
      
      When CONFIG_LOCALVERSION_AUTO=y scripts/setlocalversion is called and grabs any
      additional version info from SCM.  Next, the srctree is tarred up and SCM
      information is excluded.
      
      rpmbuild reruns make and in the process generates a new include/config/kernel.release
      and thus a new KERNELRELEASE.  However this time the SCM information is gone so
      KERNELRELEASE no longer has the additional version information.  When "make modules_install"
      runs, it uses the new KERNELRELEASE value to determine where to install the modules.
      This conflicts with where the spec file assumes they are going because of the
      mis-matching KERNELRELEASE versions.
      
      <snippet>
      + INSTALL_MOD_PATH=/var/tmp/kernel-2.6.29rc4tip01479g5d85422-root
      + make -j16 modules_install
        INSTALL crypto/aead.ko
        INSTALL crypto/cbc.ko
        INSTALL crypto/chainiv.ko
        INSTALL crypto/crc32c.ko
        INSTALL crypto/crypto_algapi.ko
        INSTALL crypto/crypto_blkcipher.ko
        INSTALL crypto/crypto_hash.ko
        INSTALL crypto/cryptomgr.ko
        INSTALL crypto/ecb.ko
        INSTALL crypto/eseqiv.ko
        INSTALL crypto/krng.ko
        INSTALL crypto/md5.ko
        INSTALL crypto/pcbc.ko
        INSTALL crypto/rng.ko
        INSTALL drivers/block/cciss.ko
        INSTALL drivers/hid/hid-dummy.ko
        INSTALL drivers/scsi/iscsi_tcp.ko
        INSTALL drivers/scsi/libiscsi.ko
        INSTALL drivers/scsi/libiscsi_tcp.ko
        INSTALL drivers/scsi/scsi_transport_iscsi.ko
        INSTALL drivers/scsi/scsi_wait_scan.ko
        INSTALL fs/lockd/lockd.ko
        INSTALL fs/nfs/nfs.ko
        INSTALL fs/nfsd/nfsd.ko
        INSTALL lib/libcrc32c.ko
        INSTALL net/sunrpc/sunrpc.ko
        DEPMOD  2.6.29-rc4-tip
      + cp arch/x86/boot/bzImage
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinuz-2.6.29-rc4-tip-01479-g5d85422
      + cp System.map
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/System.map-2.6.29-rc4-tip-01479-g5d85422
      + cp .config
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/config-2.6.29-rc4-tip-01479-g5d85422
      + cp vmlinux vmlinux.orig
      + bzip2 -9 vmlinux
      + mv vmlinux.bz2
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinux-2.6.29-rc4-tip-01479-g5d85422.bz2
      + mv vmlinux.orig vmlinux
      + /usr/lib/rpm/brp-compress
      Processing files: kernel-2.6.29rc4tip01479g5d85422-2
      error: File not found:
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422
      
      RPM build errors:
          File not found:
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422
      make[1]: *** [rpm] Error 1
      make: *** [rpm] Error 2
      </snippet>
      
      I have tested this patch on git -tip, Linus' git tree, and the kernel.org tar files, both
      with and without CONFIG_LOCALVERSION_AUTO=y.
      Signed-off-by: NJosh Hunt <josh@scalex86.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ----
      b925dbfe
    • J
      kbuild: fix mkspec to cleanup RPM_BUILD_ROOT · a2ebcc7a
      Josh Hunt 提交于
      The contents of the %clean section in mkspec is currently commented
      out leaving RPM_BUILD_ROOT and its contents on the build machine.
      This patch removes it once the rpm build process is complete.
      Signed-off-by: NJosh Hunt <josh@scalex86.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a2ebcc7a
    • J
      kbuild: fix C libary confusion in unifdef.c due to getline() · d15bd106
      Justin P. Mattock 提交于
      This fixes an error when compiling the kernel.
      
        CHK     include/linux/version.h
        HOSTCC  scripts/unifdef
      scripts/unifdef.c:209: error: conflicting types for 'getline'
      /usr/include/stdio.h:651: note: previous declaration of 'getline' was here
      make[1]: *** [scripts/unifdef] Error 1
      make: *** [__headers] Error 2
      Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
      Cc:  Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      d15bd106
  13. 28 2月, 2009 8 次提交
  14. 20 2月, 2009 1 次提交
  15. 17 2月, 2009 1 次提交
  16. 15 2月, 2009 3 次提交