Skip to content
Snippets Groups Projects
  1. Mar 24, 2009
    • Jason Baron's avatar
      dynamic debug: combine dprintk and dynamic printk · e9d376f0
      Jason Baron authored
      
      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: default avatarGreg Banks <gnb@sgi.com>
      Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e9d376f0
    • Eric Miao's avatar
      platform: introduce module id table for platform devices · 57fee4a5
      Eric Miao authored
      
      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: default avatarEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      57fee4a5
  2. Mar 15, 2009
    • Ingo Molnar's avatar
      kconfig: improve seed in randconfig · b0fe5510
      Ingo Molnar authored
      
      '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: default avatarIngo 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: default avatarSam Ravnborg <sam@ravnborg.org>
      b0fe5510
    • Sam Ravnborg's avatar
      kconfig: fix randconfig for choice blocks · 184832c9
      Sam Ravnborg authored
      
      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: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      184832c9
  3. Mar 07, 2009
    • Josh Hunt's avatar
      kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree · b925dbfe
      Josh Hunt authored
      
      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: default avatarJosh Hunt <josh@scalex86.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      ----
      b925dbfe
    • Josh Hunt's avatar
      kbuild: fix mkspec to cleanup RPM_BUILD_ROOT · a2ebcc7a
      Josh Hunt authored
      
      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: default avatarJosh Hunt <josh@scalex86.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      a2ebcc7a
    • Justin P. Mattock's avatar
      kbuild: fix C libary confusion in unifdef.c due to getline() · d15bd106
      Justin P. Mattock authored
      
      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: default avatarJustin P. Mattock <justinmattock@gmail.com>
      Cc:  Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      d15bd106
  4. Feb 28, 2009
  5. Feb 17, 2009
  6. Feb 15, 2009
  7. Feb 11, 2009
    • Randy Dunlap's avatar
      kernel-doc: fix syscall wrapper processing · b4870bc5
      Randy Dunlap authored
      
      Fix kernel-doc processing of SYSCALL wrappers.
      
      The SYSCALL wrapper patches played havoc with kernel-doc for
      syscalls.  Syscalls that were scanned for DocBook processing
      reported warnings like this one, for sys_tgkill:
      
      Warning(kernel/signal.c:2285): No description found for parameter 'tgkill'
      Warning(kernel/signal.c:2285): No description found for parameter 'pid_t'
      Warning(kernel/signal.c:2285): No description found for parameter 'int'
      
      because the macro parameters all "look like" function parameters,
      although they are not:
      
      /**
       *  sys_tgkill - send signal to one specific thread
       *  @tgid: the thread group ID of the thread
       *  @pid: the PID of the thread
       *  @sig: signal to be sent
       *
       *  This syscall also checks the @tgid and returns -ESRCH even if the PID
       *  exists but it's not belonging to the target process anymore. This
       *  method solves the problem of threads exiting and PIDs getting reused.
       */
      SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)
      {
      ...
      
      This patch special-cases the handling SYSCALL_DEFINE* function
      prototypes by expanding them to
      	long sys_foobar(type1 arg1, type1 arg2, ...)
      
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4870bc5
  8. Jan 30, 2009
  9. Jan 21, 2009
  10. Jan 16, 2009
  11. Jan 14, 2009
  12. Jan 13, 2009
  13. Jan 10, 2009
  14. Jan 07, 2009
    • Andi Kleen's avatar
      kconfig: add script to manipulate .config files on the command line · 8e54701e
      Andi Kleen authored
      
      I often change single options in .config files. Instead of using
      an editor or one of the frontends it's convenient to do this from
      the command line. It's also useful to do from automated build scripts
      when building different variants from a base config file.
      
      I extracted most of the CONFIG manipulation code from one of my
      build scripts into a new shell script scripts/config
      
      The script is not integrated with the normal Kconfig machinery
      and doesn't do any checking against Kconfig files, but just manipulates
      that text format. This is always done at make time anyways.
      
      I believe this script would be a useful standard addition for scripts/*
      
      Sample usage:
      
      ./scripts/config --disable smp
      Disable SMP in .config file
      
      ./scripts/config --file otherdir/.config --module e1000e
      Enable E1000E as module in otherdir/.config
      
      ./scripts/config --state smp
      y
      Check state of config option CONFIG_SMP
      
      After merging into git please make scripts/config executable
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      8e54701e
    • Jike Song's avatar
      kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope · 4f628248
      Jike Song authored
      
      This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/
      cscope targets. The Kbuild previously has this feature, but after
      moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears.
      
      It's something like this:
      
      	$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
      
      Signed-off-by: default avatarJike Song <albcamus@gmail.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      4f628248
    • Arjan van de Ven's avatar
      bootchart: improve output based on Dave Jones' feedback · 40c8c85a
      Arjan van de Ven authored
      
      Dave Jones, in his blog, had some feedback about the bootchart script:
      Primarily his complaint was that shorter delays weren't visualized.
      
      The reason for that was that too small delays will have their labels
      mixed up in the graph in an unreadable mess.
      
      This patch has a fix for this; for one, it makes the output wider,
      so more will fit.
      The second part is that smaller delays are now shown with a
      much smaller font for the label; while this isn't per se
      readable at a 1:1 zoom, at least you can zoom in with most SVG
      viewing applications and see what it is you are looking at.
      
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      40c8c85a
    • Sam Ravnborg's avatar
      fix modules_install via NFS · 8b249b68
      Sam Ravnborg authored
      
      Rafael reported:
      
      I get the following error from 'make modules_install' on my test boxes:
      
        HOSTCC  firmware/ihex2fw
      /home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system
      compilation terminated.
      make[3]: *** [firmware/ihex2fw] Error 1
      make[2]: *** [_modinst_post] Error 2
      make[1]: *** [sub-make] Error 2
      make: *** [all] Error 2
      
      where the configuration is that the kernel is compiled on a build box
      with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by
      each test box (full path to this directory is the same on the build box and on
      the test boxes).  Then, I cd into <destdir>, run 'make modules_install' and get
      the error above.
      
      The issue turns out to be that we when we install firmware pick
      up the list of firmware blobs from firmware/Makefile.
      And this triggers the Makefile rules to update ihex2fw.
      
      There were two solutions for this issue:
      1) Move the list of firmware blobs to a separate file
      2) Avoid ihex2fw rebuild by moving it to scripts
      
      As I seriously beleive that the list of firmware blobs should be
      done in a fundamental different way solution 2) was selected.
      
      Reported-and-tested-by: default avatar"Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      8b249b68
Loading