13 Oct, 2009

2 commits

  • Meaning receive multiple messages, reducing the number of syscalls and
    net stack entry/exit operations.

    Next patches will introduce mechanisms where protocols that want to
    optimize this operation will provide an unlocked_recvmsg operation.

    This takes into account comments made by:

    . Paul Moore: sock_recvmsg is called only for the first datagram,
    sock_recvmsg_nosec is used for the rest.

    . Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
    works in the same fashion as the ppoll one.

    If the underlying protocol returns a datagram with MSG_OOB set, this
    will make recvmmsg return right away with as many datagrams (+ the OOB
    one) it has received so far.

    . Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
    datagrams and then recvmsg returns an error, recvmmsg will return
    the successfully received datagrams, store the error and return it
    in the next call.

    This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
    where we will be able to acquire the lock only at batch start and end, not at
    every underlying recvmsg call.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     
  • Create a new socket level option to report number of queue overflows

    Recently I augmented the AF_PACKET protocol to report the number of frames lost
    on the socket receive queue between any two enqueued frames. This value was
    exported via a SOL_PACKET level cmsg. AFter I completed that work it was
    requested that this feature be generalized so that any datagram oriented socket
    could make use of this option. As such I've created this patch, It creates a
    new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
    SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
    overflowed between any two given frames. It also augments the AF_PACKET
    protocol to take advantage of this new feature (as it previously did not touch
    sk->sk_drops, which this patch uses to record the overflow count). Tested
    successfully by me.

    Notes:

    1) Unlike my previous patch, this patch simply records the sk_drops value, which
    is not a number of drops between packets, but rather a total number of drops.
    Deltas must be computed in user space.

    2) While this patch currently works with datagram oriented protocols, it will
    also be accepted by non-datagram oriented protocols. I'm not sure if thats
    agreeable to everyone, but my argument in favor of doing so is that, for those
    protocols which aren't applicable to this option, sk_drops will always be zero,
    and reporting no drops on a receive queue that isn't used for those
    non-participating protocols seems reasonable to me. This also saves us having
    to code in a per-protocol opt in mechanism.

    3) This applies cleanly to net-next assuming that commit
    977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted

    Signed-off-by: Neil Horman
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Neil Horman
     

03 Oct, 2009

7 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm: (25 commits)
    ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7
    ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
    ARM: 5740/1: fix valid_phys_addr_range() range check
    ARM: 5739/1: ARM: allow empty ATAG_CORE
    ARM: 5735/1: sa1111: CodingStyle cleanups
    ARM: 5738/1: Correct TCM documentation
    ARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs
    ARM: 5733/1: fix bcmring compile error
    ARM: 5732/1: remove redundant include file
    ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3
    ARM: Ensure do_cache_op takes mmap_sem
    ARM: Fix __cpuexit section mismatch warnings
    ARM: Don't allow highmem on SMP platforms without h/w TLB ops broadcast
    ARM: includecheck fix: mach-davinci, board-dm365-evm.c
    ARM: Remove unused CONFIG SA1100_H3XXX
    ARM: Fix warning: unused variable 'highmem'
    ARM: Fix warning: #warning syscall migrate_pages not implemented
    ARM: Fix SA11x0 clocksource warning
    ARM: Fix SA1100 Neponset serial section mismatch
    ARM: Fix SA1100 Assabet/Neponset PCMCIA section mismatch warnings
    ...

    Linus Torvalds
     
  • Currently, on ARMv6 and ARMv7, if an application tries to execute
    code (or garbage) on non-executable page it hangs. It caused by
    incorrect prefetch abort handling. Now every prefetch abort
    processes as a translation fault.

    To fix this we have to analyze instruction fault status register
    to figure out reason why we've got the abort and process it
    accordingly.

    To make IFSR different from DFSR we set bit 31 which is reserved in
    both IFSR and DFSR.

    This patch also tries to protect from future hangs on unexpected
    exceptions. An application will be killed if unexpected exception
    type was received.

    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Russell King

    Kirill A. Shutemov
     
  • Instruction fault status register, IFSR, was introduced on ARMv6 to
    provide status information about the last insturction fault. It
    needed for proper prefetch abort handling.

    Now we have three prefetch abort model:

    * legacy - for CPUs before ARMv6. They doesn't provide neither
    IFSR nor IFAR. We simulate IFSR with section translation fault
    status for them to generalize code;
    * ARMv6 - provides IFSR, but not IFAR;
    * ARMv7 - provides both IFSR and IFAR.

    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Russell King

    Kirill A. Shutemov
     
  • Commit 1522ac3ec95ff0230e7aa516f86b674fdf72866c
    ("Fix virtual to physical translation macro corner cases")
    breaks the end of memory check in valid_phys_addr_range().
    The modified expression results in the apparent /dev/mem size
    being 2 bytes smaller than what it actually is.

    This patch reworks the expression to correctly check the address,
    while maintaining use of a valid address to __pa().

    Signed-off-by: Greg Ungerer
    Signed-off-by: Russell King

    Greg Ungerer
     
  • From: David Brown

    The ATAG_CORE is allowed to be empty. Although this is handled
    by parse_tag_core(), __vet_atags during startup rejects this tag
    unless it contains data. Allow the initial tag to be either the
    full size, or empty.

    Signed-off-by: David Brown
    Signed-off-by: Russell King

    David Brown
     
  • EXPORT_* macros should follow immediately after the closing function
    brace line.

    Signed-off-by: H Hartley Sweeten
    Acked-by: Kristoffer Ericson
    Signed-off-by: Russell King

    Hartley Sweeten
     
  • Conflicts:
    MAINTAINERS

    Russell King
     

