22 Aug, 2008

1 commit


19 Aug, 2008

1 commit


17 Aug, 2008

1 commit

  • I noticed that sysctl_check.o was the largest object file in
    a allnoconfig build in kernel/*.

    36243 0 0 36243 8d93 kernel/sysctl_check.o

    This is because it was default y and && EMBEDDED. But I don't
    really see a need for a non kernel developer to have their
    sysctls checked all the time.

    So move the Kconfig into the kernel debugging section and
    also drop the default y and the EMBEDDED check.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

16 Aug, 2008

1 commit

  • The idea of the implementation of this fix is from Michael Ellerman.

    This function has two loops, but they each interpret the memory_limit
    value differently. The first loop interprets it as a "size limit"
    whereas the second loop interprets it as an "address limit".

    Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
    so that it all works out.

    Signed-off-by: David S. Miller
    Acked-by: Michael Ellerman

    David S. Miller
     

13 Aug, 2008

3 commits

  • Currently source files in the Documentation/ sub-dir can easily bit-rot
    since they are not generally buildable, either because they are hidden in
    text files or because there are no Makefile rules for them. This needs to
    be fixed so that the source files remain usable and good examples of code
    instead of bad examples.

    Add the ability to build source files that are in the Documentation/ dir.
    Add to Kconfig as "BUILD_DOCSRC" config symbol.

    Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
    Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
    However, this symbol depends on HEADERS_CHECK since the header files need
    to be installed (for userspace builds).

    Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
    sparc64, powerpc, sh, m68k, & mips.

    Signed-off-by: Randy Dunlap
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Short enough reads from /proc/irq/*/smp_affinity return -EINVAL for no
    good reason.

    This became noticed with NR_CPUS=4096 patches, when length of printed
    representation of cpumask becase 1152, but cat(1) continued to read with
    1024-byte chunks. bitmap_scnprintf() in good faith fills buffer, returns
    1023, check returns -EINVAL.

    Fix it by switching to seq_file, so handler will just fill buffer and
    doesn't care about offsets, length, filling EOF and all this crap.

    For that add seq_bitmap(), and wrappers around it -- seq_cpumask() and
    seq_nodemask().

    Signed-off-by: Alexey Dobriyan
    Reviewed-by: Paul Jackson
    Cc: Mike Travis
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Fix wrong conversion function used by strict_strtou*

    Signed-off-by: Yi Yang
    Reported-by: Swen Schillig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yi Yang
     

12 Aug, 2008

1 commit


02 Aug, 2008

2 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    kgdb: fix gdb serial thread queries
    kgdb: fix kgdb_validate_break_address to perform a mem write
    kgdb: remove the requirement for CONFIG_FRAME_POINTER

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
    tcp: MD5: Fix IPv6 signatures
    skbuff: add missing kernel-doc for do_not_encrypt
    net/ipv4/route.c: fix build error
    tcp: MD5: Fix MD5 signatures on certain ACK packets
    ipv6: Fix ip6_xmit to send fragments if ipfragok is true
    ipvs: Move userspace definitions to include/linux/ip_vs.h
    netdev: Fix lockdep warnings in multiqueue configurations.
    netfilter: xt_hashlimit: fix race between htable_destroy and htable_gc
    netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
    netfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledged
    irda: replace __FUNCTION__ with __func__
    nsc-ircc: default to dongle type 9 on IBM hardware
    bluetooth: add quirks for a few hci_usb devices
    hysdn: remove the packed attribute from PofTimStamp_tag
    isdn: use the common ascii hex helpers
    tg3: adapt tg3 to use reworked PCI PM code
    atm: fix direct casts of pointers to u32 in the InterPhase driver
    atm: fix const assignment/discard warnings in the ATM networking driver
    net: use the common ascii hex helpers
    random32: seeding improvement
    ...

    Linus Torvalds
     

01 Aug, 2008

2 commits


31 Jul, 2008

1 commit

  • The rationale is:
    * use u32 consistently
    * no need to do LCG on values from (better) get_random_bytes
    * use more data from get_random_bytes for secondary seeding
    * don't reduce state space on srandom32()
    * enforce state variable initialization restrictions

    Note: the second paper has a version of random32() with even longer period
    and a version of random64() if needed.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Andrew Morton

    Stephen Hemminger
     

