linux-2.6
18 years ago[PATCH] dup fd error fix
Prasanna Meda [Fri, 23 Jun 2006 09:05:23 +0000 (02:05 -0700)] 
[PATCH] dup fd error fix

Set errorp in dup_fd, it will be used in sys_unshare also.

Signed-off-by: Prasanna Meda <mlp@google.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] clean up default value of IP_DCCP_ACKVEC
Jean-Luc Leger [Fri, 23 Jun 2006 09:05:22 +0000 (02:05 -0700)] 
[PATCH] clean up default value of IP_DCCP_ACKVEC

Default values for boolean and tristate options can only be 'y', 'm' or 'n'.
This patch removes wrong default for IP_DCCP_ACKVEC.

Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] clean up default value of USB_ISP116X_HCD, USB_SL811_HCD and USB_SL811_CS
Jean-Luc Leger [Fri, 23 Jun 2006 09:05:21 +0000 (02:05 -0700)] 
[PATCH] clean up default value of USB_ISP116X_HCD, USB_SL811_HCD and USB_SL811_CS

Default values for boolean and tristate options can only be 'y', 'm' or 'n'.
This patch removes wrong default for USB_ISP116X_HCD, USB_SL811_HCD and
USB_SL811_CS.

Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] clean up default value of SYSCALL_DEBUG
Jean-Luc Leger [Fri, 23 Jun 2006 09:05:20 +0000 (02:05 -0700)] 
[PATCH] clean up default value of SYSCALL_DEBUG

Default values for boolean and tristate options can only be 'y', 'm' or 'n'.
This patch removes wrong default for SYSCALL_DEBUG.

Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] clean up default value of SCHED_SMT
Jean-Luc Leger [Fri, 23 Jun 2006 09:05:19 +0000 (02:05 -0700)] 
[PATCH] clean up default value of SCHED_SMT

Default values for boolean and tristate options can only be 'y', 'm' or 'n'.
This patch removes wrong default for SCHED_SMT.

Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ptrace: document the locking rules
Eric W. Biederman [Fri, 23 Jun 2006 09:05:18 +0000 (02:05 -0700)] 
[PATCH] ptrace: document the locking rules

After a lot of reading the code and thinking about how it behaves I have
managed to figure out what the current ptrace locking rules are.  The
current code is in much better that it appears at first glance.  The
troublesome code paths are actually the code paths that violate the current
rules.

ptrace uses simple exclusive access as it's locking.  You can only touch
task->ptrace if the task is stopped and you are the ptracer, or if the task
is running and are the task itself.

Very simple, very easy to maintain.  It just needs to be documented so
people know not to touch ptrace from elsewhere.

Currently we do have a few pieces of code that are in violation of this
rule.  Particularly the core dump code, and ptrace_attach.  But so far the
code looks fixable.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Poll cleanups/microoptimizations
Vadim Lobanov [Fri, 23 Jun 2006 09:05:16 +0000 (02:05 -0700)] 
[PATCH] Poll cleanups/microoptimizations

The "count" and "pt" variables are declared and modified by do_poll(), as
well as accessed and written indirectly in the do_pollfd() subroutine.

This patch pulls all handling of these variables into the do_poll()
function, thereby eliminating the odd use of indirection in do_pollfd().
This is done by pulling the "struct pollfd" traversal loop from do_pollfd()
into its only caller do_poll().  As an added bonus, the patch saves a few
clock cycles, and also adds comments to make the code easier to follow.

Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/fat/misc.c: unexport fat_sync_bhs
Adrian Bunk [Fri, 23 Jun 2006 09:05:15 +0000 (02:05 -0700)] 
[PATCH] fs/fat/misc.c: unexport fat_sync_bhs

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mmput() might sleep
Andrew Morton [Fri, 23 Jun 2006 09:05:15 +0000 (02:05 -0700)] 
[PATCH] mmput() might sleep

exit_aio() and exit_mmap() can sleep.  But it's easy to accidentally call
mmput() from inside locks.

Cc: Dave Peterson <dsp@llnl.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Remove CONFIG_PARPORT_ARC, drivers/parport/parport_arc.c
Domen Puncer [Fri, 23 Jun 2006 09:05:14 +0000 (02:05 -0700)] 
[PATCH] Remove CONFIG_PARPORT_ARC, drivers/parport/parport_arc.c

It's wasn't referenced in Makefile since at least 2.2.8, unbuildable due to
trivial typos and things like DATA_LATCH and arc_write_control() which
doesn't exist.

Adrian Bunk:
adapted the patch to unrelated context changes

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] module.h: updated comments with a new license
Xose Vazquez Perez [Fri, 23 Jun 2006 09:05:13 +0000 (02:05 -0700)] 
[PATCH] module.h: updated comments with a new license

"Dual MIT/GPL" is also accepted (kernel/module.c), so updated comments.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/locks.c: make posix_locks_deadlock() static
Adrian Bunk [Fri, 23 Jun 2006 09:05:13 +0000 (02:05 -0700)] 
[PATCH] fs/locks.c: make posix_locks_deadlock() static

We can now make posix_locks_deadlock() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] vfs: add lock owner argument to flush operation
Miklos Szeredi [Fri, 23 Jun 2006 09:05:12 +0000 (02:05 -0700)] 
[PATCH] vfs: add lock owner argument to flush operation

Pass the POSIX lock owner ID to the flush operation.

This is useful for filesystems which don't want to store any locking state
in inode->i_flock but want to handle locking/unlocking POSIX locks
internally.  FUSE is one such filesystem but I think it possible that some
network filesystems would need this also.

Also add a flag to indicate that a POSIX locking request was generated by
close(), so filesystems using the above feature won't send an extra locking
request in this case.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] locks: clean up locks_remove_posix()
Miklos Szeredi [Fri, 23 Jun 2006 09:05:11 +0000 (02:05 -0700)] 
[PATCH] locks: clean up locks_remove_posix()

locks_remove_posix() can use posix_lock_file() instead of doing the lock
removal by hand.  posix_lock_file() now does exacly the same.

