Jiri Slaby [Sat, 10 Feb 2007 09:45:27 +0000 (01:45 -0800)]
[PATCH] Char: moxa, timers cleanup
Use kernel macros and functions for timer encapsulation -- do not access
fileds directly. Also del_timer on inactive is legal, so that noting if it
runs is senseless, delete these variables.
Jiri Slaby [Sat, 10 Feb 2007 09:45:25 +0000 (01:45 -0800)]
[PATCH] Char: moxa, remove unused allocated page
moxaXmitBuff is almost unused -- only one byte from the whole PAGE_SIZE bytes
is used. Do not alloc so much space for almost anything. Also remove lock
protecting this page allocation.
Theodore Ts'o [Sat, 10 Feb 2007 09:45:24 +0000 (01:45 -0800)]
[PATCH] Add TAINT_USER and ability to set taint flags from userspace
Allow taint flags to be set from userspace by writing to
/proc/sys/kernel/tainted, and add a new taint flag, TAINT_USER, to be used
when userspace has potentially done something dangerous that might
compromise the kernel. This will allow support personnel to ask further
questions about what may have caused the user taint flag to have been set.
For example, they might examine the logs of the realtime JVM to see if the
Java program has used the really silly, stupid, dangerous, and
completely-non-portable direct access to physical memory feature which MUST
be implemented according to the Real-Time Specification for Java (RTSJ).
Sigh. What were those silly people at Sun thinking?
Jiri Slaby [Sat, 10 Feb 2007 09:45:22 +0000 (01:45 -0800)]
[PATCH] Char: mxser_new, do not null driver_data
driver_data are initialzed to NULL from tty layer, no need to do it in the
driver. In this case it cases oops, since driver_data may be NULL for a short
while for another closing process.
Because brd->info is not NULLed, resources are released twice. NULL it in
pci_remove function. Also take care of retval and releasing in pci_probe --
mxser_initbrd alreasy releases resource, do not do it again in fail path in
probe function.
Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Sat, 10 Feb 2007 09:45:18 +0000 (01:45 -0800)]
[PATCH] Char: mxser_new, alter locking in isr
Avoid oopsing when stress-testing open/close -- port->tty is NULL sometimes,
but is expected to be non-NULL, since dereferencing. Receive/transmit chars
iff ASYNC_CLOSING is not set and ASYNC_INITIALIZED is set. Thanks Sergei for
pointing this out and testing.
Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Sat, 10 Feb 2007 09:45:17 +0000 (01:45 -0800)]
[PATCH] Doc: isicom, remove reserved ioctl-number
Isicom driver no longer registers chardev with ioctl function. It used to
use for firmware loading. Remove the reserved letter (M) from
ioctl-number, so that the conflict get away.
David Brownell [Sat, 10 Feb 2007 09:45:13 +0000 (01:45 -0800)]
[PATCH] PNP: export pnp_bus_type
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate
exception to the policy followed by pretty much every other bus. I noticed
this when I had to find a device in order to provide its platform_data.
Note that per advice from Arjan, the "export" scope has been been minimized to
avoid the hundred-plus bytes needed to support access from modules. In this
case, the symbol is only needed by statically linked kernel code that lives
outside the drivers/pnp directory.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:45:06 +0000 (01:45 -0800)]
[PATCH] ext2: skip pages past number of blocks in ext2_find_entry
This one was pointed out on the MOKB site:
http://kernelfun.blogspot.com/2006/11/mokb-09-11-2006-linux-26x-ext2checkpage.html
If a directory's i_size is corrupted, ext2_find_entry() will keep
processing pages until the i_size is reached, even if there are no more
blocks associated with the directory inode. This patch puts in some
minimal sanity-checking so that we don't keep checking pages (and issuing
errors) if we know there can be no more data to read, based on the block
count of the directory inode.
This is somewhat similar in approach to the ext3 patch I sent earlier this
year.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mathieu originally needed to add this for tracing Xen, but it's something
that's needed for any application that can be tracing while cpus are added.
unplug isn't supported by this patch. The thought was that at minumum a new
buffer needs to be added when a cpu comes up, but it wasn't worth the effort
to remove buffers on cpu down since they'd be freed soon anyway when the
channel was closed.
[zanussi@us.ibm.com: avoid lock_cpu_hotplug deadlock] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Atsushi Nemoto [Sat, 10 Feb 2007 09:45:05 +0000 (01:45 -0800)]
[PATCH] serial: serial_txx9 driver update
Update the serial_txx9 driver.
* Configurable manumum port number. (SERIAL_TXX9_NR_UARTS)
* Remove some code which is unneeded if CONFIG_PM=n.
* Use PCI_DEVICE() for pci device id table and make it const.
* Do not include <asm/irq.h>
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
corresponding "kmem_cache_zalloc()" call.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Roland McGrath <roland@redhat.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Acked-by: Joel Becker <Joel.Becker@oracle.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Jan Kara <jack@ucw.cz> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Sat, 10 Feb 2007 09:45:01 +0000 (01:45 -0800)]
[PATCH] scrub non-__GLIBC__ checks in linux/socket.h and linux/stat.h
Userspace should be worrying about userspace, so having the socket.h
and stat.h pollute the namespace in the non-glibc case is wrong and
pretty much prevents any other libc from utilizing these headers
sanely unless they set up the __GLIBC__ define themselves (which
sucks)
Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tilman Schmidt [Sat, 10 Feb 2007 09:45:00 +0000 (01:45 -0800)]
[PATCH] consolidate line discipline number definitions
The line discipline numbers N_* are currently defined for each architecture
individually, but (except for a seeming mistake) identically, in
asm/termios.h. There is no obvious reason why these numbers should be
architecture specific, nor any apparent relationship with the termios
structure. The total number of these, NR_LDISCS, is defined in linux/tty.h
anyway. So I propose the following patch which moves the definitions of
the individual line disciplines to linux/tty.h too.
Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused
in the current kernel, but the patch still keeps the complete set in case
there are plans to use them yet.
Jan Blunck [Sat, 10 Feb 2007 09:44:59 +0000 (01:44 -0800)]
[PATCH] igrab() should check for I_CLEAR
When igrab() is calling __iget() on an inode it should check if
clear_inode() has been called on the inode already. Otherwise there is a
race window between clear_inode() and destroy_inode() where igrab() calls
__iget() which leads to already free inodes on the inode lists.
Signed-off-by: Vandana Rungta <vandana@novell.com> Signed-off-by: Jan Blunck <jblunck@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jarek Poplawski [Sat, 10 Feb 2007 09:44:58 +0000 (01:44 -0800)]
[PATCH] lockdep: more unlock-on-error fixes
- returns after DEBUG_LOCKS_WARN_ON added in 3 places
- debug_locks checking after lookup_chain_cache() added in
__lock_acquire()
- locking for testing and changing global variable max_lockdep_depth
added in __lock_acquire()
From: Ingo Molnar <mingo@elte.hu>
My __acquire_lock() cleanup introduced a locking bug: on SMP systems we'd
release a non-owned graph lock. Fix this by moving the graph unlock back,
and by leaving the max_lockdep_depth variable update possibly racy. (we
dont care, it's just statistics)
Also add some minimal debugging code to graph_unlock()/graph_lock(),
which caught this locking bug.
Jiri Slaby [Sat, 10 Feb 2007 09:44:55 +0000 (01:44 -0800)]
[PATCH] Char: isicom, correct probing/removing
Don't forget to decrease card_count in fail paths and in remove function.
Also null board->base in such cases to point out, that this structure is
unused and thus can be reassigned.
Eric Dumazet [Sat, 10 Feb 2007 09:44:48 +0000 (01:44 -0800)]
[PATCH] struct vfsmount: keep mnt_count & mnt_expiry_mark away from mnt_flags
I noticed cache misses in touch_atime() that can be avoided if we keep
mnt_count & mnt_expiry_mark in a different cache line than mnt_flags
(mostly read)
mnt_count & mnt_expiry_mark are modified each time a file is opened/closed
in a file system.
touch_atime() is called each time a file is read, and generally needs to
read mnt_flags.
Other fields of struct vfsmount are mostly read so I chose to move
mnt_count & mnt_expiry_mark at the end of struct vfsmount. And adding a
comment so that nobody tries to re-arrange fields to fill the holes :)
On 64bits platforms, the new offsetof(mnt_count) is 0xC0
On 32bits platforms, it is 0x60, so I didnot add a
____cacheline_aligned_in_smp because it would have a too big impact on the
size of this object (in particular if CONFIG_X86_L1_CACHE_SHIFT=7)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
New format:
file <name> <location> <mode> <uid> <gid> [<hard links>]
The hard links specification is optional, keeping the previous
behaviour.
All hard links are defined sequentially in the resulting cpio and the
file data is present only in the last link. This is the behaviour of
GNU's cpio and is supported by the kernel initramfs extractor.
Signed-off-by: Luciano Rocha <strange@nsk.no-ip.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean-Paul Saman [Sat, 10 Feb 2007 09:44:44 +0000 (01:44 -0800)]
[PATCH] disable init/initramfs.c: architectures
Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs
when CONFIG_BLK_DEV_INITRAMFS is not selected. This saves another 4 kbytes
on most platfoms (some reserve PAGE_SIZE for initramfs).
Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean-Paul Saman [Sat, 10 Feb 2007 09:44:43 +0000 (01:44 -0800)]
[PATCH] disable init/initramfs.c
The file init/initramfs.c is always compiled and linked in the kernel
vmlinux even when BLK_DEV_RAM and BLK_DEV_INITRD are disabled and the
system isn't using any form of an initramfs or initrd. In this situation
the code is only used to unpack a (static) default initial rootfilesystem.
The current init/initramfs.c code. usr/initramfs_data.o compiles to a size
of ~15 kbytes. Disabling BLK_DEV_RAM and BLK_DEV_INTRD shrinks the kernel
code size with ~60 Kbytes.
This patch avoids compiling in the code and data for initramfs support if
CONFIG_BLK_DEV_INITRD is not defined. Instead of the initramfs code and
data it uses a small routine in init/noinitramfs.c to setup an initial
static default environment for mounting a rootfilesystem later on in the
kernel initialisation process. The new code is: 164 bytes of size.
The patch is separated in two parts:
1) doesn't compile initramfs code when CONFIG_BLK_DEV_INITRD is not set
2) changing all plaforms vmlinux.lds.S files to not reserve an area of
PAGE_SIZE when CONFIG_BLK_DEV_INITRD is not set.
[deweerdt@free.fr: warning fix] Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/byteorder/pdp_endian.h is completely unused, and the comment in
the file itself states that it's both untested and only a proof-of-concept.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This does several things.
- It moves looking up of the current foreground console into process
context where we can safely take the semaphore that protects this
operation.
- It uses the new flavor of work queue processing.
- This generates a factor of do_SAK, __do_SAK that runs immediately.
- This calls __do_SAK with the console semaphore held ensuring nothing
else happens to the console while we process the SAK operation.
- With the console SAK processing moved into process context this
patch removes the xchg operations that I used to attempt to attomically
update struct pid, because of the strange locking used in the SAK processing.
With SAK using the normal console semaphore nothing special is needed.
Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Neuling [Sat, 10 Feb 2007 09:44:33 +0000 (01:44 -0800)]
[PATCH] Add retain_initrd boot option
Add retain_initrd option to control freeing of initrd memory after
extraction. By default, free memory as previously.
The first boot will need to hold a copy of the in memory fs for the second
boot. This image can be large (much larger than the kernel), hence we can
save time when the memory loader is slow. Also, it reduces the memory
footprint while extracting the first boot since you don't need another copy
of the fs.
Signed-off-by: Michael Neuling <mikey@neuling.org> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ahmed S. Darwish [Sat, 10 Feb 2007 09:44:30 +0000 (01:44 -0800)]
[PATCH] V850: user ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in linux/kernel.h
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:30 +0000 (01:44 -0800)]
[PATCH] uml: x86_64 ptrace fixes
This patch fixes some missing ptrace bits on x86_64. PTRACE_ARCH_PRCTL is
hooked up and implemented. This required generalizing arch_prctl_skas
slightly to take a task_struct to modify. Previously, it always operated on
current.
Reading and writing the debug registers is also enabled by un-ifdefing the
code that implements that. It turns out that x86_64 is identical to i386, so
the same code can be used.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:29 +0000 (01:44 -0800)]
[PATCH] uml: x86_64 thread fixes
x86_64 needs some TLS fixes. What was missing was remembering the child
thread id during clone and stuffing it into the child during each context
switch.
The %fs value is stored separately in the thread structure since the host
controls what effect it has on the actual register file. The host also needs
to store it in its own thread struct, so we need the value kept outside the
register file.
arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately. There is
some saving and restoring of registers in the ARCH_SET_* cases so that the
correct set of registers are changed on the host and restored to the process
when it runs again.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:28 +0000 (01:44 -0800)]
[PATCH] uml: fix error output during early boot
The startup code panics a lot if anything goes wrong early on. This is wrong
for several reasons, like the kernel isn't running, so you can't really be
calling into it yet, but the harm comes from useful error messages being
trapped in the printk ring where no one will ever see them.
This patch changes these panics to perror and printf in wrappers which also
exit. Normal, informational, prints are also wrapped so that fflush(stdout)
is called after each one. This is so the output appears in the correct
sequence in the event of an error.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:27 +0000 (01:44 -0800)]
[PATCH] uml: AIO locking and tidying
Comment the lack of locking of data that's set up once at boot time.
Also fixed a couple of bogus printks.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:26 +0000 (01:44 -0800)]
[PATCH] uml: register handling formatting fixes
Formatting fixes in the register handling code.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:26 +0000 (01:44 -0800)]
[PATCH] uml: ELF locking commentary
Comment the lack of locking of the elf data extracted from the ELF headers
passed to UML.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:25 +0000 (01:44 -0800)]
[PATCH] uml: umid tidying
Add an error message when two umids are put on the command line.
umid.h is kind of pointless since it only declares one thing, and that
is already declared in os.h.
Commented the lack of locking of some data in os-Linux/umid.h.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:24 +0000 (01:44 -0800)]
[PATCH] uml: SIGIO formatting fixes
Fix formatting in the sigio code.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:23 +0000 (01:44 -0800)]
[PATCH] uml: SIGIO locking comment
Comment the use of a mysterious-looking lock.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:23 +0000 (01:44 -0800)]
[PATCH] uml: IRQ handler tidying
Tidying the irq code -
make a variable static
activate_fd can call kmalloc directly since it's now kernel code
added a no-locking comment
fixed a style violation
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Sat, 10 Feb 2007 09:44:22 +0000 (01:44 -0800)]
[PATCH] uml: fix apparent "CONFIG_64_BIT" typo.
Fix apparent typo, where CONFIG_64_BIT should read CONFIG_64BIT.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:21 +0000 (01:44 -0800)]
[PATCH] uml: fix style violations
Fix a bunch of style violations in mem.c.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:20 +0000 (01:44 -0800)]
[PATCH] uml: libc-dependent code should call libc directly
We shouldn't be using the os wrappers from os code - we can use libc directly.
This patch replaces wrapper calls with libc calls.
It turns out that os_sigio_async had only one caller, which was in startup.c,
so that function is moved there and its name changed.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:20 +0000 (01:44 -0800)]
[PATCH] uml: style fixes in startup code
Some style fixes in startup.c.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:19 +0000 (01:44 -0800)]
[PATCH] uml: locking comments in startup code
Add a couple of comments about some non-locked data.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:18 +0000 (01:44 -0800)]
[PATCH] uml: locking comments in memory and tempfile code
Locking comments and emacs comment removal in the low-level memory and
temp file code.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:17 +0000 (01:44 -0800)]
[PATCH] uml: locking fixes in the ubd driver
Some small locking and formatting fixes in the ubd driver.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:16 +0000 (01:44 -0800)]
[PATCH] uml: add per-device queues and locks to ubd driver
Replace global queue and lock with per-device queues and locks. Mostly a
straightforward replacement of ubd_io_lock with dev->lock and ubd_queue with
dev->queue.
Complications -
There was no way to get a request struct (and queue) from the
structure sent to the io_thread, so a pointer to the request was
added. This is needed in ubd_handler in order to kick do_ubd_request
to process another request.
Queue initialization is moved from ubd_init to ubd_add.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:15 +0000 (01:44 -0800)]
[PATCH] uml: remove code controlled by non-existent config option
CONFIG_HOST_TASK_SIZE doesn't exist any more.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:15 +0000 (01:44 -0800)]
[PATCH] uml: const a variable
kstack_depth_to_print can be made const.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:14 +0000 (01:44 -0800)]
[PATCH] uml: make signal handlers static
A bunch of the signal handlers can be made static.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:13 +0000 (01:44 -0800)]
[PATCH] uml: remove unused variable and function
syscall_index and next_syscall_index turn out not to be used.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:12 +0000 (01:44 -0800)]
[PATCH] uml: delete unused file
It turns out that resource.c isn't needed.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:12 +0000 (01:44 -0800)]
[PATCH] uml: make time data per-cpu
prev_nsecs and delta need to be arrays, and indexed by CPU number.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:11 +0000 (01:44 -0800)]
[PATCH] uml: initialize a list head
We need to initialize lists properly.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:10 +0000 (01:44 -0800)]
[PATCH] uml: mem.c and physmem.c formatting fixes
Fix a bunch of style violations in mem.c and physmem.c
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:09 +0000 (01:44 -0800)]
[PATCH] uml: locking comments in iomem driver
Comment some lack of locking in the iomem driver.
Also, a couple of variables are in the wrong place, so they are moved.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:08 +0000 (01:44 -0800)]
[PATCH] uml: fix previous console locking
Eliminate the open_mutex after complaints from Blaisorblade. It turns out
that the tty count provides the information needed to tell whether we are the
first opener or last closer.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:08 +0000 (01:44 -0800)]
[PATCH] uml: console locking commentary and code cleanup
Remove the last vestiges of devfs from console registration. Change the name
of the function, plus remove a couple of unused fields from the line_driver
structure.
struct lines is no longer needed, all traces of it are gone.
The only way that I can see to mark a structure as being almost-const is to
individually const the fields. This is the case for the line_driver
structure, which has only one modifiable field - a list_head in a
sub-structure.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:07 +0000 (01:44 -0800)]
[PATCH] uml: chan_user.h formatting fixes
Whitespace fixes and emacs comment removal.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:06 +0000 (01:44 -0800)]
[PATCH] uml: mostly const a structure
The chan_opts structure is mostly const, and needs no locking. Comment the
lack of locking on the one field that can change.
Make all the other fields const. It turned out that console_open_chan didn't
use its chan_opts argument, so that is deleted from the function and its
callers.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:05 +0000 (01:44 -0800)]
[PATCH] uml: locking commentary in the random driver
Comment the lack of locking.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:04 +0000 (01:44 -0800)]
[PATCH] uml: use LIST_HEAD where possible
A couple of list_head declarations can be improved through the use of
LIST_HEAD().
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:04 +0000 (01:44 -0800)]
[PATCH] uml: network driver locking and code cleanup
Add some missing locking to walks of the transports and opened lists.
Delete some dead code.
Comment the lack of some locking.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:03 +0000 (01:44 -0800)]
[PATCH] uml: Kill a compilation warning
Kill a compilation warning.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:02 +0000 (01:44 -0800)]
[PATCH] uml: port driver formatting
Whitespace and style fixes.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:01 +0000 (01:44 -0800)]
[PATCH] uml: make two variables static
Make a couple of variables static.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:01 +0000 (01:44 -0800)]
[PATCH] uml: mconsole locking
Locking fixes. Locking was totally lacking for the mconsole_devices, which
got a spin lock, and the unplugged pages data, which got a mutex.
The locking of the mconsole console output code was confused. Now, the
console_lock (renamed to client_lock) protects the clients list.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 10 Feb 2007 09:44:00 +0000 (01:44 -0800)]
[PATCH] uml: audio driver formatting
Whitespace and style fixes.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>