15 Oct, 2009
2 commits
-
Signed-off-by: David S. Miller
-
Reported-by: "Tony Luck"
Signed-off-by: Arnaldo Carvalho de Melo
Acked-by: Tony Luck
Signed-off-by: David S. Miller
13 Oct, 2009
3 commits
-
Extend the sh_eth driver to allow passing the mac address
using the platform data structure. This to simplify board
setup code.Signed-off-by: Magnus Damm
Tested-by: Kuninori Morimoto
Signed-off-by: David S. Miller -
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 -
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 revertedSigned-off-by: Neil Horman
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
04 Oct, 2009
7 commits
-
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
m32r: Fix IPI function calls for SMP
m32r: Fix set_memory() for DISCONTIGMEM
m32r: add rtc_lock variable
m32r: define ioread* and iowrite* macros
m32r: export delay loop symbols
m32r: fix tme_handler -
This patch fixes the m32r SMP kernel after 2.6.27.
A part of the following patch breaks m32r SMP operation.
> m32r: convert to generic helpers for IPI function calls
> commit 7b7426c8a615cf61df9a77b9df7d5b75d91e3fa0In the above patch, a CALL_FUNC_SINGLE_IPI was newly introduced,
but the its IPI vector number was wrong in the patch code.The m32r SMP kernel hanged-up during boot operation, because
the CPU_BOOT_IPI was called instead of CALL_FUNC_SINGLE_IPI
(CPU_BOOT_IPI had no side effect at that time because the 2nd
core had already been started up),
as a result, csd_unlock() was not called, then a dead lock
occurred in csd_lock_wait() after the detection of Compact Flash
memory as IDE generic disk.Signed-off-by: Toshihiro HANAWA
Signed-off-by: Hirokazu Takata -
In case CONFIG_DISCONTIGMEM is set, the memory size of system was
always determined by CONFIG_MEMORY_SIZE and was not changeable.This patch fixes set_memory() of arch/m32r/mm/discontig.c so that
we can specify memory size by the "mem=" kernel parameter.Signed-off-by: Hirokazu Takata
-
Add a spinlock variable "rtc_lock".
This is taken from arch/arm/kernel/time.c.Signed-off-by: Hirokazu Takata
-
Define ioread* and iowrite* macros to fix the following build errors:
CC [M] drivers/uio/uio_smx.o
drivers/uio/uio_smx.c: In function 'smx_handler':
drivers/uio/uio_smx.c:31: error: implicit declaration of function 'ioread32'
drivers/uio/uio_smx.c:37: error: implicit declaration of function 'iowrite32'Signed-off-by: Hirokazu Takata
-
- Move EXPORT_SYMBOL lines of delay loop functions
from arch/m32r/kernel/m32r_ksyms.c to arch/m32r/lib/delay.c.
- Export __ndelay.Signed-off-by: Hirokazu Takata
-
Fix pmd_bad check code of tme_handler (TLB Miss Exception handler).
The correct _KERNPG_TABLE value is not 0x263(=611) but 0x163.Signed-off-by: Hirokazu Takata
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
... -
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 -
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 -
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 -
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 -
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 -
Conflicts:
MAINTAINERS
02 Oct, 2009
6 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 -
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 -
Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.This caused failures in Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).Signed-off-by: Samuel Thibault
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Acked-by: "David S. Miller"
Cc: Andi Kleen
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix some build failures when using gcc-4.x for MN10300.
Firstly, __get_user() fails to build because the pointer points to a const and
__gu_val ends up being read-only:In file included from include/linux/mempolicy.h:62,
from init/main.c:50:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
make[1]: *** [init/main.o] Error 1Secondly, gcc-4 doesn't allow casts of lvalues:
UPD include/linux/compile.h
arch/mn10300/kernel/rtc.c: In function 'calibrate_clock':
arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment
arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment
make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1These are seen with gcc 4.2.1.
Signed-off-by: Mark Salter
Signed-off-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Revert 45d80eea87c9f8292d2d33173d6866c0ec57238a ("m68k: convert to
asm-generic/hardirq.h") - it fails to compile due to an inclusion tangle:In file included from include/linux/irq.h:12,
from include/asm-generic/hardirq.h:6,
from /usr/src/devel/arch/m68k/include/asm/hardirq_mm.h:6,
from /usr/src/devel/arch/m68k/include/asm/hardirq.h:4,
from include/linux/hardirq.h:10,
from /usr/src/devel/arch/m68k/include/asm/system_mm.h:69,
from /usr/src/devel/arch/m68k/include/asm/system.h:4,
from include/linux/list.h:7,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:56,
from arch/m68k/kernel/asm-offsets.c:14:
include/linux/smp.h:17: error: field 'list' has incomplete typeCc: Christoph Hellwig
Cc: Geert Uytterhoeven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
[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
01 Oct, 2009
15 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 -
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 -
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 -
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 -
…l/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched_clock: Fix atomicity/continuity bug by using cmpxchg64()
x86: Provide an alternative() based cmpxchg64() -
cmpxchg64() today generates, to quote Linus, "barf bag" code.
cmpxchg64() is about to get used in the scheduler to fix a bug there,
but it's a prerequisite that cmpxchg64() first be made non-sucking.This patch turns cmpxchg64() into an efficient implementation that
uses the alternative() mechanism to just use the raw instruction on
all modern systems.Note: the fallback is NOT smp safe, just like the current fallback
is not SMP safe. (Interested parties with i486 based SMP systems
are welcome to submit fix patches for that.)Signed-off-by: Arjan van de Ven
Acked-by: Linus Torvalds
[ fixed asm constraint bug ]
Fixed-by: Eric Dumazet
Cc: Martin Schwidefsky
Cc: John Stultz
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ingo Molnar -
arch/mips/include/asm/unaligned.h: linux/unaligned/generic.h is included more than once.
Entirely legitimate but just noise.
Signed-off-by: Ralf Baechle
-
Signed-off-by: Ralf Baechle
-
Signed-off-by: Ralf Baechle
-
It's not obvious what good it was supposed to do here anyway.
Signed-off-by: Ralf Baechle
-
Signed-off-by: Ralf Baechle
-
Signed-off-by: Maxime Bizon
Reviewed-by: Wolfram Sang
Signed-off-by: Ralf Baechle -
Produce an error if request_irq() fails.
Signed-off-by: Roel Kluin
Cc: "Ithamar R. Adema"
Signed-off-by: Andrew Morton
Signed-off-by: Ralf Baechle -
There are 16 individual channels (NUM_DBDMA_CHANS) to save/restore plus the
global ddma block config (the +1). The last register in a channel can be
skipped since it's read-only (at offset 0x18).Signed-off-by: Roel Kluin
Cc: Manuel Lauss
Signed-off-by: Andrew Morton
Signed-off-by: Ralf Baechle -
Signed-off-by: Ralf Baechle