* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit>
ide: introduce HAVE_IDE
kbuild: silence CHK/UPD messages according to $(quiet)
scsi: fix makefile for aic7(3*x)
kbuild/modpost: Use warn() for announcing section mismatches
Add binoffset to gitignore
kbuild/modpost: improve warnings if symbol is unknown
Linus Torvalds [Sat, 9 Feb 2008 19:12:15 +0000 (11:12 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
mmc: extend ricoh_mmc to support Ricoh RL5c476
at91_mci: use generic GPIO calls
sdhci: add num index for multi controllers case
MAINTAINERS: remove non-existant URLs
mmc: remove sdhci and mmc_spi experimental markers
mmc: Handle suspend/resume in Ricoh MMC disabler
Alex Dubov [Sat, 9 Feb 2008 18:20:54 +0000 (10:20 -0800)]
memstick: initial commit for Sony MemoryStick support
Sony MemoryStick cards are used in many products manufactured by Sony.
They are available both as storage and as IO expansion cards. Currently,
only MemoryStick Pro storage cards are supported via TI FlashMedia
MemoryStick interface.
[mboton@gmail.com: biuld fix]
[akpm@linux-foundation.org: build fix] Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Miguel Boton <mboton@gmail.co> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
CC init/main.o
In file included from include2/asm/uaccess.h:8,
from include/linux/poll.h:13,
from include/linux/rtc.h:113,
from include/linux/efi.h:19,
from linux-2.6/init/main.c:43:
include/linux/mm.h:1151:
error: expected declaration specifiers or '...' before 'pgtable_t'
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Reported-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Rientjes [Sat, 9 Feb 2008 08:10:15 +0000 (00:10 -0800)]
memcontrol: add vm_match_cgroup()
mm_cgroup() is exclusively used to test whether an mm's mem_cgroup pointer
is pointing to a specific cgroup. Instead of returning the pointer, we can
just do the test itself in a new macro:
vm_match_cgroup(mm, cgroup)
returns non-zero if the mm's mem_cgroup points to cgroup. Otherwise it
returns zero.
Signed-off-by: David Rientjes <rientjes@google.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Kosina [Sat, 9 Feb 2008 08:10:14 +0000 (00:10 -0800)]
UML: fix hostfs build
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/hostfs/hostfs_kern.c: In function 'hostfs_show_options':
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/hostfs/hostfs_kern.c:328: error: dereferencing pointer to incomplete type
We need to include mount.h to get vfsmount.
Signed-off-by: Jiri Kosina <jkosina@suse.cz> Reported-by: Adrian Bunk <bunk@stusta.de> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matt Mackall [Sat, 9 Feb 2008 08:10:12 +0000 (00:10 -0800)]
Fix compile error on nommu for is_swap_pte
CC mm/vmscan.o
In file included from
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
Does it ever make sense to ask "is this pte a swap entry?" on a machine
with no MMU? Presumably this also means it has no ptes too, right? In
which case, it's better to comment the whole function out. Then when
someone tries to ask the above meaningless question, they get a compile
error rather than a meaningless answer.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Mike Frysinger <vapier@gentoo.org> Reported-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for different number of page table levels dependent
on the highest address used for a process. This will cause a 31 bit
process to use a two level page table instead of the four level page
table that is the default after the pud has been introduced. Likewise
a normal 64 bit process will use three levels instead of four. Only
if a process runs out of the 4 tera bytes which can be addressed with
a three level page table the fourth level is dynamically added. Then
the process can use up to 8 peta byte.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
There are two problems in the vt220 intialization:
o Currently the vt220 console looses early printk events until the
the vt220 tty is registered.
o console should work if tty_register fails
sclp_vt220_con_init calls __sclp_vt220_init and register_console.
It does not register the driver with the sclp core code via
sclp_register. That results in an sclp_send_mask=0. Therefore,
__sclp_vt220_emit will reject buffers with EIO. Unfortunately
register_console will cause the printk buffer to be sent to the
console and, therefore, every early message gets dropped. The
sclp_send_mask is set later during boot, when sclp_vt220_tty_init
calls sclp_register.
The solution is to move the sclp_register call from sclp_vt220_tty_init
to __sclp_vt220_init. This makes sure that the console is properly
registered with the sclp subsystem before the first log buffer messages
are passed to the vt220 console.
We also adopt the cleanup on error to keep the console alive if
tty_register fails.
Thanks to Peter Oberparleiter and Heiko Carstens for review and ideas
for improvement.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Ursula Braun [Sat, 9 Feb 2008 17:24:32 +0000 (18:24 +0100)]
[S390] qdio: avoid hang when establishing qdio queues
If qdio establish runs in parallel with a channel error,
ccw_device_start_timeout may not trigger the qdio_timeout_handler.
In this case neither QDIO_IRQ_STATE_ESTABLISHED nor
QDIO_IRQ_STATE_ERR is reached and the following wait_event hangs
forever.
Solution: do not make use of the timeout option with
ccw_device_start, but add a timeout to the following wait_event.
Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
With the new space saving spinlock_t and a non-debug configuration
the struct page only has 32 bytes for 31 bit s390. The causes an
overflow in the calculation of VMEM_MAX_PHYS which renders the
kernel unbootable.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
The black art of inline assemblies.. The new __ffs_word_loop/
__ffz_word_loop inline assemblies need an early clobber for the
two input/output variables.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Sam Ravnborg [Sat, 9 Feb 2008 09:46:40 +0000 (10:46 +0100)]
ide: introduce HAVE_IDE
To allow flexible configuration of IDE introduce HAVE_IDE.
All archs except arm, um and s390 unconditionally select it.
For arm the actual configuration determine if IDE is supported.
This is a step towards introducing drivers/Kconfig for arm.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Russell King - ARM Linux <linux@arm.linux.org.uk> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sam Ravnborg [Wed, 6 Feb 2008 22:05:33 +0000 (23:05 +0100)]
scsi: fix makefile for aic7(3*x)
Fix bug introduced by my latest fix to the aic7xxx Makefile.
Test build on x86 32 and 64 bit.
Without and with -j (parallel build)
Building firmaware is br0ken with O=... but this
is unrelated to this bug-fix.
Tested-by: Adrian Bunk <bunk@kernel.org> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg [Wed, 6 Feb 2008 20:51:18 +0000 (21:51 +0100)]
kbuild/modpost: improve warnings if symbol is unknown
If we cannot determine the symbol then print
(unknown) to hint the reader that we failed to
find the symbol.
This happens with REL relocation records
in arm object files.
Carlos Corbacho [Sat, 9 Feb 2008 01:32:25 +0000 (01:32 +0000)]
acer-wmi - Add documentation
Add some initial documentation detailing what acer-wmi is, and how to use
it. Update the Kconfig entry with a reference to the documentation.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
Carlos Corbacho [Sat, 9 Feb 2008 01:32:19 +0000 (01:32 +0000)]
sonypi - Move sonypi.txt to Documentation/laptops
Also update references to sonypi.txt in Kconfig.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> CC: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Carlos Corbacho [Sat, 9 Feb 2008 01:32:14 +0000 (01:32 +0000)]
sony-laptop - Move sony-laptop.txt to Documentation/laptops
Also update references to sony-laptop.txt in Kconfig.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> CC: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Carlos Corbacho [Sat, 9 Feb 2008 01:32:09 +0000 (01:32 +0000)]
thinkpad-acpi - Move thinkpad-acpi.txt to Documentation/laptops
Also update references to thinkpad-acpi.txt in Kconfig.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Carlos Corbacho [Sat, 9 Feb 2008 01:32:03 +0000 (01:32 +0000)]
Documentation - Create laptops sub-directory
There are currently various laptop drivers floating about with no central
place for their documentation, which is currently scattered around the top
level Documentation/ directory.
So, as a first step, lets create a Documentation sub-directory, and update
the relevant index files. The work of then moving the existing laptop
driver related documentation will then be handled later.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br> CC: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Sat, 9 Feb 2008 09:01:48 +0000 (04:01 -0500)]
ACPI: thermal: buildfix for CONFIG_THERMAL=n
This fixes the build, but acpi_fan_add() still needs
to be updated to handle thermal_cooling_device_register()
returning NULL as a non-fatal condition.
Venki Pallipadi [Sat, 9 Feb 2008 01:05:44 +0000 (17:05 -0800)]
cpuidle: build fix for non-x86
The last posted version of this patch gave compile error
on IA64. So, here goes yet another rewrite of the patch.
Convert cpu_idle_wait() to cpuidle_kick_cpus() which is
SMP-only, and gives error on non supported CPU.
Changes from last patch sent by Kevin:
Moved the definition of kick_cpus back to cpuidle.c from cpuidle.h:
* Having it in .h gives #error on archs which includes the header file without
actually having CPU_IDLE configured. To make it work in .h, we need one more
#ifdef around that code which makes it messy.
* Also, the function is only called from one file. So, it can be in declared
statically in .c rather than making it available to everyone who includes
the .h file.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Len Brown <len.brown@intel.com>
Mart Raudsepp [Sat, 9 Feb 2008 08:16:36 +0000 (08:16 +0000)]
[MTD] [NAND] cs553x_nand: command line partitioning support
Implements kernel command line partitioning support for the CS5535/CS5536 chipsets driver.
For that the following is done:
* cs553x_cleanup(): try the cleanup for all chip selects to not leak memory
* Assign a unique name for each chip select to be separately addressable in the command line mtd-id portion(s)
* Use the already defined PIN_OPT_IDE constant where appropriate for readability
* Include command line partitioning support when CONFIG_MTD_PARTS is set
Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Nick Piggin [Sat, 9 Feb 2008 00:15:19 +0000 (01:15 +0100)]
mm: special mapping nopage
Convert special mapping install from nopage to fault.
Because the "vm_file" is NULL for the special mapping, the generic VM
code has messed up "vm_pgoff" thinking that it's an anonymous mapping
and the offset does't matter. For that reason, we need to undo the
vm_pgoff offset that got added into vmf->pgoff.
[ We _really_ should clean that up - either by making this whole special
mapping code just use a real file entry rather than that ugly array of
"struct page" pointers, or by just making the VM code realize that
even if vm_file is NULL it may not be a regular anonymous mmap.
- Linus ]
Linus Torvalds [Fri, 8 Feb 2008 23:40:28 +0000 (15:40 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Fix large MCA bootmem allocation
[IA64] Simplify cpu_idle_wait
[IA64] Synchronize RBS on PTRACE_ATTACH
[IA64] Synchronize kernel RSE to user-space and back
[IA64] Rename TIF_PERFMON_WORK back to TIF_NOTIFY_RESUME
[IA64] Wire up timerfd_{create,settime,gettime} syscalls
Ingo Molnar [Fri, 8 Feb 2008 23:15:06 +0000 (00:15 +0100)]
x86: fix pgtable_t build breakage
Commit 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4 ("CONFIG_HIGHPTE vs.
sub-page page tables") caused some build breakage due to pgtable_t only
getting declared in the CONFIG_X86_PAE case.
Linus Torvalds [Fri, 8 Feb 2008 23:34:26 +0000 (15:34 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/core: Remove unused struct ib_device.flags member
IB/core: Add IP checksum offload support
IPoIB: Add send gather support
IPoIB: Add high DMA feature flag
IB/mlx4: Use multiple WQ blocks to post smaller send WQEs
mlx4_core: Clean up struct mlx4_buf
mlx4_core: For 64-bit systems, vmap() kernel queue buffers
IB/mlx4: Consolidate code to get an entry from a struct mlx4_buf
Linus Torvalds [Fri, 8 Feb 2008 23:33:45 +0000 (15:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (24 commits)
[Blackfin] arch: import defines for BF547 -- it is just like the BF548, but no CAN
[Blackfin] arch: fix build fails only include header files when enabled
[Blackfin] arch: declare default INSTALL_PATH for Blackfin ports
[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform support
[Blackfin] arch: Enable UART2 and UART3 for bf548
[Blackfin] arch: Enable NET2272 on BF561-EZkit - remove request_mem_region
[Blackfin] arch:Fix BUG [#3876] pfbutton test for BTN3 on bf533 don't show complete info
[Blackfin] arch: remove duplicated definitions of the line discipline numbers N_* in asm-blackfin/termios.h
[Blackfin] arch: fix building with mtd uclinux by putting the mtd_phys option into the function it actually gets used in
[Blackfin] arch: simpler header and update dates
[Blackfin] arch: move the init sections to the end of memory
[Blackfin] arch: change the trace buffer control start/stop logic in the exception handlers
[Blackfin] arch: fix typo in printk message
[Blackfin] arch: this is an ezkit, not a stamp, so fixup the init function name
[Blackfin] arch: add slightly better help text for CPLB_INFO
[Blackfin] arch: Fix BUG - Enable ISP1362 driver to work ok with BF561
[Blackfin] arch: Fix header file information
[Blackfin] arch: Add Support for ISP1362
[Blackfin] arch: add support for cmdline partitioning to the BF533-STAMP flash map driver and enable it as a module by default
[Blackfin] arch: hook up set_irq_wake in Blackfin's irq code
...
Alan Cox [Fri, 8 Feb 2008 23:00:48 +0000 (15:00 -0800)]
x25_asy: Fix ref count rule violation
x25_asy does not take an ldisc reference before calling the flush method.
Fix it to use the helper function we provide.
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/scatterlist.o needed by a module only - link it in unconditionally
lib/scatterlist.c is needed by drivers/media/video/videobuf-dma-sg.c, and
we would like to be able to use the latter without PCI too, for example, on
PXA270 ARM CPU. It is then possible to create a configuration with
CONFIG_BLOCK=n, where only module code will need scatterlist.c. Therefore
it must be in obj-y.
Adrian Bunk [Fri, 8 Feb 2008 23:00:46 +0000 (15:00 -0800)]
fix xtensa timerfd breakage
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/xtensa/kernel/syscall.c:39:
include2/asm/unistd.h:681: error: 'sys_timerfd' undeclared here (not in a function)
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Christian Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix the FRV cmpxchg_local by breaking the following header dependency loop :
linux/kernel.h -> linux/bitops.h -> asm-frv/bitops.h -> asm-frv/atomic.h
-> asm-frv/system.h ->
asm-generic/cmpxchg_local.h -> typecheck() defined in linux/kernel.h
and
linux/kernel.h -> linux/bitops.h -> asm-frv/bitops.h -> asm-frv/atomic.h ->
asm-generic/cmpxchg_local.h -> typecheck() defined in linux/kernel.h
In order to fix this :
- Move the atomic_test_and_ *_mask inlines from asm-frv/atomic.h (why are they
there at all anyway ? They are not touching atomic_t variables!) to
asm-frv/bitops.h.
Also fix a build issue with cmpxchg : it does not cast to (unsigned long *)
like other architectures, to deal with it in the cmpxchg_local macro.
FRV builds fine with this patch.
Thanks to Adrian Bunk <bunk@kernel.org> for spotting this bug.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Adrian Bunk <bunk@kernel.org> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Fri, 8 Feb 2008 23:00:43 +0000 (15:00 -0800)]
revert "proc: fix the threaded proc self"
Revert commit c6caeb7c4544608e8ae62731334661fc396c7f85 ("proc: fix the
threaded /proc/self"), since Eric says "The patch really is wrong.
There is at least one corner case in procps that cares."
Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Guillaume Chazarain" <guichaz@yahoo.fr> Cc: "Pavel Emelyanov" <xemul@openvz.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eli Cohen [Wed, 30 Jan 2008 16:30:57 +0000 (18:30 +0200)]
IB/core: Add IP checksum offload support
Add a device capability to show when it can handle checksum offload.
Also add a send flag for inserting checksums and a csum_ok field to
the completion record.
Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Eli Cohen [Wed, 30 Jan 2008 16:30:53 +0000 (18:30 +0200)]
IPoIB: Add send gather support
This patch acts as a preparation for using checksum offload for IB
devices capable of inserting/verifying checksum in IP packets. The
patch does not actaully turn on NETIF_F_SG - we defer that to the
patches adding checksum offload capabilities.
We only add support for send gathers for datagram mode, since existing
HW does not support checksum offload on connected QPs.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Eli Cohen [Wed, 30 Jan 2008 16:30:46 +0000 (18:30 +0200)]
IPoIB: Add high DMA feature flag
All current InfiniBand devices can handle all DMA addresses, and it's
hard to imagine anyone would be silly enough to build a new device
that couldn't. Therefore, enable the NETIF_F_HIGHDMA feature for IPoIB.
This has no effect for no, but is needed when we enable gather/scatter
support and checksum stateless offloads.
Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Jack Morgenstein [Mon, 28 Jan 2008 08:40:59 +0000 (10:40 +0200)]
IB/mlx4: Use multiple WQ blocks to post smaller send WQEs
ConnectX HCA supports shrinking WQEs, so that a single work request
can be made of multiple units of wqe_shift. This way, WRs can differ
in size, and do not have to be a power of 2 in size, saving memory and
speeding up send WR posting. Unfortunately, if we do this then the
wqe_index field in CQEs can't be used to look up the WR ID anymore, so
our implementation does this only if selective signaling is off.
Further, on 32-bit platforms, we can't use vmap() to make the QP
buffer virtually contigious. Thus we have to use constant-sized WRs to
make sure a WR is always fully within a single page-sized chunk.
Finally, we use WRs with the NOP opcode to avoid wrapping around the
queue buffer in the middle of posting a WR, and we set the
NoErrorCompletion bit to avoid getting completions with error for NOP
WRs. However, NEC is only supported starting with firmware 2.2.232,
so we use constant-sized WRs for older firmware. And, since MLX QPs
only support SEND, we use constant-sized WRs in this case.
When stamping during NOP posting, do stamping following setting of the
NOP WQE valid bit.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Russ Anderson [Tue, 5 Feb 2008 23:12:32 +0000 (17:12 -0600)]
[IA64] Fix large MCA bootmem allocation
The MCA code allocates bootmem memory for NR_CPUS, regardless
of how many cpus the system actually has. This change allocates
memory only for cpus that actually exist.
On my test system with NR_CPUS = 1024, reserved memory was reduced by 130944k.
Petr Tesarik [Wed, 12 Dec 2007 14:23:34 +0000 (15:23 +0100)]
[IA64] Synchronize kernel RSE to user-space and back
This is base kernel patch for ptrace RSE bug. It's basically a backport
from the utrace RSE patch I sent out several weeks ago. please review.
when a thread is stopped (ptraced), debugger might change thread's user
stack (change memory directly), and we must avoid the RSE stored in
kernel to override user stack (user space's RSE is newer than kernel's
in the case). To workaround the issue, we copy kernel RSE to user RSE
before the task is stopped, so user RSE has updated data. we then copy
user RSE to kernel after the task is resummed from traced stop and
kernel will use the newer RSE to return to user.
Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Petr Tesarik <ptesarik@suse.cz> CC: Roland McGrath <roland@redhat.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Fri, 8 Feb 2008 18:01:28 +0000 (10:01 -0800)]
Merge branch 'cris' of git://www.jni.nu/cris
* 'cris' of git://www.jni.nu/cris: (158 commits)
CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.
CRIS v32: Change drivers/i2c.c locking.
CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
CRIS: Add new timerfd syscall entries.
MAINTAINERS: Add my information for the CRIS port.
CRIS v32: Correct spelling of bandwidth in function name.
CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
CRIS v10: Cleanup of drivers/gpio.c
CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash.
CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h
CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.
CRIS: Drop regs parameter from call to profile_tick in kernel/time.c
CRIS v32: Fix minor formatting issue in mach-a3/io.c
CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S
CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.
CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.
CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h
CRIS v32: Move register map header to machine dependent directory.
CRIS v32: Let compiler know that memory is clobbered after a break op.
...
Linus Torvalds [Fri, 8 Feb 2008 17:33:02 +0000 (09:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
dlm: add __init and __exit marks to init and exit functions
dlm: eliminate astparam type casting
dlm: proper types for asts and basts
dlm: dlm/user.c input validation fixes
dlm: fix dlm_dir_lookup() handling of too long names
dlm: fix overflows when copying from ->m_extra to lvb
dlm: make find_rsb() fail gracefully when namelen is too large
dlm: receive_rcom_lock_args() overflow check
dlm: verify that places expecting rcom_lock have packet long enough
dlm: validate data in dlm_recover_directory()
dlm: missing length check in check_config()
dlm: use proper type for ->ls_recover_buf
dlm: do not byteswap rcom_config
dlm: do not byteswap rcom_lock
dlm: dlm_process_incoming_buffer() fixes
dlm: use proper C for dlm/requestqueue stuff (and fix alignment bug)
Linus Torvalds [Fri, 8 Feb 2008 17:31:42 +0000 (09:31 -0800)]
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Add arch-specific walk_memory_remove() for 64-bit powerpc
[POWERPC] Enable hotplug memory remove for 64-bit powerpc
[POWERPC] Add remove_memory() for 64-bit powerpc
[POWERPC] Make cell IOMMU fixed mapping printk more useful
[POWERPC] Fix potential cell IOMMU bug when switching back to default DMA ops
[POWERPC] Don't enable cell IOMMU fixed mapping if there are no dma-ranges
[POWERPC] Fix cell IOMMU null pointer explosion on old firmwares
[POWERPC] spufs: Fix timing dependent false return from spufs_run_spu
[POWERPC] spufs: No need to have a runnable SPU for libassist update
[POWERPC] spufs: Update SPU_Status[CISHP] in backing runcntl write
[POWERPC] spufs: Fix state_mutex leaks
[POWERPC] Disable G5 NAP mode during SMU commands on U3
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Make use of the new fs/compat_binfmt_elf.c
[SPARC64]: Make use of compat_sys_ptrace()
Manually fixed trivial delete/modift conflict in arch/sparc64/kernel/binfmt_elf32.c
Jens Axboe [Fri, 8 Feb 2008 16:49:14 +0000 (08:49 -0800)]
splice: missing user pointer access verification
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.
Jan Kara [Fri, 8 Feb 2008 12:22:13 +0000 (04:22 -0800)]
quota: turn quotas off when remounting read-only
Turn off quotas before filesystem is remounted read only. Otherwise quota
will try to write to read-only filesystem which does no good... We could
also just refuse to remount ro when quota is enabled but turning quota off
is consistent with what we do on umount.
Signed-off-by: Jan Kara <jack@suse.cz> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Neil Brown [Fri, 8 Feb 2008 12:22:13 +0000 (04:22 -0800)]
ext3 can fail badly when device stops accepting BIO_RW_BARRIER requests
Some devices - notably dm and md - can change their behaviour in response
to BIO_RW_BARRIER requests. They might start out accepting such requests
but on reconfiguration, they find out that they cannot any more.
ext3 (and other filesystems) deal with this by always testing if
BIO_RW_BARRIER requests fail with EOPNOTSUPP, and retrying the write
requests without the barrier (probably after waiting for any pending writes
to complete).
However there is a bug in the handling for this for ext3.
When ext3 (jbd actually) decides to submit a BIO_RW_BARRIER request, it
sets the buffer_ordered flag on the buffer head. If the request completes
successfully, the flag STAYS SET.
Other code might then write the same buffer_head after the device has been
reconfigured to not accept barriers. This write will then fail, but the
"other code" is not ready to handle EOPNOTSUPP errors and the error will be
treated as fatal.
This can be seen without having to reconfigure a device at exactly the
wrong time by putting:
if (buffer_ordered(bh))
printk("OH DEAR, and ordered buffer\n");
in the while loop in "commit phase 5" of journal_commit_transaction.
If it ever prints the "OH DEAR ..." message (as it does sometimes for
me), then that request could (in different circumstances) have failed
with EOPNOTSUPP, but that isn't tested for.
My proposed fix is to clear the buffer_ordered flag after it has been
used, as in the following patch.
Signed-off-by: Neil Brown <neilb@suse.de> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Fri, 8 Feb 2008 12:22:12 +0000 (04:22 -0800)]
reduce large do_mount stack usage with noinlines
do_mount() uses a whopping 616 bytes of stack on x86_64 in 2.6.24-mm1,
largely thanks to gcc inlining the various helper functions.
noinlining these can slim it down a lot; on my box this patch gets it down
to 168, which is mostly the struct nameidata nd; left on the stack.
These functions are called only as do_mount() helpers; none of them should
be in any path that would see a performance benefit from inlining...
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Fri, 8 Feb 2008 12:22:11 +0000 (04:22 -0800)]
uml: fix mm_context memory leak
[ Spotted by Miklos ]
Fix a memory leak in init_new_context. The struct page ** buffer allocated
for install_special_mapping was never recorded, and thus leaked when the
mm_struct was freed. Fix it by saving the pointer in mm_context_t and freeing
it in arch_exit_mmap.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Fri, 8 Feb 2008 12:22:10 +0000 (04:22 -0800)]
uml: x86_64 should copy %fs during fork
%fs needs to be copied from parent to child during fork.
Tidied up some whitespace while I was here.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Fri, 8 Feb 2008 12:22:08 +0000 (04:22 -0800)]
uml: style fixes in arch/um/os-Linux
Style changes under arch/um/os-Linux:
include trimming
CodingStyle fixes
some printks needed severity indicators
make_tempfile turns out not to be used outside of mem.c, so it is now static.
Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no
longer needed.
create_tmp_file was also made static.
checkpatch moans about an EXPORT_SYMBOL in user_syms.c which is part of a
macro definition - this is copying a bit of kernel infrastructure into the
libc side of UML because the kernel headers can't be included there.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Fri, 8 Feb 2008 12:22:07 +0000 (04:22 -0800)]
uml: runtime host VMSPLIT detection
Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is
needed on i386 if UML is to run on hosts with varying VMSPLITs without
recompilation.
TASK_SIZE is now defined in terms of a variable, task_size. This gets rid of
an include of pgtable.h from processor.h, which can cause include loops.
On i386, task_size is calculated early in boot by probing the address space in
a binary search to figure out where the boundary between usable and non-usable
memory is. This tries to make sure that a page that is considered to be in
userspace is, or can be made, read-write. I'm concerned about a system-global
VDSO page in kernel memory being hit and considered to be a userspace page.
On x86_64, task_size is just the old value of CONFIG_TOP_ADDR.
A bunch of config variable are gone now. CONFIG_TOP_ADDR is directly replaced
by TASK_SIZE. NEST_LEVEL is gone since the relocation of the stubs makes it
irrelevant. All the HOST_VMSPLIT stuff is gone. All references to these in
arch/um/Makefile are also gone.
I noticed and fixed a missing extern in os.h when adding os_get_task_size.
Note: This has been revised to fix the 32-bit UML on 64-bit host bug that
Miklos ran into.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Background: I've implemented 1K/2K page tables for s390. These sub-page
page tables are required to properly support the s390 virtualization
instruction with KVM. The SIE instruction requires that the page tables
have 256 page table entries (pte) followed by 256 page status table entries
(pgste). The pgstes are only required if the process is using the SIE
instruction. The pgstes are updated by the hardware and by the hypervisor
for a number of reasons, one of them is dirty and reference bit tracking.
To avoid wasting memory the standard pte table allocation should return
1K/2K (31/64 bit) and 2K/4K if the process is using SIE.
Problem: Page size on s390 is 4K, page table size is 1K or 2K. That means
the s390 version for pte_alloc_one cannot return a pointer to a struct
page. Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
cannot return a pointer to a pte either, since that would require more than
32 bit for the return value of pte_alloc_one (and the pte * would not be
accessible since its not kmapped).
Solution: The only solution I found to this dilemma is a new typedef: a
pgtable_t. For s390 pgtable_t will be a (pte *) - to be introduced with a
later patch. For everybody else it will be a (struct page *). The
additional problem with the initialization of the ptl lock and the
NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
a destructor pgtable_page_dtor. The page table allocation and free
functions need to call these two whenever a page table page is allocated or
freed. pmd_populate will get a pgtable_t instead of a struct page pointer.
To get the pgtable_t back from a pmd entry that has been installed with
pmd_populate a new function pmd_pgtable is added. It replaces the pmd_page
call in free_pte_range and apply_to_pte_range.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andy Whitcroft [Fri, 8 Feb 2008 12:22:03 +0000 (04:22 -0800)]
update checkpatch.pl to version 0.14
This version brings the remainder of the queued fixes. A number of fixes
for items missed reported by Andrew Morton and others. Also a handful
of new checks and fixes for false positives. Of note:
- new warning associated with --file to try and avoid cleanup only patches,
- corrected handling of completly empty files,
- corrected report handling with multiple files,
- handling of possible types in the face of multiple declarations,
- detection of unnessary braces on complex if statements (where present), and
- all new comment spacing handling.
Andi Kleen (1):
Introduce a warning when --file mode is used
Andy Whitcroft (14):
Version: 0.14
clean up some space violations in checkpatch.pl
a completly empty file should not provoke a whinge
reset report lines buffers between files
unary ++/-- may abutt close braces
__typeof__ is also unary
comments: revamp comment handling
add --summary-file option adding filename to summary line
trailing backslashes are not trailing statements
handle operators passed as parameters such as to ASSERTCMP
possible types -- enhance debugging
check for boolean operations with constants
possible types: handle multiple declarations
detect and report if statements where all branches are single statements
Arjan van de Ven (1):
quiet option should not print the summary on no errors
Bartlomiej Zolnierkiewicz (1):
warn about using __FUNCTION__
Timur Tabi (1):
loosen spacing checks for __asm__
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ralf Baechle [Fri, 8 Feb 2008 12:22:01 +0000 (04:22 -0800)]
IRQ_NOPROBE helper functions
Probing non-ISA interrupts using the handle_percpu_irq as their handle_irq
method may crash the system because handle_percpu_irq does not check
IRQ_WAITING. This for example hits the MIPS Qemu configuration.
This patch provides two helper functions set_irq_noprobe and set_irq_probe to
set rsp. clear the IRQ_NOPROBE flag. The only current caller is MIPS code
but this really belongs into generic code.
As an aside, interrupt probing these days has become a mostly obsolete if not
dangerous art. I think Linux interrupts should be changed to default to
non-probing but that's subject of this patch.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-and-tested-by: Rob Landley <rob@landley.net> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Fri, 8 Feb 2008 12:21:59 +0000 (04:21 -0800)]
buffer_head: fix private_list handling
There are two possible races in handling of private_list in buffer cache.
1) When fsync_buffers_list() processes a private_list, it clears
b_assoc_mapping and moves buffer to its private list. Now
drop_buffers() comes, sees a buffer is on list so it calls
__remove_assoc_queue() which complains about b_assoc_mapping being
cleared (as it cannot propagate possible IO error). This race has been
actually observed in the wild.
2) When fsync_buffers_list() processes a private_list,
mark_buffer_dirty_inode() can be called on bh which is already on the
private list of fsync_buffers_list(). As buffer is on some list (note
that the check is performed without private_lock), it is not readded to
the mapping's private_list and after fsync_buffers_list() finishes, we
have a dirty buffer which should be on private_list but it isn't. This
race has not been reported, probably because most (but not all) callers
of mark_buffer_dirty_inode() hold i_mutex and thus are serialized with
fsync().
Fix these issues by not clearing b_assoc_map when fsync_buffers_list()
moves buffer to a dedicated list and by reinserting buffer in private_list
when it is found dirty after we have submitted buffer for IO. We also
change the tests whether a buffer is on a private list from
!list_empty(&bh->b_assoc_buffers) to bh->b_assoc_map so that they are
single word reads and hence lockless checks are safe.
Signed-off-by: Jan Kara <jack@suse.cz> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Yi Yang [Fri, 8 Feb 2008 12:21:57 +0000 (04:21 -0800)]
Add new string functions strict_strto* and convert kernel params to use them
Currently, for every sysfs node, the callers will be responsible for
implementing store operation, so many many callers are doing duplicate
things to validate input, they have the same mistakes because they are
calling simple_strtol/ul/ll/uul, especially for module params, they are
just numeric, but you can echo such values as 0x1234xxx, 07777888 and 1234aaa, for these cases, module params store operation just ignores
succesive invalid char and converts prefix part to a numeric although input
is acctually invalid.
This patch tries to fix the aforementioned issues and implements
strict_strtox serial functions, kernel/params.c uses them to strictly
validate input, so module params will reject such values as 0x1234xxxx and
returns an error:
write error: Invalid argument
Any modules which export numeric sysfs node can use strict_strtox instead of
simple_strtox to reject any invalid input.
Randy Dunlap [Fri, 8 Feb 2008 12:21:56 +0000 (04:21 -0800)]
getdelays: fix gcc warnings
Fix gcc warnings in getdelays.c:
Documentation/accounting/getdelays.c: In function 'task_context_switch_counts':
Documentation/accounting/getdelays.c:214: warning: format '%15lu' expects type 'long unsigned int', but argument 4 has type '__u64'
Documentation/accounting/getdelays.c:214: warning: format '%15lu' expects type 'long unsigned int', but argument 5 has type '__u64'
Documentation/accounting/getdelays.c: In function 'main':
Documentation/accounting/getdelays.c:402: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
Documentation/accounting/getdelays.c: In function 'get_family_id':
Documentation/accounting/getdelays.c:171: warning: 'id' may be used uninitialized in this function
One warning is not a problem and can be dismissed:
Documentation/accounting/getdelays.c: In function 'main':
Documentation/accounting/getdelays.c:236: warning: 'cmd_type' may be used uninitialized in this function
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sam Ravnborg [Fri, 8 Feb 2008 12:21:55 +0000 (04:21 -0800)]
cpu: fix section mismatch warnings for enable_nonboot_cpus
Fix following warning:
WARNING: o-x86_64/kernel/built-in.o(.text+0x36d8b): Section mismatch in reference from the function enable_nonboot_cpus() to the function .cpuinit.text:_cpu_up()
enable_nonboot_cpus() are used solely from CONFIG_CONFIG_PM_SLEEP_SMP=y
and PM_SLEEP_SMP imply HOTPLUG_CPU therefore the reference
to _cpu_up() is valid.
Annotate enable_nonboot_cpus() with __ref to silence modpost.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andi Kleen [Fri, 8 Feb 2008 12:21:54 +0000 (04:21 -0800)]
Remove a.out interpreter support in ELF loader
Following the deprecation schedule the a.out ELF interpreter support
is removed now with this patch. a.out ELF interpreters were an transition
feature for moving a.out systems to ELF, but they're unlikely to be still
needed. Pure a.out systems will still work of course. This allows to
simplify the hairy ELF loader.
Signed-off-by: Andi Kleen <ak@suse.de> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>