The comment about pids no longer applies, posix_lock_file() takes only the
owner into account.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] locks: don't do unnecessary allocations
Miklos Szeredi [Fri, 23 Jun 2006 09:05:10 +0000 (02:05 -0700)] 
[PATCH] locks: don't do unnecessary allocations

posix_lock_file() always allocates new locks in advance, even if it's easy to
determine that no allocations will be needed.

Optimize these cases:

 - FL_ACCESS flag is set

 - Unlocking the whole range

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] locks: don't unnecessarily fail posix lock operations
Miklos Szeredi [Fri, 23 Jun 2006 09:05:09 +0000 (02:05 -0700)] 
[PATCH] locks: don't unnecessarily fail posix lock operations

posix_lock_file() was too cautious, failing operations on OOM, even if they
didn't actually require an allocation.

This has the disadvantage, that a failing unlock on process exit could lead to
a memory leak.  There are two possibilites for this:

- filesystem implements .lock() and calls back to posix_lock_file().  On
cleanup of files_struct locks_remove_posix() is called which should remove all
locks belonging to files_struct.  However if filesystem calls
posix_lock_file() which fails, then those locks will never be freed.

- if a file is closed while a lock is blocked, then after acquiring
fcntl_setlk() will undo the lock.  But this unlock itself might fail on OOM,
again possibly leaking the lock.

The solution is to move the checking of the allocations until after it is sure
that they will be needed.  This will solve the above problem since unlock will
always succeed unless it splits an existing region.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] read_mapping_page for address space
Pekka Enberg [Fri, 23 Jun 2006 09:05:08 +0000 (02:05 -0700)] 
[PATCH] read_mapping_page for address space

Add read_mapping_page() which is used for callers that pass
mapping->a_ops->readpage as the filler for read_cache_page.  This removes
some duplication from filesystem code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Add a sysfs file to determine if a kexec kernel is loaded
Jeff Moyer [Fri, 23 Jun 2006 09:05:07 +0000 (02:05 -0700)] 
[PATCH] Add a sysfs file to determine if a kexec kernel is loaded

Create two files in /sys/kernel, kexec_loaded and kexec_crash_loaded.  Each
file contains a simple boolean value indicating whether the relevant kernel
has been loaded into memory.  The motivation for this is geared around
support.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390_hypfs filesystem
Michael Holzheu [Fri, 23 Jun 2006 09:05:06 +0000 (02:05 -0700)] 
[PATCH] s390_hypfs filesystem

On zSeries machines there exists an interface which allows the operating
system to retrieve LPAR hypervisor accounting data.  For example, it is
possible to get usage data for physical and virtual cpus.  In order to
provide this information to user space programs, I implemented a new
virtual Linux file system named 's390_hypfs' using the Linux 2.6 libfs
framework.  The name 's390_hypfs' stands for 'S390 Hypervisor Filesystem'.
All the accounting information is put into different virtual files which
can be accessed from user space.  All data is represented as ASCII strings.

When the file system is mounted the accounting information is retrieved and
a file system tree is created with the attribute files containing the cpu
information.  The content of the files remains unchanged until a new update
is made.  An update can be triggered from user space through writing
'something' into a special purpose update file.

We create the following directory structure:

<mount-point>/
        update
        cpus/
                <cpu-id>
                        type
                        mgmtime
                <cpu-id>
                        ...
        hyp/
                type
        systems/
                <lpar-name>
                        cpus/
                                <cpu-id>
                                        type
                                        mgmtime
                                        cputime
                                        onlinetime
                                <cpu-id>
                                        ...
                <lpar-name>
                        cpus/
                                ...

- update: File to trigger update
- cpus/: Directory for all physical cpus
- cpus/<cpu-id>/: Directory for one physical cpu.
- cpus/<cpu-id>/type: Type name of physical zSeries cpu.
- cpus/<cpu-id>/mgmtime: Physical-LPAR-management time in microseconds.
- hyp/: Directory for hypervisor information
- hyp/type: Typ of hypervisor (currently only 'LPAR Hypervisor')
- systems/: Directory for all LPARs
- systems/<lpar-name>/: Directory for one LPAR.
- systems/<lpar-name>/cpus/<cpu-id>/: Directory for the virtual cpus
- systems/<lpar-name>/cpus/<cpu-id>/type: Typ of cpu.
- systems/<lpar-name>/cpus/<cpu-id>/mgmtime:
Accumulated number of microseconds during which a physical
CPU was assigned to the logical cpu and the cpu time was
consumed by the hypervisor and was not provided to
the LPAR (LPAR overhead).

- systems/<lpar-name>/cpus/<cpu-id>/cputime:
Accumulated number of microseconds during which a physical CPU
was assigned to the logical cpu and the cpu time was consumed
by the LPAR.

- systems/<lpar-name>/cpus/<cpu-id>/onlinetime:
Accumulated number of microseconds during which the logical CPU
has been online.

As mount point for the filesystem /sys/hypervisor/s390 is created.

The update process is triggered when writing 'something' into the
'update' file at the top level hypfs directory. You can do this e.g.
with 'echo 1 > update'. During the update the whole directory structure
is deleted and built up again.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Ingo Oeser <ioe-lkml@rameria.de>
Cc: Joern Engel <joern@wohnheim.fh-wedel.de>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] xtensa: remove verify_area macros
Jesper Juhl [Fri, 23 Jun 2006 09:05:04 +0000 (02:05 -0700)] 
[PATCH] xtensa: remove verify_area macros

verify_area() is still alive on xtensa in 2.6.17-rc3-git13 It would be nice
to finally be rid of that function across the board.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: windfarm is powerpc-only, don't do it on m68k macs
Al Viro [Fri, 23 Jun 2006 09:05:03 +0000 (02:05 -0700)] 
[PATCH] m68k: windfarm is powerpc-only, don't do it on m68k macs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k traps.c constraints
Al Viro [Fri, 23 Jun 2006 09:05:03 +0000 (02:05 -0700)] 
[PATCH] m68k traps.c constraints

Cast is not an lvalue; =r constraint wants an lvalue and really couldn't
care whether it's void * or other pointer type.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: ptrace.h typo fix
Jan Altenberg [Fri, 23 Jun 2006 09:05:01 +0000 (02:05 -0700)] 
[PATCH] m68k: ptrace.h typo fix