02 Oct, 2009

3 commits

  • Add better support for omitting either the card detect or the write
    protect GPIOs if the board does not support it. Add the fields
    no_wprotect and no_detect to the platform data which when set indicate the
    absence of the respective GPIOs.

    Note, this also fixes a minor bug where it tries to free IRQ0 if there is
    no detect gpio available.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Add a selection for the data transfer mode of the s3cmci driver, allowing
    for either a configuration or rumtime selection of the use of the DMA or
    PIO transfer code.

    The PIO only mode is 476 bytes smaller than the driver with both methods
    compiled in.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • [akpm@linux-foundation.org: fix KVM]
    Signed-off-by: Alexey Dobriyan
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

01 Oct, 2009

4 commits

  • Commit 181f817eaaca4c1f introduced some new code to entry-common.S
    Sadly, this new code uses 'bx' instruction which is available only on
    ARMv5 and higher CPUs. This causes following compilation errors when
    building kernel for StrongARM (ARMv4):

    arch/arm/kernel/entry-common.S: Assembler messages:
    arch/arm/kernel/entry-common.S:129: Error: selected processor does not
    support `bx ip'
    arch/arm/kernel/entry-common.S:138: Error: selected processor does not
    support `bx ip'

    Fix these errors by using 'mov pc' instead of 'bx'.

    Signed-off-by: Dmitry Artamonow
    Acked-by: Uwe Kleine-König
    Signed-off-by: Russell King

    Dmitry Artamonow
     
  • The movement of the MMCI header file made bcmring break. It turns
    out it was including asm/mmc.h without using it so fixing the
    problem boils down to removing the offending include.

    Signed-off-by: Linus Walleij
    Acked-by: Scott Branden
    Signed-off-by: Leo Hao Chen
    Signed-off-by: Russell King

    Leo Chen
     
  • Remove duplicated #include('s) in arch/arm/mach-bcmring/core.c

    Signed-off-by: Huang Weiyi
    Signed-off-by: Leo Chen
    Signed-off-by: Russell King

    Leo Chen
     
  • The #ifdefs in the MMCI driver were erroneous and just masking
    a bug in the U300 generic GPIO implementation. This removes the
    ifdefs and fixes the U300 generic GPIO instead.

    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     

30 Sep, 2009