29 Jul, 2008

5 commits


27 Jul, 2008

6 commits

  • This implements a platform-independent version of show_mem().

    Signed-off-by: Johannes Weiner
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Chris Zankel
    Cc: Ingo Molnar
    Cc: Jeff Dike
    Cc: David S. Miller
    Cc: Paul Mundt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Yoshinori Sato
    Cc: Ralf Baechle
    Cc: Greg Ungerer
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Hirokazu Takata
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • This adds the new function task_current_syscall() on machines where the
    asm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK). It's
    exported for modules to use in the future. This function safely samples
    the state of a blocked thread to collect what system call it is blocked
    in, and the six system call argument registers.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
    part of the warning section for better reporting/collection. In addition, one
    of the if() clauses collapes into the WARN() entirely now.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Kmem cache passed to constructor is only needed for constructors that are
    themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
    passed kmem cache in non-trivial way, so pass only pointer to object.

    Non-trivial places are:
    arch/powerpc/mm/init_64.c
    arch/powerpc/mm/hugetlbpage.c

    This is flag day, yes.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Pekka Enberg
    Acked-by: Christoph Lameter
    Cc: Jon Tollefson
    Cc: Nick Piggin
    Cc: Matt Mackall
    [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
    [akpm@linux-foundation.org: fix mm/slab.c]
    [akpm@linux-foundation.org: fix ubifs]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Introduce gang_lookup_slot() and gang_lookup_slot_tag() functions, which
    are used by lockless pagecache.

    Signed-off-by: Nick Piggin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Hugh Dickins
    Cc: "Paul E. McKenney"
    Reviewed-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
    architecture does:

    This enables us to cleanly fix the Calgary IOMMU issue that some devices
    are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

    I think that per-device dma_mapping_ops support would be also helpful for
    KVM people to support PCI passthrough but Andi thinks that this makes it
    difficult to support the PCI passthrough (see the above thread). So I
    CC'ed this to KVM camp. Comments are appreciated.

    A pointer to dma_mapping_ops to struct dev_archdata is added. If the
    pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
    NULL, the system-wide dma_ops pointer is used as before.

    If it's useful for KVM people, I plan to implement a mechanism to register
    a hook called when a new pci (or dma capable) device is created (it works
    with hot plugging). It enables IOMMUs to set up an appropriate
    dma_mapping_ops per device.

    The major obstacle is that dma_mapping_error doesn't take a pointer to the
    device unlike other DMA operations. So x86 can't have dma_mapping_ops per
    device. Note all the POWER IOMMUs use the same dma_mapping_error function
    so this is not a problem for POWER but x86 IOMMUs use different
    dma_mapping_error functions.

    The first patch adds the device argument to dma_mapping_error. The patch
    is trivial but large since it touches lots of drivers and dma-mapping.h in
    all the architecture.

    This patch:

    dma_mapping_error() doesn't take a pointer to the device unlike other DMA
    operations. So we can't have dma_mapping_ops per device.

    Note that POWER already has dma_mapping_ops per device but all the POWER
    IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
    argument.

    [akpm@linux-foundation.org: fix sge]
    [akpm@linux-foundation.org: fix svc_rdma]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix bnx2x]
    [akpm@linux-foundation.org: fix s2io]
    [akpm@linux-foundation.org: fix pasemi_mac]
    [akpm@linux-foundation.org: fix sdhci]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc]
    [akpm@linux-foundation.org: fix ibmvscsi]
    Signed-off-by: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

26 Jul, 2008