Signed-off-by: Jan Altenberg <tb10alj@tglx.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: clean up uaccess.h
Roman Zippel [Fri, 23 Jun 2006 09:05:00 +0000 (02:05 -0700)] 
[PATCH] m68k: clean up uaccess.h

This uninlines a few large functions in uaccess.h and cleans up the rest.
It includes a (hopefully temporary) workaround for the broken typeof of
gcc-4.1.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: m68k mac VIA2 fixes and cleanups
Finn Thain [Fri, 23 Jun 2006 09:04:59 +0000 (02:04 -0700)] 
[PATCH] m68k: m68k mac VIA2 fixes and cleanups

Some fixes and cleanups from the linux-mac68k repo.  Fix mac_esp by clearing
the VIA2 SCSI IRQ flag before the SCSI IRQ handler is invoked.  Also fix a
race condition caused by unmasking a nubus slot IRQ then setting the relevant
nubus_active bit.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: adjust to changed HARDIRQ_MASK
Roman Zippel [Fri, 23 Jun 2006 09:04:59 +0000 (02:04 -0700)] 
[PATCH] m68k: adjust to changed HARDIRQ_MASK

Adjust entry.S to the changed HARDIRQ_MASK, add a check to prevent it from
silently breaking again.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: use proper defines for zone initialization
Roman Zippel [Fri, 23 Jun 2006 09:04:58 +0000 (02:04 -0700)] 
[PATCH] m68k: use proper defines for zone initialization

MAX_NR_ZONES changed, so use correct defines now.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: wd33c93: extra delay
Roman Zippel [Fri, 23 Jun 2006 09:04:57 +0000 (02:04 -0700)] 
[PATCH] m68k: wd33c93: extra delay

The wd33c93 needs a small delay before a new command can be started.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: restore amikbd compatibility with 2.4
Roman Zippel [Fri, 23 Jun 2006 09:04:56 +0000 (02:04 -0700)] 
[PATCH] m68k: restore amikbd compatibility with 2.4

Dump the extra mapping in the amikbd interrupt handler, so old Amiga keymaps
work again.  Amigas need a special keymap anyway, standard keymaps are not
usable and recreating all keymaps is simply not worth the trouble.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: print correct stack trace
Roman Zippel [Fri, 23 Jun 2006 09:04:56 +0000 (02:04 -0700)] 
[PATCH] m68k: print correct stack trace

Pass unmodified stack argument to show_trace().

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: use c99 initializer
Roman Zippel [Fri, 23 Jun 2006 09:04:55 +0000 (02:04 -0700)] 
[PATCH] m68k: use c99 initializer

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: Remove some unused definitions in zorro.h
Roman Zippel [Fri, 23 Jun 2006 09:04:54 +0000 (02:04 -0700)] 
[PATCH] m68k: Remove some unused definitions in zorro.h

These definitions have long been superseded by asm-offsets.h

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: cleanup unistd.h
Roman Zippel [Fri, 23 Jun 2006 09:04:54 +0000 (02:04 -0700)] 
[PATCH] m68k: cleanup unistd.h

Remove long obsolete kernel syscalls, only execve is still used.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: atyfb_base compile fix for CONFIG_PCI=n
Roman Zippel [Fri, 23 Jun 2006 09:04:53 +0000 (02:04 -0700)] 
[PATCH] m68k: atyfb_base compile fix for CONFIG_PCI=n

The atyfb_driver structure is only available if CONFIG_PCI is set.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m68k: completely initialize hw_regs_t in ide_setup_ports
Roman Zippel [Fri, 23 Jun 2006 09:04:51 +0000 (02:04 -0700)] 
[PATCH] m68k: completely initialize hw_regs_t in ide_setup_ports

ide_setup_ports does not completely initialize the hw_regs_t structure which
can cause random failures, as the structure is often on the stack.  None of
the callers expect a partially initialized structure, i.e.  none of them do
any setup of their own before calling ide_setup_ports().

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] move do_suspend_lowlevel to correct segment
Shaohua Li [Fri, 23 Jun 2006 09:04:50 +0000 (02:04 -0700)] 
[PATCH] move do_suspend_lowlevel to correct segment

Move do_suspend_lowlevel to correct segment.  If it is in the same hugepage
with ro data, mark_rodata_ro will make it unexecutable.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: documentation updates
Pavel Machek [Fri, 23 Jun 2006 09:04:50 +0000 (02:04 -0700)] 
[PATCH] swsusp: documentation updates

Update documentation a bit, add more machines to video.txt list.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] don't use flush_tlb_all in suspend time
Shaohua Li [Fri, 23 Jun 2006 09:04:49 +0000 (02:04 -0700)] 
[PATCH] don't use flush_tlb_all in suspend time

flush_tlb_all uses on_each_cpu, which will disable/enable interrupt.
In suspend/resume time, this will make interrupt wrongly enabled.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: use less memory during resume
Rafael J. Wysocki [Fri, 23 Jun 2006 09:04:48 +0000 (02:04 -0700)] 
[PATCH] swsusp: use less memory during resume

Make swsusp allocate only as much memory as needed to store the image data
and metadata during resume.

Without this patch swsusp additionally allocates many page frames that will
conflict with the "original" locations of the image data and are considered
as "unsafe", treating them as "eaten" pages (ie.  allocated but unusable).

The patch makes swsusp allocate as many pages as it'll need to store the
data read from the image in one shot, creating a list of allocated "safe"
pages, and use the observation that all pages allocated by it are marked
with the PG_nosave and PG_nosave_free flags set.  Â Namely, when it's about
to load an image page, swsusp can check whether the page frame
corresponding to the "original" location of this page has been allocated
(ie.  if the page frame has the PG_nosave and PG_nosave_free flags set) and
if so, it can load the page directly into this page frame.  Â Otherwise it
uses an allocated "safe" page from the list to store the data that will be
copied to their "original" location later on.

This allows us to save many page copyings and page allocations during
resume and in the future it may allow us to load images greater than 50% of
the normal zone.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: "Pavel Machek" <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kernel/power/snapshot.c: cleanups
Adrian Bunk [Fri, 23 Jun 2006 09:04:47 +0000 (02:04 -0700)] 
[PATCH] kernel/power/snapshot.c: cleanups