1 commit

  • …/git/tmlind/linux-omap-2.6

    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
    omap: Fix wrong condition check in while loop for mailbox and iommu2
    omap: rng: Use resource_size instead of manual calculation
    omap: Fix MMC gpio_wp for BeagleBoard C2 and above
    omap: Fix matrix_keymap_data usage
    omap: Fix a OMAP_MPUIO_VBASE typo for 850
    omap: Fix wrong jtag_id for 850
    omap: iovmm: Fix compiler warning
    omap: mailbox: Flush posted write when acking mailbox irq
    omap: mailbox: Execute softreset at startup
    omap: Add missing mux pin for EHCI phy reset line
    omap: Fix 44xx compile
    omap: Fix mcspi compile for 2420
    omap: Fix compile for arch/arm/mach-omap2

    Linus Torvalds
     

29 Sep, 2009

10 commits

  • do_cache_op() uses find_vma() to validate its arguments without holding
    any locking. This means that the VMA could vanish beneath us. Fix
    this by taking a read lock on mmap_sem.

    Signed-off-by: Russell King

    Russell King
     
  • Fix:

    WARNING: vmlinux.o(.text+0x247c): Section mismatch in reference from the function cpu_idle() to the function .cpuexit.text:cpu_die()
    The function cpu_idle() references a function in an exit section.
    Often the function cpu_die() has valid usage outside the exit section
    and the fix is to remove the __cpuexit annotation of cpu_die.

    WARNING: vmlinux.o(.cpuexit.text+0x3c): Section mismatch in reference from the function cpu_die() to the function .cpuinit.text:secondary_start_kernel()
    The function __cpuexit cpu_die() references
    a function __cpuinit secondary_start_kernel().
    This is often seen when error handling in the exit function
    uses functionality in the init path.
    The fix is often to remove the __cpuinit annotation of
    secondary_start_kernel() so it may be used outside an init section.

    Sam says:
    > The annotation of cpu_die() is wrong.
    > To be annotated __cpuexit the function shall:
    > - be used in exit context and only in exit context with HOTPLUG_CPU=n
    > - be used outside exit context with HOTPLUG_CPU=y

    So, this also means __cpu_disable(), __cpu_die() and twd_timer_stop() are
    also wrong. However, removing __cpuexit from cpu_die() creates:

    WARNING: vmlinux.o(.text+0x6834): Section mismatch in reference from the function cpu_die() to the function .cpuinit.text:secondary_start_kernel()
    The function cpu_die() references
    the function __cpuinit secondary_start_kernel().
    This is often because cpu_die lacks a __cpuinit
    annotation or the annotation of secondary_start_kernel is wrong.

    so fix this using __ref.

    Signed-off-by: Russell King
    Acked-by: Sam Ravnborg

    Russell King
     
  • We suffer an unfortunate combination of "features" which makes highmem
    support on platforms without hardware TLB maintainence broadcast difficult:

    - we need kmap_high_get() support for DMA cache coherence
    - this requires kmap_high() to take a spinlock with IRQs disabled
    - kmap_high() occasionally calls flush_all_zero_pkmaps() to clear
    out old mappings
    - flush_all_zero_pkmaps() calls flush_tlb_kernel_range(), which
    on s/w IPI'd systems eventually calls smp_call_function_many()
    - smp_call_function_many() must not be called with IRQs disabled:

    WARNING: at kernel/smp.c:380 smp_call_function_many+0xc4/0x240()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x108) from [] (dump_stack+0x18/0x1c)
    r6:c007cd18 r5:c02ff228 r4:0000017c
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x50/0x80)
    [] (warn_slowpath_common+0x0/0x80) from [] (warn_slowpath_null+0x18/0x1c)
    r7:00000003 r6:00000001 r5:c1ff4000 r4:c035fa34
    [] (warn_slowpath_null+0x0/0x1c) from [] (smp_call_function_many+0xc4/0x240)
    [] (smp_call_function_many+0x0/0x240) from [] (smp_call_function+0x2c/0x38)
    [] (smp_call_function+0x0/0x38) from [] (on_each_cpu+0x1c/0x38)
    [] (on_each_cpu+0x0/0x38) from [] (flush_tlb_kernel_range+0x50/0x58)
    r6:00000001 r5:00000800 r4:c05f3590
    [] (flush_tlb_kernel_range+0x0/0x58) from [] (flush_all_zero_pkmaps+0xc0/0xe8)
    [] (flush_all_zero_pkmaps+0x0/0xe8) from [] (kmap_high+0x8c/0x1e0)
    [] (kmap_high+0x0/0x1e0) from [] (kmap+0x44/0x5c)
    [] (kmap+0x0/0x5c) from [] (cramfs_readpage+0x3c/0x194)
    [] (cramfs_readpage+0x0/0x194) from [] (__do_page_cache_readahead+0x1f0/0x290)
    [] (__do_page_cache_readahead+0x0/0x290) from [] (ra_submit+0x30/0x38)
    [] (ra_submit+0x0/0x38) from [] (filemap_fault+0x3dc/0x438)
    r4:c1819988
    [] (filemap_fault+0x0/0x438) from [] (__do_fault+0x58/0x43c)
    [] (__do_fault+0x0/0x43c) from [] (handle_mm_fault+0x104/0x318)
    [] (handle_mm_fault+0x0/0x318) from [] (do_page_fault+0x188/0x1e4)
    [] (do_page_fault+0x0/0x1e4) from [] (do_translation_fault+0x7c/0x84)
    [] (do_translation_fault+0x0/0x84) from [] (do_DataAbort+0x40/0xa4)
    r8:c1ff5e20 r7:c0340120 r6:00000805 r5:c1ff5e54 r4:c03400d0
    [] (do_DataAbort+0x0/0xa4) from [] (__dabt_svc+0x4c/0x60)
    ...

    So we disable highmem support on these systems.

    Signed-off-by: Russell King

    Russell King
     
  • fix the following 'make includecheck' warning:

    arch/arm/mach-davinci/board-dm365-evm.c: mach/common.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Acked-by: Kevin Hilman
    Signed-off-by: Russell King

    Jaswinder Singh Rajput
     
  • Removed unused CONFIG SA1100_H3XXX from Kconfig and defconfig

    Reported-by: Robert P. J. Day
    Signed-off-by: Jaswinder Singh Rajput
    Acked-by: Dmitry Artamonow
    Cc: Philipp Zabel
    Cc: Kristoffer Ericson
    Signed-off-by: Russell King

    Jaswinder Singh Rajput
     
  • Signed-off-by: Russell King

    Russell King
     
  • We're not implementing this syscall (we're not NUMA) so we might as
    well silence this warning.

    Signed-off-by: Russell King

    Russell King
     
  • 8e19608 missed updating SA11x0, and thus:

    arch/arm/mach-sa1100/time.c:88: warning: initialization from incompatible pointer type

    Signed-off-by: Russell King

    Russell King
     
  • WARNING: vmlinux.o(.text+0xc9d4): Section mismatch in reference from the function pci_v3_scan_bus() to the function .devinit.text:pci_scan_bus_parented()
    The function pci_v3_scan_bus() references
    the function __devinit pci_scan_bus_parented().
    This is often because pci_v3_scan_bus lacks a __devinit
    annotation or the annotation of pci_scan_bus_parented is wrong.

    Signed-off-by: Russell King
    Acked-by: Sam Ravnborg

    Russell King
     
  • It's worked fine so far since reset is done for the first time.

    Reported-by: Juha Leppanen
    Signed-off-by: Hiroshi DOYU
    Signed-off-by: Juha Leppanen
    Signed-off-by: Tony Lindgren

    Hiroshi DOYU
     

