12 Aug, 2007

24 commits

  • A warning note from Sam Ravnborg about kconfig's select evilness,
    dependencies and the future (slightly corrected).

    Signed-off-by: Jarek Poplawski
    Cc: Sam Ravnborg
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarek Poplawski
     
  • In Documentation/sysrq.txt, the description of 'h' says that any key not
    listed *above* will generate help. That's obviously not true since all the
    keys listed below 'h' will do what they are described to do, not display help.
    So change the text so that it says that any key not listed in the table will
    generate help, which is what really happens.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • This version brings a number of new checks, and a number of bug
    fixes. Of note:

    - checks for spacing on round and square bracket combinations
    - loosening of the single statement brace checks, to allow
    them when they contain comments or where other blocks in a
    compound statement have them.
    - parks the multple declaration support
    - allows architecture defines in architecture specific headers

    Andy Whitcroft (21):
    Version: 0.09
    loosen single statement brace checks
    fix up multiple declaration to avoid function arguments
    add some function space parenthesis check exceptions
    handle EXPORT_'s with parentheses in their names
    clean up some warnings in multi-line macro bracketing support
    park the multiple declaration checks
    make block brace checks count comments as a statement
    __volatile__ and __extension__ are not functions
    allow architecture specific defined within architecture includes
    check spacing on square brackets
    check spacing on parentheses
    ensure we apply checks to the part before start comment
    check #ifdef conditional spacing
    handle __init_refok and __must_check
    add noinline to inline checks
    prevent email addresses from tripping spacing checks
    handle typed initialiser spacing
    handle line contination as end of line
    add bool to the type matcher
    refine EXPORT_SYMBOL checks to handle pointers

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Long ago I've noticed (but didn't pay much attention) that
    spi_mpc83xx using PM calculations that differs from what
    specs describe. I.e.

    u8 pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4);

    While specs says: "The SPI baud rate generator clock source (either
    system clock or system clock divided by 16, depending on DIV16 bit) is
    divided by 4 * ([PM] + 1), a range from 4 to 64.".

    Thus " - 1" is missing in the spi_mpc83xx's formula.

    Why nobody noticed that bug? Probably because sysclk usually less then
    user expects, e.g. you expect 200 MHz, but real clock is 198 MHz,
    and integer rounding helps when this formula is used.

    Suppose it's SPI in QE, SYSCLK at 198 MHz, thus SPIBRG at 99MHz, 25 MHz
    requested.

    PM = (99MHz / ( 25 MHz * 4 )), PM == 0, output SPICLK will be 24.75 MHz

    At lower frequencies this bug is more noticeable, though.

    And this bug shows itself in all its beauty if SYSCLK is equal or a bit
    more than you expect (200 MHz SYSCLK, 100 MHz SPIBRG):
    PM = (100MHz / ( 25 MHz * 4 )), PM == 1, output SPICLK will be 12.625 MHz!

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • For MPC8349E input to the SPI Baud Rate Generator is SYSCLK, but it's
    SYSCLK/2 for MPC8323E (SPI in QE). Fix this, and remove confusion by
    renaming the mpc83xx_spi->sysclk member as mpc83xx_spi->spibrg.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Documentation/watchdog/watchdog.txt does not exist, it is Documentation/watchdog/wdt.txt

    Signed-off-by: Gabriel Craciunescu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gabriel C
     
  • This is add a document for memory hotplug to describe "How to use" and
    "Current status".

    Signed-off-by: KAMEZAWA Hiroyuki
    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • cm4000_cs.c and cm4040_cs.c call the internal release function with
    an argument of wrong type. this fixes bug #8485

    Signed-off-by: Daniel Ritz
    Cc: Bill McConnaughey
    Cc: Natalie Protasevich
    Cc: Harald Welte
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ritz
     
  • On some systems some PFNs reported by the early initialization code as
    'nosave' may be invalid. If we try to set the corresponding bits in the
    hibernation bitmap, BUG_ON() in memory_bm_find_bit() will be triggered and
    the system won't be able to boot (cf.
    https://bugzilla.novell.com/show_bug.cgi?id=296242).

    Prevent this from happening by verifying if the 'nosave' PFNs are valid in
    mark_nosave_pages().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • ecryptfs_init() exits without doing any cleanup jobs if
    ecryptfs_init_messaging() fails. In that case, eCryptfs leaves
    sysfs entries, leaks memory, and causes an invalid page fault.
    This patch fixes the problem.

    Signed-off-by: Ryusuke Konishi
    Acked-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Signed-off-by: Gabriel Craciunescu
    Cc: David Woodhouse
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gabriel C
     
  • After /proc/sys rewrite it was left unused.

    Signed-off-by: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Misplaced #endif is hiding the numa_zonelist_order sysctl when !SECURITY.

    Signed-off-by: Lee Schermerhorn
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Schermerhorn
     
  • When ecryptfs_lookup() is called against special files, eCryptfs generates
    the following errors because it tries to treat them like regular eCryptfs
    files.

    Error opening lower file for lower_dentry [0xffff810233a6f150], lower_mnt [0xffff810235bb4c80], and flags
    [0x8000]
    Error opening lower_file to read header region
    Error attempting to read the [user.ecryptfs] xattr from the lower file; return value = [-95]
    Valid metadata not found in header region or xattr region; treating file as unencrypted

    For instance, the problem can be reproduced by the steps below.

    # mkdir /root/crypt /mnt/crypt
    # mount -t ecryptfs /root/crypt /mnt/crypt
    # mknod /mnt/crypt/c0 c 0 0
    # umount /mnt/crypt
    # mount -t ecryptfs /root/crypt /mnt/crypt
    # ls -l /mnt/crypt

    This patch fixes it by adding a check similar to directories and
    symlinks.

    Signed-off-by: Ryusuke Konishi
    Acked-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Connect up the fallocate() system call.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • This builds upon my previous attempts to resolve some jitter problems seen
    with the Matrox G450 and G550 -based cards, including odd disparities observed
    between x86 and Power -based machines in a somewhat less hackish way (removing
    the hacked ifdefs).

    Apparently, preference should be given to use the DVI PLL when frequencies
    permit, the Standard PLL otherwise. The max pixel clock for the panellink
    interface is extracted from the PInS information on the card and used as a
    limit to determine which PLL to use.

    Signed-off-by: Paul A. Clarke
    Acked-by: Petr Vandrovec
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul A. Clarke
     
  • The current version is very old and does not correctly specify how to
    set the video mode.

    Signed-off by: Adrian McMenamin
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian McMenamin
     
  • - better handling of the pvr2 registers based on more up to date information.

    Testing shows that it seems to work pretty well at 16bpp, 24bpp and 32bpp -
    including proper rendering of the boot logo at all levels (previously this was
    a bit broken even at 16bpp) and giving white against black text. Really
    detailed testing (eg with X11) requires support for the maple bus - which
    isn't (currently - next project assuming this is okay) available, but I have
    no reason to think this is broken.

    Signed-off by: Adrian McMenamin
    Acked-by: Paul Mundt
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian McMenamin
     
  • Reported by: Adrian McMenamin

    This driver will oops when the pseudo_palette[] is written as u32 but not when
    written as u16. When written as u32, it corrupts the adjacent 'mmio_base'
    field of struct pvr2fb_par. Fix by using framebuffer_alloc()/release() to
    allocate struct fb_info and struct pvr2fb_par, and create the pseudo_palette[]
    as part of struct pvr2fb_par.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Fix compile warning ('map_override unused') if fbcon is compiled as a module
    and CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=n.

    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Visualize-EG, Graffiti and A4450A graphics cards on PARISC can
    be configured in double-buffer and standard mode, but the stifb
    driver supports standard mode only.
    This patch detects double-buffered cards more reliable.

    It is a real bugfix for a very nasty problem for all parisc users which have
    wrongly configured their graphic card. The problem: The stifb graphics driver
    will not detect that the card is wrongly configured and then nevertheless just
    enables the graphics mode, which it shouldn't. In the end, the user will see
    no further updates / boot messages on the screen.

    We had documented this problem already on our FAQ
    (http://parisc-linux.org/faq/index.html#viseg "Why do I get corrupted graphics
    with my Vis-EG/Graffiti/A4450A card?") but people still run into this problem.
    So having this fix in as early as possible can help us.

    Signed-off-by: Helge Deller
    Signed-off-by: Antonino Daplas
    Cc:
    Cc: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Helge Deller
     
  • Need to initialize map_bh.b_state to zero. Otherwise, in case of a faulty
    user-buffer its possible to go into dio_zero_block() and submit a page by
    mistake - since it checks for buffer_new().

    http://marc.info/?l=linux-kernel&m=118551339032528&w=2

    akpm: Linus had a (better) patch to just do a kzalloc() in there, but it got
    lost. Probably this version is better for -stable anwyay.

    Signed-off-by: Badari Pulavarty
    Acked-by: Joe Jin
    Acked-by: Zach Brown
    Cc: gurudas pai
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • I have had four seperate system lockups attributable to this exact problem
    in two days of testing. Instead of trying to handle all the weird end
    cases and wrap, how about changing it to look for exactly what we appear
    to want.

    The following patch removes a couple races in setup_APIC_timer. One occurs
    when the HPET advances the COUNTER past the T0_CMP value between the time
    the T0_CMP was originally read and when COUNTER is read. This results in
    a delay waiting for the counter to wrap. The other results from the counter
    wrapping.

    This change takes a snapshot of T0_CMP at the beginning of the loop and
    simply loops until T0_CMP has changed (a tick has happened).

    I have one small concern about the patch. I am not sure it meets the intent
    as well as it should. I think we are trying to match APIC timer interrupts up
    with the hpet counter increment. The event which appears to be disturbing
    this loop in our test environment is the NMI watchdog. What we believe has
    been happening with the existing code is the setup_APIC_timer loop has read
    the CMP value, and the NMI watchdog code fires for the first time. This
    results in a series of icache miss slowdowns and by the time we get back to
    things it has wrapped.

    I think this code is trying to get the CMP as close to the counter value as
    possible. If that is the intent, maybe we should really be testing against a
    "window" around the CMP. Something like COUNTER = CMP+/2. It appears COUNTER
    should get advanced every 89nSec (IIRC). The above seems like an unreasonably
    small window, but may be necessary. Without documentation, I am not sure of
    the original intent with this code.

    In summary, this code fixes my boot hangs, but since I am not certain of the
    intent of the existing code, I am not certain this has not introduced new bugs
    or unexpected behaviors.

    Signed-off-by: Robin Holt
    Acked-by: Andi Kleen
    Cc: Vojtech Pavlik
    Cc: "Aaron Durbin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Cc: Alexey Dobriyan
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan Wu
     

10 Aug, 2007

3 commits

  • There's a little problem in Documentation/vm/slabinfo.c
    The code is using "%d" in a printf() call to print an 'unsigned long'.
    This patch corrects it to use "%lu" instead.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Christoph Lameter

    Jesper Juhl
     
  • The dynamic dma kmalloc creation can run into trouble if a
    GFP_ATOMIC allocation is the first one performed for a certain size
    of dma kmalloc slab.

    - Move the adding of the slab to sysfs into a workqueue
    (sysfs does GFP_KERNEL allocations)
    - Do not call kmem_cache_destroy() (uses slub_lock)
    - Only acquire the slub_lock once and--if we cannot wait--do a trylock.

    This introduces a slight risk of the first kmalloc(x, GFP_DMA|GFP_ATOMIC)
    for a range of sizes failing due to another process holding the slub_lock.
    However, we only need to acquire the spinlock once in order to establish
    each power of two DMA kmalloc cache. The possible conflict is with the
    slub_lock taken during slab management actions (create / remove slab cache).

    It is rather typical that a driver will first fill its buffers using
    GFP_KERNEL allocations which will wait until the slub_lock can be acquired.
    Drivers will also create its slab caches first outside of an atomic
    context before starting to use atomic kmalloc from an interrupt context.

    If there are any failures then they will occur early after boot or when
    loading of multiple drivers concurrently. Drivers can already accomodate
    failures of GFP_ATOMIC for other reasons. Retries will then create the slab.

    Signed-off-by: Christoph Lameter

    Christoph Lameter
     
  • The MAX_PARTIAL checks were supposed to be an optimization. However, slab
    shrinking is a manually triggered process either through running slabinfo
    or by the kernel calling kmem_cache_shrink.

    If one really wants to shrink a slab then all operations should be done
    regardless of the size of the partial list. This also fixes an issue that
    could surface if the number of partial slabs was initially above MAX_PARTIAL
    in kmem_cache_shrink and later drops below MAX_PARTIAL through the
    elimination of empty slabs on the partial list (rare). In that case a few
    slabs may be left off the partial list (and only be put back when they
    are empty).

    Signed-off-by: Christoph Lameter

    Christoph Lameter
     

09 Aug, 2007

13 commits

  • UIO currently contains a rather dubious statement which wants removing.

    The actual questions around whether user space code that depends tightly
    on kernel GPL code designed to co-work with it are derivative works of
    the kernel is extremely complex, and since we don't have space for either
    a masters length essay on legal issues or need to start flamewars lets
    simply remove the comment and leave law to lawyers

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • The default definition in asm-generic conflicts with Alpha's O_DIRECT,
    so, like several other arches, it needs to be redefined.

    Signed-off-by: Richard Hendersion
    Signed-off-by: Linus Torvalds

    Richard Henderson
     
  • * git://git.linux-nfs.org/pub/linux/nfs-2.6:
    SUNRPC: Replace flush_workqueue() with cancel_work_sync() and friends
    NFS: Replace flush_scheduled_work with cancel_work_sync() and friends
    SUNRPC: Don't call gss_delete_sec_context() from an rcu context
    NFSv4: Don't call put_rpccred() from an rcu callback
    NFS: Fix NFSv4 open stateid regressions
    NFSv4: Fix a locking regression in nfs4_set_mode_locked()
    NFS: Fix put_nfs_open_context
    SUNRPC: Fix a race in rpciod_down()

    Linus Torvalds
     
  • 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
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [TCP]: H-TCP maxRTT estimation at startup
    [NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack
    [NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks
    [NETFILTER]: ipt_recent: avoid a possible NULL pointer deref in recent_seq_open()
    [NET] net/core/utils: fix sparse warning
    [NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table
    [PATCH] mac80211: don't allow scanning in monitor mode
    [PATCH] mac80211: Fix sparse error for sta_last_seq_ctrl_read
    [PATCH] mac80211: use do { } while (0) for multi-line macros
    [PATCH] mac80211: missing dev_put in ieee80211_master_start_xmit

    Linus Torvalds
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Fix memory leak when cpu hotplugging.
    [SPARC64]: Do not assume sun4v chips have load-twin/store-init support.
    [SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v.
    [SPARC]: Centralize find_in_proplist() instead of duplicating N times.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
    mmc: at91_mci: remove whitespace at the end of lines
    mmc: reorganize bounce buffer init
    wbsd: fix section mismatch warnings

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: (61 commits)
    sched: refine negative nice level granularity
    sched: fix update_stats_enqueue() reniced codepath
    sched: round a bit better
    sched: make the multiplication table more accurate
    sched: optimize update_rq_clock() calls in the load-balancer
    sched: optimize activate_task()
    sched: clean up set_curr_task_fair()
    sched: remove __update_rq_clock() call from entity_tick()
    sched: move the __update_rq_clock() call to scheduler_tick()
    sched debug: remove the 'u64 now' parameter from print_task()/_rq()
    sched: remove the 'u64 now' local variables
    sched: remove the 'u64 now' parameter from deactivate_task()
    sched: remove the 'u64 now' parameter from dequeue_task()
    sched: remove the 'u64 now' parameter from enqueue_task()
    sched: remove the 'u64 now' parameter from dec_nr_running()
    sched: remove the 'u64 now' parameter from inc_nr_running()
    sched: remove the 'u64 now' parameter from dec_load()
    sched: remove the 'u64 now' parameter from inc_load()
    sched: remove the 'u64 now' parameter from update_curr_load()
    sched: remove the 'u64 now' parameter from ->task_new()
    ...

    Linus Torvalds
     
  • Some versions of ld.so mmap the shared libraries right in over guest
    memory, so compile lguest statically by default.

    [ FC7 maps shared libraries very low, where the launcher maps guest's
    physical memory. Quick fix is to link Launcher static, real fix is
    for 2.6.24. ]

    -static is a simple fix. I expect this problem will be more common than we
    like, as different distro's make different "improvements" to ld.so

    Signed-off-by: Ronald G. Minnich
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Ronald G. Minnich
     
  • If a Guest makes hypercall which sets a GDT entry to not present, we
    currently set any segment registers using that GDT entry to 0.
    Unfortunately, this is not sufficient: there are other ways of
    altering GDT entries which will cause a fault.

    The correct solution to do what Linux does: let them set any GDT value
    they want and handle the #GP when popping causes a fault. This has
    the added benefit of making our Switcher slightly more robust in the
    case of any other bugs which cause it to fault.

    We kill the Guest if it causes a fault in the Switcher: it's the
    Guest's responsibility to make sure it's not using segments when it
    changes them.

    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • lguest uses a host-supplied wallclock-based clocksource when the TSC
    is not reliable. As this is already in nanoseconds, I naively used a
    multiplier of 1 and a shift of 0.

    But update_wall_time() in its infinite wisdom decides to adjust the
    clock a little (where does it think it's getting a more accurate time
    from?)

    It will happily tweak the multiplier... to 0, then -1.

    So the "fix" is to use a shift of 22 like everyone else, and a
    multiplier of 1 << 22.

    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • This reverts commit 0fc4969b866671dfe39b1a9119d0fdc7ea0f63e5. It was
    always meant to be temporary, but it's generating more useless noise
    than anything else, and we probably should never have done it in the
    generic kernel (only had the people involved test it on their own).

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Some cleanup with whitespace/tab at the end of lines.

    Signed-off-by: Nicolas Ferre
    Signed-off-by: Pierre Ossman

    Nicolas Ferre