- make needlessly global functions static
- make dummy functions static inline

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: take lowmem reserves into account
Rafael J. Wysocki [Fri, 23 Jun 2006 09:04:46 +0000 (02:04 -0700)] 
[PATCH] swsusp: take lowmem reserves into account

swsusp allocates memory from the normal zone, so it cannot use lowmem
reserve pages from the lower zones.  Therefore it should not count these
pages as available to it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: x86_64 mark special saveable/unsaveable pages
Shaohua Li [Fri, 23 Jun 2006 09:04:46 +0000 (02:04 -0700)] 
[PATCH] swsusp: x86_64 mark special saveable/unsaveable pages

Pages (Reserved/ACPI NVS/ACPI Data) below end_pfn will be saved/restored by S4
currently.  We should mark 'Reserved' pages not saveable.

Pages (Reserved/ACPI NVS/ACPI Data) above end_pfn will not be saved/restored
by S4 currently.  We should save the 'ACPI NVS/ACPI Data' pages.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: i386 mark special saveable/unsaveable pages
Shaohua Li [Fri, 23 Jun 2006 09:04:45 +0000 (02:04 -0700)] 
[PATCH] swsusp: i386 mark special saveable/unsaveable pages

Pages (Reserved/ACPI NVS/ACPI Data) below max_low_pfn will be saved/restored
by S4 currently.  We should mark 'Reserved' pages not saveable.

Pages (Reserved/ACPI NVS/ACPI Data) above max_low_pfn will not be
saved/restored by S4 currently.  We should save the 'ACPI NVS/ACPI Data'
pages.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: add architecture special saveable pages support
Shaohua Li [Fri, 23 Jun 2006 09:04:44 +0000 (02:04 -0700)] 
[PATCH] swsusp: add architecture special saveable pages support

1. Add architecture specific pages save/restore support.  Next two patches
   will use this to save/restore 'ACPI NVS' pages.

2. Allow reserved pages 'nosave'.  This could avoid save/restore BIOS
   reserved pages.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Remove duplicate symbol exports on Alpha
Mathieu Chouquet-Stringer [Fri, 23 Jun 2006 09:04:40 +0000 (02:04 -0700)] 
[PATCH] Remove duplicate symbol exports on Alpha

WARNING: vmlinux: 'enable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq_nosync' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'probe_irq_mask' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'sys_open' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'sys_read' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux

Signed-off-by: Mathieu Chouquet-Stringer <mchouque@free.fr>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: compile fix for asm-i386/alternatives.h
Kirill Smelkov [Fri, 23 Jun 2006 09:04:33 +0000 (02:04 -0700)] 
[PATCH] x86: compile fix for asm-i386/alternatives.h

compile fix:  <asm-i386/alternative.h>  needs  <asm/types.h> for 'u8' --
just look at struct alt_instr.

My module includes <asm/bitops.h> as the first header, and as of 2.6.17 this
leads to compilation errors.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: VIA C7 CPU flags
Michal Ludvig [Fri, 23 Jun 2006 09:04:32 +0000 (02:04 -0700)] 
[PATCH] x86: VIA C7 CPU flags

New CPU flags for next generation of crypto engine as found in VIA C7
processors.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: extra checks in show_registers()
Chuck Ebbert [Fri, 23 Jun 2006 09:04:31 +0000 (02:04 -0700)] 
[PATCH] i386: extra checks in show_registers()

Sometimes thread_info and task_struct get out-of-sync with each other.
Printing task.thread_info in show_registers() can help spot this.  And when
task_struct is corrupt then task.comm can contain garbage, so only print as
many characters as it can hold.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: fix __range_ok constraint
Roman Zippel [Fri, 23 Jun 2006 09:04:31 +0000 (02:04 -0700)] 
[PATCH] x86: fix __range_ok constraint

An immediate operand can't be the destination of the cmpl instruction,
so exclude it.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Mattia Dongili <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: don't try kprobes for v8086 mode
Zachary Amsden [Fri, 23 Jun 2006 09:04:30 +0000 (02:04 -0700)] 
[PATCH] i386: don't try kprobes for v8086 mode

Never allow int3 traps from V8086 mode to enter the kprobes handler.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: fix get_segment_eip() with vm86 segments
Chuck Ebbert [Fri, 23 Jun 2006 09:04:29 +0000 (02:04 -0700)] 
[PATCH] i386: fix get_segment_eip() with vm86 segments

We need to check for vm86 mode first before looking at selector privilege
bits.

Segment limit is always base + 64k and only the low 16 bits of EIP are
significant in vm86 mode.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Rohit Seth <rohitseth@google.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: use proper defines for i8259A I/O
Andreas Mohr [Fri, 23 Jun 2006 09:04:28 +0000 (02:04 -0700)] 
[PATCH] x86: use proper defines for i8259A I/O

Use proper defines instead of open-coded values.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: constify arch/i386/pci/irq.c
Andreas Mohr [Fri, 23 Jun 2006 09:04:28 +0000 (02:04 -0700)] 
[PATCH] x86: constify arch/i386/pci/irq.c

constify structs and add one __initdata.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] make ACPI errata __read_mostly
Andreas Mohr [Fri, 23 Jun 2006 09:04:27 +0000 (02:04 -0700)] 
[PATCH] make ACPI errata __read_mostly

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: make i387 mxcsr_feature_mask __read_mostly
Andreas Mohr [Fri, 23 Jun 2006 09:04:26 +0000 (02:04 -0700)] 
[PATCH] x86: make i387 mxcsr_feature_mask __read_mostly

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: cyrix code CONFIG_PCI fix / add __initdata
Andreas Mohr [Fri, 23 Jun 2006 09:04:26 +0000 (02:04 -0700)] 
[PATCH] x86: cyrix code CONFIG_PCI fix / add __initdata

PCI code was outside of CONFIG_PCI, add __initdata at cyrix_55x0 (since
accessed within __init function only).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: make using_apic_timer __read_mostly
Andreas Mohr [Fri, 23 Jun 2006 09:04:25 +0000 (02:04 -0700)] 
[PATCH] x86: make using_apic_timer __read_mostly

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: let usermode execute the "enter" instruction
Chuck Ebbert [Fri, 23 Jun 2006 09:04:23 +0000 (02:04 -0700)] 
[PATCH] i386: let usermode execute the "enter" instruction

The i386 page fault handler does not allow enough slack when checking for
userspace access below the current stack pointer.  This prevents use of the
enter instruction by user code.  Fix this by allowing enough slack for
"enter $65535,$31" to execute.

Problem reported by Tomasz Malesinski <tmal@mimuw.edu.pl>

Tested using this program, based on the original from Tomasz:

.file "ovflow.S"
.version "01.01"
gcc2_compiled.:
.section .rodata
.LC0:
.string "asdf\n"
.text
.align 4
.globl main
.type  main,@function
main:
nest_level=0
.rept 30
enter $0,$nest_level
nest_level=nest_level+1
.endr
enter $65535,$30
enter $65535,$31
addl $-12,%esp
pushl $.LC0
call printf
addl $16,%esp
.L2:
.rept 32
leave
.endr
ret
.Lfe1:
.size  main,.Lfe1-main
.ident "GCC: (GNU) 2.95.4 20011002 (Debian prerelease)"

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: kernel irq balance doesn't work
Zhang Yanmin [Fri, 23 Jun 2006 09:04:22 +0000 (02:04 -0700)] 
[PATCH] x86: kernel irq balance doesn't work

On i386, kernel irq balance doesn't work.

1) In function do_irq_balance, after kernel finds the min_loaded cpu but
   before calling set_pending_irq to really pin the selected_irq to the
   target cpu, kernel does a cpus_and with irq_affinity[selected_irq].
   Later on, when the irq is acked, kernel would calls
   move_native_irq=>desc->handler->set_affinity to change the irq affinity.
    However, every function pointed by
   hw_interrupt_type->set_affinity(unsigned int irq, cpumask_t cpumask)
   always changes irq_affinity[irq] to cpumask.  Next time when recalling
   do_irq_balance, it has to do cpu_ands again with
   irq_affinity[selected_irq], but irq_affinity[selected_irq] already
   becomes one cpu selected by the first irq balance.

2) Function balance_irq in file arch/i386/kernel/io_apic.c has the same
   issue.

[akpm@osdl.org: cleanups]
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: call eisa_set_level_irq() in pbibios_lookup_irq()
Linus Torvalds [Fri, 23 Jun 2006 09:04:21 +0000 (02:04 -0700)] 
[PATCH] x86: call eisa_set_level_irq() in pbibios_lookup_irq()

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Don't trigger full rebuild via CONFIG_X86_MCE
Alexey Dobriyan [Fri, 23 Jun 2006 09:04:20 +0000 (02:04 -0700)] 
[PATCH] Don't trigger full rebuild via CONFIG_X86_MCE

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: break out of recursion in stackframe walk
Ingo Molnar [Fri, 23 Jun 2006 09:04:20 +0000 (02:04 -0700)] 
[PATCH] i386: break out of recursion in stackframe walk

If CONFIG_FRAME_POINTERS is enabled, and one does a dump_stack() during
early SMP init, an infinite stackdump and a bootup hang happens:

 [<c0104e7f>] show_trace+0xd/0xf
 [<c0104e96>] dump_stack+0x15/0x17
 [<c01440df>] save_trace+0xc3/0xce
 [<c014527d>] mark_lock+0x8c/0x4fe
 [<c0145df5>] __lockdep_acquire+0x44e/0xaa5
 [<c0146798>] lockdep_acquire+0x68/0x84
 [<c1048699>] _spin_lock+0x21/0x2f
 [<c010d918>] prepare_set+0xd/0x5d
 [<c010daa8>] generic_set_all+0x1d/0x201
 [<c010ca9a>] mtrr_ap_init+0x23/0x3b
 [<c010ada8>] identify_cpu+0x2a7/0x2af
 [<c01192a7>] smp_store_cpu_info+0x2f/0xb4
 [<c01197d0>] start_secondary+0xb5/0x3ec
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
 [...]

Due to "end_of_stack_stop_unwind_function" recursing back to itself in the
EBP stackframe-walker.  So avoid this type of recursion when walking the
stack .

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix x86 microcode driver handling of multiple matching revisions
Jan Beulich [Fri, 23 Jun 2006 09:04:19 +0000 (02:04 -0700)] 
[PATCH] fix x86 microcode driver handling of multiple matching revisions

When multiple updates matching a given CPU are found in the update file, the
action taken by the microcode update driver was inappropriate:

- when lower revision microcode was found before matching or higher revision
  one, the driver would needlessly complain that it would not downgrade the
  CPU
- when microcode matching the currently installed revision was found before
  newer revision code, no update would actually take place

To change this behavior, the driver now concludes about possibly updates and
issues messages only when the entire input was parsed.

Additionally, this adds back (in different places, and conditionalized upon
a new module option) some messages removed by a previous patch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Tigran Aivazian <tigran_aivazian@symantec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Don't trigger full rebuild via CONFIG_MTRR
Alexey Dobriyan [Fri, 23 Jun 2006 09:04:18 +0000 (02:04 -0700)] 
[PATCH] Don't trigger full rebuild via CONFIG_MTRR

Only drm, framebuffer, mtrr parts + misc files here and there.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386 apm.c optimization
Andreas Mohr [Fri, 23 Jun 2006 09:04:17 +0000 (02:04 -0700)] 
[PATCH] i386 apm.c optimization

- avoid expensive modulo (integer division) which happened
  since APM_MAX_EVENTS is 20 (non-power-of-2)
- kill compiler warnings by initializing two variables
- add __read_mostly to some important static variables that are read often
  (by idle loop etc.)
- constify several structures

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arch/i386/kernel/apic.c: make modern_apic() static
Adrian Bunk [Fri, 23 Jun 2006 09:04:17 +0000 (02:04 -0700)] 
[PATCH] arch/i386/kernel/apic.c: make modern_apic() static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: cache pollution aware __copy_from_user_ll()
Hiro Yoshioka [Fri, 23 Jun 2006 09:04:16 +0000 (02:04 -0700)] 
[PATCH] x86: cache pollution aware __copy_from_user_ll()

Use the x86 cache-bypassing copy instructions for copy_from_user().

Some performance data are

Total of GLOBAL_POWER_EVENTS (CPU cycle samples)

2.6.12.4.orig    1921587
2.6.12.4.nt      1599424
1599424/1921587=83.23% (16.77% reduction)

BSQ_CACHE_REFERENCE (L3 cache miss)
2.6.12.4.orig      57427
2.6.12.4.nt        20858
20858/57427=36.32% (63.7% reduction)

L3 cache miss reduction of __copy_from_user_ll
samples  %
37408    65.1412  vmlinux                  __copy_from_user_ll
23        0.1103  vmlinux                  __copy_user_zeroing_intel_nocache
23/37408=0.061% (99.94% reduction)

Top 5 of 2.6.12.4.nt
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 100000
samples  %        app name                 symbol name
128392    8.0274  vmlinux                  __copy_user_zeroing_intel_nocache
64206     4.0143  vmlinux                  journal_add_journal_head
59746     3.7355  vmlinux                  do_get_write_access
47674     2.9807  vmlinux                  journal_put_journal_head
46021     2.8774  vmlinux                  journal_dirty_metadata
pattern9-0-cpu4-0-09011728/summary.out

Counted BSQ_CACHE_REFERENCE events (cache references seen by the bus unit) with a unit mask of 0x3f (multiple flags) count 3000
samples  %        app name                 symbol name
69755     4.2861  vmlinux                  __copy_user_zeroing_intel_nocache
55685     3.4215  vmlinux                  journal_add_journal_head
52371     3.2179  vmlinux                  __find_get_block
45504     2.7960  vmlinux                  journal_put_journal_head
36005     2.2123  vmlinux                  journal_stop
pattern9-0-cpu4-0-09011744/summary.out

Counted BSQ_CACHE_REFERENCE events (cache references seen by the bus unit) with a unit mask of 0x200 (read 3rd level cache miss) count 3000
samples  %        app name                 symbol name
1147      5.4994  vmlinux                  journal_add_journal_head
881       4.2240  vmlinux                  journal_dirty_data
872       4.1809  vmlinux                  blk_rq_map_sg
734       3.5192  vmlinux                  journal_commit_transaction
617       2.9582  vmlinux                  radix_tree_delete
pattern9-0-cpu4-0-09011731/summary.out

iozone results are

original 2.6.12.4 CPU time = 207.768 sec
cache aware       CPU time = 184.783 sec
(three times run)
184.783/207.768=88.94% (11.06% reduction)

original:
pattern9-0-cpu4-0-08191720/iozone.out:  CPU Utilization: Wall time   45.997    CPU time   64.527    CPU utilization 140.28 %
pattern9-0-cpu4-0-08191741/iozone.out:  CPU Utilization: Wall time   46.878    CPU time   71.933    CPU utilization 153.45 %
pattern9-0-cpu4-0-08191743/iozone.out:  CPU Utilization: Wall time   45.152    CPU time   71.308    CPU utilization 157.93 %

cache awre:
pattern9-0-cpu4-0-09011728/iozone.out:  CPU Utilization: Wall time   44.842    CPU time   62.465    CPU utilization 139.30 %
pattern9-0-cpu4-0-09011731/iozone.out:  CPU Utilization: Wall time   44.718    CPU time   59.273    CPU utilization 132.55 %
pattern9-0-cpu4-0-09011744/iozone.out:  CPU Utilization: Wall time   44.367    CPU time   63.045    CPU utilization 142.10 %

Signed-off-by: Hiro Yoshioka <hyoshiok@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mips: fix number of mremap arguments
Yoichi Yuasa [Fri, 23 Jun 2006 09:04:14 +0000 (02:04 -0700)] 
[PATCH] mips: fix number of mremap arguments

mremap syscall takes 5 arguments. Fixed by Ralf Baechle.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Au1550/1200: add missing PSC #define's, make OSS driver use the proper ones
Sergei Shtylyov [Fri, 23 Jun 2006 09:04:13 +0000 (02:04 -0700)] 
[PATCH] Au1550/1200: add missing PSC #define's, make OSS driver use the proper ones

Add missing PSC #define's required for the drivers using PSC on DBAu1550
board (also fixing Au1550 PSC3 address) and all Au1200-based boards as
well.  Make the OSS driver use the correct PSC definitions fo each board.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: clean frv unistd.h
Al Viro [Fri, 23 Jun 2006 09:04:13 +0000 (02:04 -0700)] 
[PATCH] frv: clean frv unistd.h

Remove _syscall invocations that aren't used in the kernel.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: trivial cleanups in frv_ksyms.c
Al Viro [Fri, 23 Jun 2006 09:04:12 +0000 (02:04 -0700)] 
[PATCH] frv: trivial cleanups in frv_ksyms.c

Remove duplicate EXPORT_SYMBOL annotations from the FRV arch.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: Add missing qualifier to memcpy_fromio() prototype
Al Viro [Fri, 23 Jun 2006 09:04:11 +0000 (02:04 -0700)] 
[PATCH] frv: Add missing qualifier to memcpy_fromio() prototype

The memcpy_fromio() function should have a const qualifier on its source
pointer.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: ieee1394 is borken on frv
Al Viro [Fri, 23 Jun 2006 09:04:10 +0000 (02:04 -0700)] 
[PATCH] frv: ieee1394 is borken on frv

The ieee1394 assumes it may make direct use of ->count in the semaphore
structure.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Ben Collins <bcollins@ubuntu.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: NULL noise removal in frv xchg()
Al Viro [Fri, 23 Jun 2006 09:04:09 +0000 (02:04 -0700)] 
[PATCH] frv: NULL noise removal in frv xchg()

Clean up the FRV arch's xchg() function.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: initrd is grossly broken on frv (never built)
Al Viro [Fri, 23 Jun 2006 09:04:09 +0000 (02:04 -0700)] 
[PATCH] frv: initrd is grossly broken on frv (never built)