27 Sep, 2009

1 commit

  • Commit 200b812d00 "Clear the exclusive monitor when returning from an
    exception" broke the vast majority of ARM systems in the wild which are
    still pre ARMv6. The kernel is crashing on the first occurrence of an
    exception due to the removal of the actual return instruction for them.
    Let's add it back.

    Signed-off-by: Nicolas Pitre
    Acked-by: Uwe Kleine-König
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     

25 Sep, 2009

12 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
    genetlink: fix netns vs. netlink table locking (2)
    3c59x: Get rid of "Trying to free already-free IRQ"
    tunnel: eliminate recursion field
    ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2
    net: fix htmldocs sunrpc, clnt.c
    Phonet: error on broadcast sending (unimplemented)
    Phonet: fix race for port number in concurrent bind()
    pktgen: better scheduler friendliness
    pktgen: T_TERMINATE flag is unused
    ipv4: check optlen for IP_MULTICAST_IF option
    ath9k: Initialize txgain and rxgain for newer AR9287 chipsets.
    iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx
    ath9k: Fix RFKILL bugs
    drivers/net/wireless: Use usb_endpoint_dir_out
    cfg80211: don't overwrite privacy setting
    wl12xx: fix kconfig/link errors
    rt2x00: fix the definition of rt2x00crypto_rx_insert_iv
    iwlwifi: reduce noise when skb allocation fails
    iwlwifi: do not send sync command while holding spinlock
    mac80211: fix DTIM setting
    ...

    Linus Torvalds
     
  • Earlier BeagleBoards were using pad AH8 muxed to GPIO29 for MMC write-protect.
    However, this signal has been changed to pad AG9 in board revision C2.

    Fix this by adding mux configuration for pad AG9, runtime check for board
    revisions and set the gpio number and pad muxing accordingly.

    Signed-off-by: Jarkko Nikula
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Otherwise we'll get compile errors like:

    arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
    arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined
    ...

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • This was crashing omap850 devices.

    Reported-by:
    Alistair Buxton

    Signed-off-by: Angelo Arrifano
    Signed-obb-by: Tony Lindgren

    Angelo Arrifano
     
  • Original message:
    The previous value of the jtag_id was set for the omap730. For the
    omap850, this value is different, and this was causing
    autodetection to fail.

    Reported-by:
    Cory Maccarrone
    Angelo Arrifano
    Alistair Buxton

    Signed-off-by: Angelo Arrifano
    Signed-off-by: Tony Lindgren

    Angelo Arrifano
     
  • This patch fixes these compiler warnings:

    arch/arm/plat-omap/iovmm.c: In function 'vmap_sg':
    arch/arm/plat-omap/iovmm.c:202: warning: passing argument 1 of
    'flush_cache_vmap' makes integer from pointer without a cast
    arch/arm/plat-omap/iovmm.c:202: warning: passing argument 2 of
    'flush_cache_vmap' makes integer from pointer without a cast
    arch/arm/plat-omap/iovmm.c: In function 'sgtable_fill_vmalloc':
    arch/arm/plat-omap/iovmm.c:393: warning: passing argument 1 of
    'flush_cache_vmap' makes integer from pointer without a cast
    arch/arm/plat-omap/iovmm.c:393: warning: passing argument 2 of
    'flush_cache_vmap' makes integer from pointer without a cast

    Signed-off-by: Sanjeev Premi
    Signed-off-by: Tony Lindgren

    Sanjeev Premi
     
  • The only way to flush posted write to L4 bus is to do a read back
    of the same register right after the write.

    This seems to be mostly needed in interrupt handlers to avoid
    causing spurious interrupts.

    The earlier fix has been to mark the L4 bus as strongly ordered
    memory, which solves the problem, but causes performance penalties.

    Similar to the fix, 03803a71041e3bc3c077f4e7b92f6ceaa9426df3

    Signed-off-by: Hiroshi DOYU
    Signed-off-by: Tony Lindgren

    Hiroshi DOYU
     
  • The softreset at startup is introduced as TRM describes and also some
    register bit definitions are added instead of magic number.

    Signed-off-by: Hiroshi DOYU
    Signed-off-by: Tony Lindgren

    Hiroshi DOYU
     
  • GPIO135 is used as EHCI (port2) phy reset pin on Multi Media Daughter card
    connected to OMAP3EVM.

    Signed-off-by: Ajay Kumar Gupta
    Signed-off-by: Tony Lindgren

    Ajay Kumar Gupta
     
  • Looks like these patches were not tested that well..

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • Commit 7869c0b9ed44404bbc675ef76f8ccb3be5496f39 added support for
    additional McSPI ports. Unfortunately that broke compile for 2420.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • Patch 941132606c7611246d2034cb7b01f9270c2d1ede split IO_ADDRESS
    into OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS except for the omap4
    code to avoid merge conflicts with the omap4 code that was queued
    earlier.

    Signed-off-by: Tony Lindgren

    Tony Lindgren