15 commits

  • * Replace previous instances of the cpumask_of_cpu_ptr* macros
    with a the new (lvalue capable) generic cpumask_of_cpu().

    Signed-off-by: Mike Travis
    Cc: Andrew Morton
    Cc: Jack Steiner
    Cc: Rusty Russell
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • Calculating the number of pages from given address and length numbers is a task
    required in multiple IOMMU implementations. So implement this as a generic
    function into the IOMMU helper code.

    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    Cc: bhavna.sarathy@amd.com
    Cc: robert.richter@amd.com
    Cc: FUJITA Tomonori
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     
  • Introduce the free_layer() routine: it is the one that actually frees memory
    after a grace period has elapsed.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Make idr_find rcu-safe: it can now be called inside an rcu_read critical
    section.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Make the idr_get_new* routines rcu-safe.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Do some code factorization in the return code analysis.

    Signed-off-by: Nadia Derbey
    Cc: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Fix the incomplete printk call.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • This is a trivial patch that renames:

    . alloc_layer to get_from_free_list since it idr_pre_get that actually
    allocates memory.
    . free_layer to move_to_free_list since memory is not actually freed there.

    This makes things more clear for the next patches.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • All ratelimit user use same jiffies and burst params, so some messages
    (callbacks) will be lost.

    For example:
    a call printk_ratelimit(5 * HZ, 1)
    b call printk_ratelimit(5 * HZ, 1) before the 5*HZ timeout of a, then b will
    will be supressed.

    - rewrite __ratelimit, and use a ratelimit_state as parameter. Thanks for
    hints from andrew.

    - Add WARN_ON_RATELIMIT, update rcupreempt.h

    - remove __printk_ratelimit

    - use __ratelimit in net_ratelimit

    Signed-off-by: Dave Young
    Cc: "David S. Miller"
    Cc: "Paul E. McKenney"
    Cc: Dave Young
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Arjan noted that the list_head debugging is BUG'ing when it detects
    corruption. By causing the box to panic immediately, we're possibly
    losing some bug reports. Changing this to a WARN() should mean we at the
    least start seeing reports collected at kerneloops.org

    Signed-off-by: Dave Jones
    Cc: Matthew Wilcox
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Now that WARN() exists, we can fold some of the printk's into it.

    Signed-off-by: Arjan van de Ven
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Inflate requires some dynamic memory allocation very early in the boot
    process and this is provided with a set of four functions:
    malloc/free/gzip_mark/gzip_release.

    The old inflate code used a mark/release strategy rather than implement
    free. This new version instead keeps a count on the number of outstanding
    allocations and when it hits zero, it resets the malloc arena.

    This allows removing all the mark and release implementations and unifying
    all the malloc/free implementations.

    The architecture-dependent code must define two addresses:
    - free_mem_ptr, the address of the beginning of the area in which
    allocations should be made
    - free_mem_end_ptr, the address of the end of the area in which
    allocations should be made. If set to 0, then no check is made on
    the number of allocations, it just grows as much as needed

    The architecture-dependent code can also provide an arch_decomp_wdog()
    function call. This function will be called several times during the
    decompression process, and allow to notify the watchdog that the system is
    still running. If an architecture provides such a call, then it must
    define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
    arch_decomp_wdog().

    Work initially done by Matt Mackall, updated to a recent version of the
    kernel and improved by me.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Thomas Petazzoni
    Cc: Matt Mackall
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Haavard Skinnemoen
    Cc: David Howells
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: "H. Peter Anvin"
    Acked-by: Paul Mundt
    Acked-by: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Petazzoni
     
  • Remove the conditional surrounding the definition of list_add() from list.h
    since, if you define CONFIG_DEBUG_LIST, the definition you will subsequently
    pick up from lib/list_debug.c will be absolutely identical, at which point you
    can remove that redundant definition from list_debug.c as well.

    Signed-off-by: Robert P. J. Day
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Extend memparse() to allow the caller to use a NULL second parameter, which
    would represent no interest in returning the address of the end of the parsed
    string.

    In numerous cases, callers invoke memparse() to parse a possibly-suffixed
    string (such as "64K" or "2G" or whatever) and define a character pointer to
    accept the end pointer being returned by memparse() even though they have no
    interest in it and promptly throw it away.

    This (backward-compatible) enhancement allows callers to use NULL in the cases
    where they just don't care about getting back that end pointer.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Signed-off-by: Harvey Harrison
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

25 Jul, 2008

1 commit

  • This updates to define the key routines as constant
    functions, which the macros will then call. Newer code can now call
    bcd2bin() instead of SCREAMING BCD2BIN() TO THE FOUR WINDS.

    This lets each driver shrink their codespace by using N function calls to
    a single (global) copy of those routines, instead of N inlined copies of
    these functions per driver.

    These routines aren't used in speed-critical code. Almost all callers are
    in the RTC framework. Typical per-driver savings is near 300 bytes.

    Signed-off-by: David Brownell
    Acked-by: Adrian Bunk
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell