17 Oct, 2007

4 commits

  • A while back, Nick Piggin introduced a patch to reduce the node memory
    usage for small files (commit cfd9b7df4abd3257c9e381b0e445817b26a51c0c):

    -#define RADIX_TREE_MAP_SHIFT 6
    +#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)

    Unfortunately, he didn't take into account the fact that the
    calculation of the maximum path was based on an assumption of having
    to round up:

    #define RADIX_TREE_MAX_PATH (RADIX_TREE_INDEX_BITS/RADIX_TREE_MAP_SHIFT + 2)

    So, if CONFIG_BASE_SMALL is set, you will end up with a
    RADIX_TREE_MAX_PATH that is one greater than necessary. The practical
    upshot of this is just a bit of wasted memory (one long in the
    height_to_maxindex array, an extra pre-allocated radix tree node per
    cpu, and extra stack usage in a couple of functions), but it seems
    worth getting right.

    It's also worth noting that I never build with CONFIG_BASE_SMALL.
    What I did to test this was duplicate the code in a small user-space
    program and check the results of the calculations for max path and the
    contents of the height_to_maxindex array.

    Signed-off-by: Jeff Moyer
    Acked-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • Rather than sign direct radix-tree pointers with a special bit, sign the
    indirect one that hangs off the root. This means that, given a lookup_slot
    operation, the invalid result will be differentiated from the valid
    (previously, valid results could have the bit either set or clear).

    This does not affect slot lookups which occur under lock -- they can never
    return an invalid result. Is needed in future for lockless pagecache.

    Signed-off-by: Nick Piggin
    Acked-by: Peter Zijlstra
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Introduce radix_tree_next_hole(root, index, max_scan) to scan radix tree for
    the first hole. It will be used in interleaved readahead.

    The implementation is dumb and obviously correct. It can help debug(and
    document) the possible smart one in future.

    Cc: Nick Piggin
    Signed-off-by: Fengguang Wu
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fengguang Wu
     
  • Optionally add a boot delay after each kernel printk() call, crudely
    measured in milliseconds, with a maximum delay of 10 seconds per printk.

    Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.):
    "lpj=loops_per_jiffy boot_delay=100"
    to the kernel command line.

    It has been useful in cases like "during boot, my machine just reboots or the
    screen goes black" by slowing down printk, (and adding initcall_debug), we can
    usually see the last thing that happened before the lights went out which is
    usually a valuable clue.

    [akpm@linux-foundation.org: not all architectures implement CONFIG_HZ]
    [akpm@linux-foundation.org: fix lots of stuff]
    [bunk@stusta.de: kernel/printk.c: make 2 variables static]
    [heiko.carstens@de.ibm.com: fix slow down printk on boot compile error]
    Signed-off-by: Randy Dunlap
    Signed-off-by: Dave Jones
    Signed-off-by: Adrian Bunk
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

15 Oct, 2007

1 commit


13 Oct, 2007