The FRV arch doesn't currently support initrd, so it should be disabled
automatically for the moment.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ext2 XIP won't build without MMU
Al Viro [Fri, 23 Jun 2006 09:04:08 +0000 (02:04 -0700)] 
[PATCH] ext2 XIP won't build without MMU

Disable Ext2 XIP if the kernel is configured in no-MMU mode as the former
won't build.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: wrong syscall
Al Viro [Fri, 23 Jun 2006 09:04:07 +0000 (02:04 -0700)] 
[PATCH] frv: wrong syscall

The FRV arch should use fstatat64 not newfstatat.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: misc sparse annotations
Al Viro [Fri, 23 Jun 2006 09:04:07 +0000 (02:04 -0700)] 
[PATCH] frv: misc sparse annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: misc __user annotations
Al Viro [Fri, 23 Jun 2006 09:04:06 +0000 (02:04 -0700)] 
[PATCH] frv: misc __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: binfmt_elf_fdpic __user annotations
Al Viro [Fri, 23 Jun 2006 09:04:05 +0000 (02:04 -0700)] 
[PATCH] frv: binfmt_elf_fdpic __user annotations

Add __user annotations to binfmt_elf_fdpic.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: sysctl __user annotations
Al Viro [Fri, 23 Jun 2006 09:04:05 +0000 (02:04 -0700)] 
[PATCH] frv: sysctl __user annotations

Add __user annotations to FRV-specific sysctl stuff.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: signal annotations
Al Viro [Fri, 23 Jun 2006 09:04:04 +0000 (02:04 -0700)] 
[PATCH] frv: signal annotations

Add annotations to the FRV signal handling for sparse.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: basic __iomem annotations
Al Viro [Fri, 23 Jun 2006 09:04:03 +0000 (02:04 -0700)] 
[PATCH] frv: basic __iomem annotations

Add annotations to the FRV I/O handling functions for sparse.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: __user infrastructure
Al Viro [Fri, 23 Jun 2006 09:04:03 +0000 (02:04 -0700)] 
[PATCH] frv: __user infrastructure

Add general annotations to the FRV arch for sparse.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: add security_task_movememory calls to mm code
David Quigley [Fri, 23 Jun 2006 09:04:02 +0000 (02:04 -0700)] 
[PATCH] SELinux: add security_task_movememory calls to mm code

This patch inserts security_task_movememory hook calls into memory management
code to enable security modules to mediate this operation between tasks.

Since the last posting, the hook has been renamed following feedback from
Christoph Lameter.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Andi Kleen <ak@muc.de>
Acked-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: add task_movememory hook
David Quigley [Fri, 23 Jun 2006 09:04:01 +0000 (02:04 -0700)] 
[PATCH] SELinux: add task_movememory hook

This patch adds new security hook, task_movememory, to be called when memory
owened by a task is to be moved (e.g.  when migrating pages to a this hook is
identical to the setscheduler implementation, but a separate hook introduced
to allow this check to be specialized in the future if necessary.

Since the last posting, the hook has been renamed following feedback from
Christoph Lameter.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@muc.de>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: add security hook call to mediate attach_task (kernel/cpuset.c)
David Quigley [Fri, 23 Jun 2006 09:04:00 +0000 (02:04 -0700)] 
[PATCH] SELinux: add security hook call to mediate attach_task (kernel/cpuset.c)

Add a security hook call to enable security modules to control the ability
to attach a task to a cpuset.  While limited control over this operation is
possible via permission checks on the pseudo fs interface, those checks are
not sufficient to control access to the target task, which is looked up in
this function.  The existing task_setscheduler hook is re-used for this
operation since this falls under the same class of operations.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: add security hooks to {get,set}affinity
David Quigley [Fri, 23 Jun 2006 09:03:59 +0000 (02:03 -0700)] 
[PATCH] SELinux: add security hooks to {get,set}affinity

This patch adds LSM hooks into the setaffinity and getaffinity functions to
enable security modules to control these operations between tasks with
task_setscheduler and task_getscheduler LSM hooks.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] lsm: add task_setioprio hook
James Morris [Fri, 23 Jun 2006 09:03:58 +0000 (02:03 -0700)] 
[PATCH] lsm: add task_setioprio hook

Implement an LSM hook for setting a task's IO priority, similar to the hook
for setting a tasks's nice value.

A previous version of this LSM hook was included in an older version of
multiadm by Jan Engelhardt, although I don't recall it being submitted
upstream.

Also included is the corresponding SELinux hook, which re-uses the setsched
permission in the proccess class.

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] move_pages: fix 32 -> 64 bit compat function
Christoph Lameter [Fri, 23 Jun 2006 09:03:57 +0000 (02:03 -0700)] 
[PATCH] move_pages: fix 32 -> 64 bit compat function

The definition of the third parameter is a pointer to an array of virtual
addresses which give us some trouble.  The existing code calculated the
wrong address in the array since I used void to avoid having to specify a
type.

I now use the correct type "compat_uptr_t __user *" in the definition of
the function in kernel/compat.c.

However, I used __u32 in syscalls.h.  Would have to include compat.h there
in order to provide the same definition which would generate an ugly
include situation.

On both ia64 and x86_64 compat_uptr_t is u32. So this works although
parameter declarations differ.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sys_move_pages: 32bit support (i386, x86_64)
Christoph Lameter [Fri, 23 Jun 2006 09:03:56 +0000 (02:03 -0700)] 
[PATCH] sys_move_pages: 32bit support (i386, x86_64)

sys_move_pages() support for 32bit (i386 plus x86_64 compat layer)

Add support for move_pages() on i386 and also add the compat functions
necessary to run 32 bit binaries on x86_64.

Add compat_sys_move_pages to the x86_64 32bit binary layer.  Note that it is
not up to date so I added the missing pieces.  Not sure if this is done the
right way.

[akpm@osdl.org: compile fix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sys_move_pages: x86_64 support
Christoph Lameter [Fri, 23 Jun 2006 09:03:56 +0000 (02:03 -0700)] 
[PATCH] sys_move_pages: x86_64 support

sys_move_pages support for x86_64

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: sys_move_pages(): support moving of individual pages
Christoph Lameter [Fri, 23 Jun 2006 09:03:55 +0000 (02:03 -0700)] 
[PATCH] page migration: sys_move_pages(): support moving of individual pages

move_pages() is used to move individual pages of a process. The function can
be used to determine the location of pages and to move them onto the desired
node. move_pages() returns status information for each page.

long move_pages(pid, number_of_pages_to_move,
addresses_of_pages[],
nodes[] or NULL,
status[],
flags);

The addresses of pages is an array of void * pointing to the
pages to be moved.

The nodes array contains the node numbers that the pages should be moved
to. If a NULL is passed instead of an array then no pages are moved but
the status array is updated. The status request may be used to determine
the page state before issuing another move_pages() to move pages.

The status array will contain the state of all individual page migration
attempts when the function terminates. The status array is only valid if
move_pages() completed successfullly.

Possible page states in status[]:

0..MAX_NUMNODES The page is now on the indicated node.

-ENOENT Page is not present

-EACCES Page is mapped by multiple processes and can only
be moved if MPOL_MF_MOVE_ALL is specified.

-EPERM The page has been mlocked by a process/driver and
cannot be moved.

-EBUSY Page is busy and cannot be moved. Try again later.

-EFAULT Invalid address (no VMA or zero page).

-ENOMEM Unable to allocate memory on target node.

-EIO Unable to write back page. The page must be written
back in order to move it since the page is dirty and the
filesystem does not provide a migration function that
would allow the moving of dirty pages.

-EINVAL A dirty page cannot be moved. The filesystem does not provide
a migration function and has no ability to write back pages.

The flags parameter indicates what types of pages to move:

MPOL_MF_MOVE Move pages that are only mapped by the process.

MPOL_MF_MOVE_ALL Also move pages that are mapped by multiple processes.
Requires sufficient capabilities.

Possible return codes from move_pages()

-ENOENT No pages found that would require moving. All pages
are either already on the target node, not present, had an
invalid address or could not be moved because they were
mapped by multiple processes.

-EINVAL Flags other than MPOL_MF_MOVE(_ALL) specified or an attempt
to migrate pages in a kernel thread.

-EPERM MPOL_MF_MOVE_ALL specified without sufficient priviledges.
or an attempt to move a process belonging to another user.

-EACCES One of the target nodes is not allowed by the current cpuset.

-ENODEV One of the target nodes is not online.

-ESRCH Process does not exist.

-E2BIG Too many pages to move.

-ENOMEM Not enough memory to allocate control array.

-EFAULT Parameters could not be accessed.

A test program for move_pages() may be found with the patches
on ftp.kernel.org:/pub/linux/kernel/people/christoph/pmig/patches-2.6.17-rc4-mm3

From: Christoph Lameter <clameter@sgi.com>

  Detailed results for sys_move_pages()

  Pass a pointer to an integer to get_new_page() that may be used to
  indicate where the completion status of a migration operation should be
  placed.  This allows sys_move_pags() to report back exactly what happened to
  each page.

  Wish there would be a better way to do this. Looks a bit hacky.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: use allocator function for migrate_pages()
Christoph Lameter [Fri, 23 Jun 2006 09:03:53 +0000 (02:03 -0700)] 
[PATCH] page migration: use allocator function for migrate_pages()

Instead of passing a list of new pages, pass a function to allocate a new
page.  This allows the correct placement of MPOL_INTERLEAVE pages during page
migration.  It also further simplifies the callers of migrate pages.
migrate_pages() becomes similar to migrate_pages_to() so drop
migrate_pages_to().  The batching of new page allocations becomes unnecessary.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: handle freeing of pages in migrate_pages()
Christoph Lameter [Fri, 23 Jun 2006 09:03:52 +0000 (02:03 -0700)] 
[PATCH] page migration: handle freeing of pages in migrate_pages()

Do not leave pages on the lists passed to migrate_pages().  Seems that we will
not need any postprocessing of pages.  This will simplify the handling of
pages by the callers of migrate_pages().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: simplify migrate_pages()
Christoph Lameter [Fri, 23 Jun 2006 09:03:51 +0000 (02:03 -0700)] 
[PATCH] page migration: simplify migrate_pages()

Currently migrate_pages() is mess with lots of goto.  Extract two functions
from migrate_pages() and get rid of the gotos.

Plus we can just unconditionally set the locked bit on the new page since we
are the only one holding a reference.  Locking is to stop others from
accessing the page once we establish references to the new page.

Remove the list_del from move_to_lru in order to have finer control over list
processing.

[akpm@osdl.org: add debug check]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] printk() should not be called under zone->lock
Kirill Korotaev [Fri, 23 Jun 2006 09:03:50 +0000 (02:03 -0700)] 
[PATCH] printk() should not be called under zone->lock

This patch fixes printk() under zone->lock in show_free_areas().  It can be
unsafe to call printk() under this lock, since caller can try to
allocate/free some memory and selfdeadlock on this lock.  I found
allocations/freeing mem both in netconsole and serial console.

This issue was faced in reallity when meminfo was periodically printed for
debug purposes and netconsole was used.

Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Delete unused definitions of kvaddr_to_nid
Ralf Baechle [Fri, 23 Jun 2006 09:03:50 +0000 (02:03 -0700)] 
[PATCH] Delete unused definitions of kvaddr_to_nid

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kernel-doc for mm/filemap.c
Randy Dunlap [Fri, 23 Jun 2006 09:03:49 +0000 (02:03 -0700)] 
[PATCH] kernel-doc for mm/filemap.c

mm/filemap.c:
- add lots of kernel-doc;
- fix some typos and kernel-doc errors;
- drop some blank lines between function close and EXPORT_SYMBOL();

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: kmalloc, kzalloc comments cleanup and fix
Paul Drynoff [Fri, 23 Jun 2006 09:03:48 +0000 (02:03 -0700)] 
[PATCH] slab: kmalloc, kzalloc comments cleanup and fix

- Move comments for kmalloc to right place, currently it near __do_kmalloc

- Comments for kzalloc

- More detailed comments for kmalloc

- Appearance of "kmalloc" and "kzalloc" man pages after "make mandocs"

[rdunlap@xenotime.net: simplification]
Signed-off-by: Paul Drynoff <pauldrynoff@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>