25 May, 2011

5 commits

  • Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it
    to lib/Kconfig.debug so each arch doesn't have to define it. This
    obviously makes the option generic, but that's fine because the config is
    already used in generic code.

    It's not obvious to me that sysrq-P actually does anything caution by
    keeping the most inclusive wording.

    Signed-off-by: Stephen Boyd
    Cc: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Richard Weinberger
    Acked-by: Mike Frysinger
    Cc: Russell King
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Fold all the mmu_gather rework patches into one for submission

    Signed-off-by: Peter Zijlstra
    Reported-by: Hugh Dickins
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Rework the sparc mmu_gather usage to conform to the new world order :-)

    Sparc mmu_gather does two things:
    - tracks vaddrs to unhash
    - tracks pages to free

    Split these two things like powerpc has done and keep the vaddrs
    in per-cpu data structures and flush them on context switch.

    The remaining bits can then use the generic mmu_gather.

    Signed-off-by: Peter Zijlstra
    Acked-by: David Miller
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Hugh Dickins
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Architectures that implement their own show_mem() function did not pass
    the filter argument to show_free_areas() to appropriately avoid emitting
    the state of nodes that are disallowed in the current context. This patch
    now passes the filter argument to show_free_areas() so those nodes are now
    avoided.

    This patch also removes the show_free_areas() wrapper around
    __show_free_areas() and converts existing callers to pass an empty filter.

    ia64 emits additional information for each node, so skip_free_areas_zone()
    must be made global to filter disallowed nodes and it is converted to use
    a nid argument rather than a zone for this use case.

    Signed-off-by: David Rientjes
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Kyle McMartin
    Cc: Helge Deller
    Cc: James Bottomley
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: Unify input section names
    percpu: Avoid extra NOP in percpu_cmpxchg16b_double
    percpu: Cast away printk format warning
    percpu: Always align percpu output section to PAGE_SIZE

    Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun

    Linus Torvalds
     

24 May, 2011

1 commit


23 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (28 commits)
    sparc32: fix build, fix missing cpu_relax declaration
    SCHED_TTWU_QUEUE is not longer needed since sparc32 now implements IPI
    sparc32,leon: Remove unnecessary page_address calls in LEON DMA API.
    sparc: convert old cpumask API into new one
    sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines
    sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines
    sparc32,leon: Implemented SMP IPIs for LEON CPU
    sparc32: implement SMP IPIs using the generic functions
    sparc32,leon: SMP power down implementation
    sparc32,leon: added some SMP comments
    sparc: add {read,write}*_be routines
    sparc32,leon: don't rely on bootloader to mask IRQs
    sparc32,leon: operate on boot-cpu IRQ controller registers
    sparc32: always define boot_cpu_id
    sparc32: removed unused code, implemented by generic code
    sparc32: avoid build warning at mm/percpu.c:1647
    sparc32: always register a PROM based early console
    sparc32: probe for cpu info only during startup
    sparc: consolidate show_cpuinfo in cpu.c
    sparc32,leon: implement genirq CPU affinity
    ...

    Linus Torvalds
     
  • Fix following sparc (32 bit) build error:

    CC arch/sparc/kernel/asm-offsets.s
    In file included from include/linux/seqlock.h:29:0,
    from include/linux/time.h:8,
    from include/linux/timex.h:56,
    from include/linux/sched.h:57,
    from arch/sparc/kernel/asm-offsets.c:13:
    include/linux/spinlock.h: In function 'spin_unlock_wait':
    include/linux/spinlock.h:360:2: error: implicit declaration of function 'cpu_relax'

    Most likely caused by commit e66eed651fd1 ("list: remove
    prefetching from regular list iterators") due to include
    changes.

    Signed-off-by: Sam Ravnborg
    Cc: Stephen Rothwell
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

21 May, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     
  • Conflicts:
    arch/sparc/kernel/smp_32.c

    With merge conflict help from Daniel Hellstrom.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • David S. Miller
     

20 May, 2011

2 commits

  • …kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
    sched: Fix and optimise calculation of the weight-inverse
    sched: Avoid going ahead if ->cpus_allowed is not changed
    sched, rt: Update rq clock when unthrottling of an otherwise idle CPU
    sched: Remove unused parameters from sched_fork() and wake_up_new_task()
    sched: Shorten the construction of the span cpu mask of sched domain
    sched: Wrap the 'cfs_rq->nr_spread_over' field with CONFIG_SCHED_DEBUG
    sched: Remove unused 'this_best_prio arg' from balance_tasks()
    sched: Remove noop in alloc_rt_sched_group()
    sched: Get rid of lock_depth
    sched: Remove obsolete comment from scheduler_tick()
    sched: Fix sched_domain iterations vs. RCU
    sched: Next buddy hint on sleep and preempt path
    sched: Make set_*_buddy() work on non-task entities
    sched: Remove need_migrate_task()
    sched: Move the second half of ttwu() to the remote cpu
    sched: Restructure ttwu() some more
    sched: Rename ttwu_post_activation() to ttwu_do_wakeup()
    sched: Remove rq argument from ttwu_stat()
    sched: Remove rq->lock from the first half of ttwu()
    sched: Drop rq->lock from sched_exec()
    ...

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix rt_rq runtime leakage bug

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (107 commits)
    perf stat: Add more cache-miss percentage printouts
    perf stat: Add -d -d and -d -d -d options to show more CPU events
    ftrace/kbuild: Add recordmcount files to force full build
    ftrace: Add self-tests for multiple function trace users
    ftrace: Modify ftrace_set_filter/notrace to take ops
    ftrace: Allow dynamically allocated function tracers
    ftrace: Implement separate user function filtering
    ftrace: Free hash with call_rcu_sched()
    ftrace: Have global_ops store the functions that are to be traced
    ftrace: Add ops parameter to ftrace_startup/shutdown functions
    ftrace: Add enabled_functions file
    ftrace: Use counters to enable functions to trace
    ftrace: Separate hash allocation and assignment
    ftrace: Create a global_ops to hold the filter and notrace hashes
    ftrace: Use hash instead for FTRACE_FL_FILTER
    ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions
    perf bench, x86: Add alternatives-asm.h wrapper
    x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit
    x86, mem: memset_64.S: Optimize memset by enhanced REP MOVSB/STOSB
    x86, mem: memmove_64.S: Optimize memmove by enhanced REP MOVSB/STOSB
    ...

    Linus Torvalds
     

19 May, 2011

1 commit

  • Commit b826291c, "drivercore/dt: add a match table pointer to struct
    device" added an of_match pointer to struct device to cache the
    of_match_table entry discovered at driver match time. This was unsafe
    because matching is not an atomic operation with probing a driver. If
    two or more drivers are attempted to be matched to a driver at the
    same time, then the cached matching entry pointer could get
    overwritten.

    This patch reverts the of_match cache pointer and reworks all users to
    call of_match_device() directly instead.

    Signed-off-by: Grant Likely

    Grant Likely
     

17 May, 2011

8 commits

  • The function mmu_inval_dma_area takes a virtual address as a parameter
    which is problematic in case the buffer is located in highmem and the
    mapping currently is unavailable.

    Since the function was only implemented for LEON this patch removes
    calls to it in non LEON code paths and renames it to dma_make_coherent
    which instead takes a physical address (which for now is unused since we
    flush the whole cache). This way it is possible to remove several unnecessary
    calls to page_address which will fail if the virtual mapping is unavailable.

    Signed-off-by: Kristoffer Glembo
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Kristoffer Glembo
     
  • Adapt new API. Almost change is trivial, most important change are to
    remove following like =operator.

    cpumask_t cpu_mask = *mm_cpumask(mm);
    cpus_allowed = current->cpus_allowed;

    Because cpumask_var_t is =operator unsafe. These usage might prevent
    kernel core improvement.

    No functional change.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: David S. Miller

    KOSAKI Motohiro
     
  • The sun4d does not seem to have a distingstion between soft and hard
    IRQs. When generating IPIs the generated IRQ looks like a hard IRQ,
    this patch adds a "IPI check" in the sun4d irq trap handler at a
    predefined IRQ number (SUN4D_IPI_IRQ). Before generating an IPI
    a per-cpu memory structure is modified for the "IPI check" to
    successfully detect a IPI request to a specific processor, the check
    clears the IPI work requested.

    All three IPIs (resched, single and cpu-mask) use the same IRQ
    number.

    The IPI IRQ should preferrably be on a separate IRQ and definitly
    not shared with IRQ handlers requesting IRQ with IRQF_SHARED.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Implement the three IPIs (resched, single and cpu-mask) generation
    and interrupt handler catch. The sun4m has 15 soft-IRQs and three
    of them is used with this patch, the three IPIs was previously
    implemented with the cross-call IRQ15 which does not work with
    locking routines such as spinlocks because IRQ15 is NMI, it may
    cause deadlock.

    The IRQ trap handler code assumes (in the same spritit as the old
    it seems) that hard interrupts will be generated until handled
    (level), when a IRQ happens the IRQ pending register is checked
    for pending soft-IRQs. When both hard and soft IRQ happens at the
    same time only soft-IRQs are handled.

    The old code implemented a soft-IRQ traphandler at IRQ14 which
    called smp_reschedule_irq which in turn called set_need_resched.
    It seems to be an old relic and is replaced with the interrupt
    traphander exit code RESTORE_ALL, it calls schedule() when
    appropriate.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • This patch implements SMP IPIs on LEON using software generated
    IRQs to signal between CPUs.

    The IPI IRQ number is set by using the ipi_num property in the
    device tree, or defaults to 13. LEON SMP systems should reserve
    IRQ 13 (and IRQ 15) to Linux in order for the defaults to work.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • The current sparc32 SMP IPI generation is implemented the
    cross call function. The cross call function uses IRQ15 the
    NMI, this is has the effect that IPIs will interrupt IRQ
    critical areas and hang the system. Typically on/after
    spin_lock_irqsave calls can be aborted.

    The cross call functionality must still exist to flush
    cache/TLBS.

    This patch provides CPU models a custom way to implement
    generation of IPIs on the generic code's request. The
    typical approach is to generate an IRQ for each IPI case.

    After this patch each sparc32 SMP CPU model needs to
    implement IPIs in order to function properly.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     

13 May, 2011

1 commit


12 May, 2011

1 commit

  • When we are in the label cc_dword_align, registers %o0 and %o1 have the same last 2 bits,
    but it's not guaranteed one of them is zero. So we can get unaligned memory access
    in label ccte. Example of parameters which lead to this:
    %o0=0x7ff183e9, %o1=0x8e709e7d, %g1=3

    With the parameters I had a memory corruption, when the additional 5 bytes were rewritten.
    This patch corrects the error.

    One comment to the patch. We don't care about the third bit in %o1, because cc_end_cruft
    stores word or less.

    Signed-off-by: Tkhai Kirill
    Signed-off-by: David S. Miller

    Tkhai Kirill
     

06 May, 2011

1 commit

  • This patch adds a multiple message send syscall and is the send
    version of the existing recvmmsg syscall. This is heavily
    based on the patch by Arnaldo that added recvmmsg.

    I wrote a microbenchmark to test the performance gains of using
    this new syscall:

    http://ozlabs.org/~anton/junkcode/sendmmsg_test.c

    The test was run on a ppc64 box with a 10 Gbit network card. The
    benchmark can send both UDP and RAW ethernet packets.

    64B UDP

    batch pkts/sec
    1 804570
    2 872800 (+ 8 %)
    4 916556 (+14 %)
    8 939712 (+17 %)
    16 952688 (+18 %)
    32 956448 (+19 %)
    64 964800 (+20 %)

    64B raw socket

    batch pkts/sec
    1 1201449
    2 1350028 (+12 %)
    4 1461416 (+22 %)
    8 1513080 (+26 %)
    16 1541216 (+28 %)
    32 1553440 (+29 %)
    64 1557888 (+30 %)

    We see a 20% improvement in throughput on UDP send and 30%
    on raw socket send.

    [ Add sparc syscall entries. -DaveM ]

    Signed-off-by: Anton Blanchard
    Signed-off-by: David S. Miller

    Anton Blanchard
     

27 Apr, 2011

1 commit


22 Apr, 2011

14 commits

  • Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • * proper initialization of boot_cpu_id (no hardcoding to 0)
    * use boot_cpu_id index to address into the IRQ controller where
    appropriate

    Each CPU has a separate set of IRQ controller registers, this
    patch makes sure that the boot-cpu registers are used instead
    of CPU0's.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Define boot_cpu_id in single-processor kernels as well. This is
    to support architectures which can boot on other than CPU0.

    Sam Ravnborg has written the cleanup parts by extracting
    boot_cpu_id from smp_32.c into setup_32.c and cleaned up
    sun4d_irq.c.

    boot_cpu_id was initialized before BSS was cleared in
    sun4c_continue_boot, instead boot_cpu_id is set to 0xff to
    avoid BSS. If boot_cpu_id is untouched (0xff) by bootup code
    it will be overwritten to 0. boot_cpu_id4 is automatically
    calculated in common code.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • The sparcstation 5 I have available has no MID property for the CPU.
    This resulted in a panic when booting a SMP kernel on this box.

    The assigned field in cpu_data is never used, so if we fail
    to read the MID property then inform user and continue booting.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • Fix following warning:

    mm/percpu.c: In function 'pcpu_embed_first_chunk':
    mm/percpu.c:1647:3: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'unsigned int'

    Signed-off-by: Daniel Hellstrom
    [sam: added warning message to changelog, use _AC()]
    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • Do not require user to add "-p" to boot arguments to see
    early info printed to prom console.

    This is similar to the sparc64 functionality - which was added with:
    3c62a2d3477ff7725210db57aec3d2806fa10c20 ("[SPARC64]: Always register
    a PROM based early console.")

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • We did a cpu_probe() call each time a CPU got online - which
    only effect was to save latest CPU/FPU info for use by show_cpuinfo().
    Use same setup as for sparc64 where we probe for this info during startup,
    and only once.

    This allowed us to annotate a few functions __init which again
    fixed the following section mismatch warnings:

    WARNING: vmlinux.o(.text+0x65f0): Section mismatch in reference from the function set_cpu_and_fpu() to the (unknown reference) .init.rodata:(unknown)
    WARNING: vmlinux.o(.text+0x65f8): Section mismatch in reference from the function set_cpu_and_fpu() to the (unknown reference) .init.rodata:(unknown)
    WARNING: vmlinux.o(.text+0x664c): Section mismatch in reference from the function set_cpu_and_fpu() to the variable .init.rodata:manufacturer_info
    WARNING: vmlinux.o(.text+0x6650): Section mismatch in reference from the function set_cpu_and_fpu() to the variable .init.rodata:manufacturer_info

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • We have all the cpu related info in cpu.c - so move
    the remaining functions to support /proc/cpuinfo to this file.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • In all cases there were a struct of_device_id variable defined __initdata.
    But it was referenced from struct platform_driver.of_match_table
    which is not guaranteed to be used during init only.

    So drop the __initdata annotation.

    This fixes following warnings:

    WARNING: arch/sparc/kernel/built-in.o(.data+0x810): Section mismatch in reference from the variable clock_driver to the variable .init.data:clock_match
    The variable clock_driver references
    the variable __initdata clock_match
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: arch/sparc/kernel/built-in.o(.data+0xcec): Section mismatch in reference from the variable apc_driver to the variable .init.data:apc_match
    The variable apc_driver references
    the variable __initdata apc_match
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: arch/sparc/kernel/built-in.o(.data+0xd60): Section mismatch in reference from the variable pmc_driver to the variable .init.data:pmc_match
    The variable pmc_driver references
    the variable __initdata pmc_match
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • A simple implementation of CPU affinity, the first CPU in
    the affinity CPU mask always takes the IRQ.

    Signed-off-by: Daniel Hellstrom
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Cleaned up leon_init_timers() by removing unnecessary double checking
    and one indentation level. Changed LEON_IMASK to LEON_IMASK(cpu).

    Signed-off-by: Daniel Hellstrom
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Signed-off-by: Daniel Hellstrom
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Signed-off-by: Daniel Hellstrom
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Daniel Hellstrom