13 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (37 commits)
    PCI: merge almost all of pci_32.h and pci_64.h together
    PCI: X86: Introduce and enable PCI domain support
    PCI: Add 'nodomains' boot option, and pci_domains_supported global
    PCI: modify PCI bridge control ISA flag for clarity
    PCI: use _CRS for PCI resource allocation
    PCI: avoid P2P prefetch window for expansion ROMs
    PCI: skip ISA ioresource alignment on some systems
    PCI: remove transparent bridge sizing
    pci: write file size to inode on proc bus file write
    pci: use size stored in proc_dir_entry for proc bus files
    pci: implement "pci=noaer"
    PCI: fix IDE legacy mode resources
    MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
    PCI: Fix incorrect argument order to list_add_tail() in PCI dynamic ID code
    PCI: i386: Compaq EVO N800c needs PCI bus renumbering
    PCI: Remove no longer correct documentation regarding MSI vector assignment
    PCI: re-enable onboard sound on "MSI K8T Neo2-FIR"
    PCI: quirk_vt82c586_acpi: Omit reading PCI revision ID
    PCI: quirk amd_8131_mmrbc: Omit reading pci revision ID
    cpqphp: Use PCI_CLASS_REVISION instead of PCI_REVISION_ID for read
    ...

    Linus Torvalds
     
  • On at least ARM (and I'm told MIPS too) dma_free_coherent() has a newish
    call context requirement: unlike its dma_alloc_coherent() sibling, it may
    not be called with IRQs disabled. (This was new behavior on ARM as of late
    2005, caused by ARM SMP updates.) This little surprise can be annoyingly
    driver-visible.

    Since it looks like that restriction won't be removed, this patch changes
    the definition of the API to include that requirement. Also, to help catch
    nonportable drivers, it updates the x86 and swiotlb versions to include the
    relevant warnings. (I already observed that it trips on the
    bus_reset_tasklet of the new firewire_ohci driver.)

    Signed-off-by: David Brownell
    Cc: David Miller
    Acked-by: Russell King
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • I've been hacking on these files for a while now, might as well make it
    official...

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There is only one user of it, and it is only a wrapper for kset_init().

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Sysfs file poll implementation is scattered over sysfs and kobject.
    Event numbering is done in sysfs_dirent but wait itself is done on
    kobject. This not only unecessarily bloats both kobject and
    sysfs_dirent but is also buggy - if a sysfs_dirent is removed while
    there still are pollers, the associaton betwen the kobject and
    sysfs_dirent breaks and kobject may be freed with the pollers still
    sleeping on it.

    This patch moves whole poll implementation into sysfs_open_dirent.
    Each time a sysfs_open_dirent is created, event number restarts from 1
    and pollers sleep on sysfs_open_dirent. As event sequence number is
    meaningless without any open file and pollers should have open file
    and thus sysfs_open_dirent, this ephemeral event counting works and is
    a saner implementation.

    This patch fixes the dnagling sleepers bug and reduces the sizes of
    kobject and sysfs_dirent by one pointer.

    Signed-off-by: Tejun Heo
    Acked-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Move uevent specific logic from the core into kobject_uevent.c, which
    does no longer require to link the unused string array if hotplug
    is not compiled in.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • While shadow directories appear to be a good idea, the current scheme
    of controlling their creation and destruction outside of sysfs appears
    to be a locking and maintenance nightmare in the face of sysfs
    directories dynamically coming and going. Which can now occur for
    directories containing network devices when CONFIG_SYSFS_DEPRECATED is
    not set.

    This patch removes everything from the initial shadow directory support
    that allowed the shadow directory creation to be controlled at a higher
    level. So except for a few bits of sysfs_rename_dir everything from
    commit b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 is now gone.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Due to historical reasons, struct kobject contained a static array for
    the name, and a dynamic pointer in case the name got bigger than the
    array. That's just dumb, as people didn't always know which variable to
    reference, even with the accessor for the kobject name.

    This patch removes the static array, potentially saving a lot of memory
    as the majority of kobjects do not have a very long name.

    Thanks to Kay for the idea to do this.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The kernel creates a process for every event that is send, even when
    there is no binary it could execute. We are needlessly creating around
    200-300 failing processes during early bootup, until we have the chance
    to disable it from userspace.

    This change allows us to disable /sbin/hotplug entirely, if you want to,
    by setting UEVENT_HELPER_PATH="" in the kernel config.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

12 Oct, 2007

2 commits

  • Move zlib_inflate_blob() out into it's own source file,
    infutil.c, so that things like the powerpc zImage builder
    in arch/powerpc/boot/Makefile don't end up trying to
    compile it.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
    [POWERPC] Add memchr() to the bootwrapper
    [POWERPC] Implement logging of unhandled signals
    [POWERPC] Add legacy serial support for OPB with flattened device tree
    [POWERPC] Use 1TB segments
    [POWERPC] XilinxFB: Allow fixed framebuffer base address
    [POWERPC] XilinxFB: Add support for custom screen resolution
    [POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
    [POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
    [POWERPC] 4xx: Kilauea defconfig file
    [POWERPC] 4xx: Kilauea DTS
    [POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
    [POWERPC] 4xx: Add AMCC 405EX support to cputable.c
    [POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
    [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
    [POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
    [POWERPC] 85xx: Killed
    [POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
    [POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
    [POWERPC] mpc8272ads: Remove muram from the CPM reg property.
    [POWERPC] Make clockevents work on PPC601 processors
    ...

    Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.

    Linus Torvalds
     

11 Oct, 2007

2 commits

  • Signed-off-by: Denys Vlasenko
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Denys Vlasenko
     
  • Each netlink socket will live in exactly one network namespace,
    this includes the controlling kernel sockets.

    This patch updates all of the existing netlink protocols
    to only support the initial network namespace. Request
    by clients in other namespaces will get -ECONREFUSED.
    As they would if the kernel did not have the support for
    that netlink protocol compiled in.

    As each netlink protocol is updated to be multiple network
    namespace safe it can register multiple kernel sockets
    to acquire a presence in the rest of the network namespaces.

    The implementation in af_netlink is a simple filter implementation
    at hash table insertion and hash table look up time.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

08 Oct, 2007

2 commits

  • Modulat lguest started giving linking errors

    MODPOST 1 modules
    ERROR: "kasprintf" [drivers/lguest/lg.ko] undefined!

    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Provide some documentation for CONFIG_LOCK_STAT.

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Cc: "Randy.Dunlap"
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

03 Oct, 2007

2 commits

  • Paul Mackerras
     
  • Add CONFIG_DEBUG_PREEMPT support to ppc64: it was useful for testing
    get_paca() preemption. Cheat a little, just use debug_smp_processor_id()
    in the debug version of get_paca(): it contains all the right checks and
    reporting, though get_paca() doesn't really use smp_processor_id().

    Use local_paca for what might have been called __raw_get_paca().
    Silence harmless warnings from io.h and lparcfg.c with local_paca -
    it is okay for iseries_lparcfg_data to be referencing shared_proc
    with preemption enabled: all cpus should show the same value for
    shared_proc.

    Why do other architectures need TRACE_IRQFLAGS_SUPPORT for DEBUG_PREEMPT?
    I don't know, ppc64 appears to get along fine without it.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Paul Mackerras

    Hugh Dickins
     

25 Sep, 2007

1 commit


24 Aug, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
    PCI: Run k8t_sound_hostbridge quirk only when needed
    PCI: disable MSI on RX790
    PCI: disable MSI on RD580
    PCI: disable MSI on RS690
    PCI: make pcie_get_readrq visible in pci.h
    PCI: lets kill the 'PCI hidden behind bridge' message
    pci/hotplug/cpqphp_ctrl.c: remove stale BKL use
    PCI: Document pci_iomap()
    PCI: quirk_e100_interrupt() called too early
    PCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h

    Linus Torvalds
     

23 Aug, 2007

2 commits

  • Introduce CONFIG_CHECK_SIGNATURE to control inclusion of check_signature()
    and avoid problems on platforms that don't have readb().

    Let the few legacy (ISA || PCI || X86) drivers that need check_signature()
    select CONFIG_CHECK_SIGNATURE.

    Signed-off-by: Geert Uytterhoeven
    Cc: Jeff Dike
    Cc: Heiko Carstens
    Cc: Roman Zippel
    Cc: Alan Cox
    Cc: Martin Schwidefsky
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • This useful interface is hardly mentioned anywhere in the in-tree
    documentation.

    Signed-off-by: Rolf Eike Beer
    Cc: Tejun Heo
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Rolf Eike Beer
     

12 Aug, 2007

1 commit

  • Add missing "const" qualifiers to the print_hex_dump_bytes() library routines.

    (akpm: rumoured to fix some compile warning somewhere)

    Signed-off-by: Alan Stern
    Cc: Artem Bityutskiy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     

09 Aug, 2007

1 commit

  • Trivial fix: mark the buffer to hexdump as const so callers could avoid
    casting their const buffers when calling print_hex_dump().

    The patch is really trivial and I suggest to consider it as a fix
    (it fixes GCC warnings) and push it to current tree.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     

01 Aug, 2007

4 commits

  • "error" is always equal to 0.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • The arm26 port has been in a state where it was far from even compiling
    for quite some time.

    Ian Molton agreed with the removal.

    Signed-off-by: Adrian Bunk
    Cc: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • kasprintf pulls in kmalloc which proved to be fatal for at least
    bootimage target on alpha.
    Move it to a separate file so only users of kasprintf are exposed
    to the dependency on kmalloc.

    Signed-off-by: Sam Ravnborg
    Cc: Jeremy Fitzhardinge
    Cc: Meelis Roos
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Jay Estabrook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • Add some casts to the LZO compression algorithm after they were removed
    during cleanup and shouldn't have been.

    Signed-off-by: Richard Purdie
    Cc: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     

31 Jul, 2007

1 commit

  • Leaving kobject_actions[] in kobject_uevent.c, but putting it outside
    the #ifdef looks indeed like the best solution to me. This way, we
    avoid adding #ifdef CONFIG_HOTPLUG into core.c, when all other
    functions called do not need such a thing.

    Signed-off-by: Cornelia Huck
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     

25 Jul, 2007

1 commit


22 Jul, 2007

1 commit

  • If the swiotlb maps a multi-slab region, swiotlb_sync_single_range() can be
    invoked to sync a sub-region which does not include the first slab.
    Unfortunately io_tlb_orig_addr[] is only initialised for the first slab,
    and hence the call to sync_single() will read a garbage orig_addr in this
    case.

    This patch fixes the issue by initialising all mapped slabs in
    io_tlb_orig_addr[]. It also correctly adjusts the buffer pointer in
    sync_single() to handle the case that the given dma_addr is not aligned on
    a slab boundary.

    Signed-off-by: Keir Fraser
    Cc: "Luck, Tony"
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keir Fraser
     

20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt