Marko Kohtala [Fri, 6 Jan 2006 08:19:44 +0000 (00:19 -0800)]
[PATCH] parport: phase fixes
Did not move the parport interface properly into IEEE1284_PH_REV_IDLE phase at
end of data due to comparing bytes with nibbles. Internal phase
IEEE1284_PH_HBUSY_DNA became unused, so remove it.
Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Marko Kohtala [Fri, 6 Jan 2006 08:19:43 +0000 (00:19 -0800)]
[PATCH] parport: buffer overflow fix
Fix potential buffer overflow in case the device ID did not end in semicolon.
Also might fail to negotiate back to IEEE1284_MODE_COMPAT in case of failure.
parport_device_id did not return what Documentation/parport-lowlevel.txt said,
so I changed it to match it.
Determining device ID length is overly complicated, but Tim Waugh recalled on
linux-parport seeing some buggy device that might need it.
Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Miklos Szeredi [Fri, 6 Jan 2006 08:19:43 +0000 (00:19 -0800)]
[PATCH] fuse: check file type in lookup
Previously invalid types were quietly changed to regular files, but at
revalidation the inode was changed to bad. This was rather inconsistent
behavior.
Now check if the type is valid on initial lookup, and return -EIO if not.
Miklos Szeredi [Fri, 6 Jan 2006 08:19:42 +0000 (00:19 -0800)]
[PATCH] fuse: ensure progress in read and write
In direct_io mode, send at least one page per reqest. Previously it was
possible that reqests with zero data were sent, and hence the read/write
didn't make any progress, resulting in an infinite (though interruptible)
loop.
Miklos Szeredi [Fri, 6 Jan 2006 08:19:41 +0000 (00:19 -0800)]
[PATCH] fuse: make maximum write data configurable
Make the maximum size of write data configurable by the filesystem. The
previous fixed 4096 limit only worked on architectures where the page size is
less or equal to this. This change make writing work on other architectures
too, and also lets the filesystem receive bigger write requests in direct_io
mode.
Normal writes which go through the page cache are still limited to a page
sized chunk per request.
Miklos Szeredi [Fri, 6 Jan 2006 08:19:38 +0000 (00:19 -0800)]
[PATCH] fuse: support caching negative dentries
Add support for caching negative dentries.
Up till now, ->d_revalidate() always forced a new lookup on these. Now let
the lookup method return a zero node ID (not used for anything else) meaning a
negative entry, but with a positive cache timeout. The old way of signaling
negative entry (replying ENOENT) still works.
Userspace should check the ABI minor version to see whether sending a zero ID
is allowed by the kernel or not.
Miklos Szeredi [Fri, 6 Jan 2006 08:19:37 +0000 (00:19 -0800)]
[PATCH] fuse: add frsize to statfs reply
Add 'frsize' member to the statfs reply.
I'm not sure if sending f_fsid will ever be needed, but just in case leave
some space at the end of the structure, so less compatibility mess would be
required.
Markus Lidel [Fri, 6 Jan 2006 08:19:29 +0000 (00:19 -0800)]
[PATCH] I2O: changed I2O API to create I2O messages in kernel memory
Changed the I2O API to create I2O messages first in kernel memory and then
transfer it at once over the PCI bus instead of sending each quad-word over
the PCI bus.
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X,
ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by
S390, 64BIT and COMPAT.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When the sclp_cpi module is loaded on a system which does not support the
required SCLP call (e.g. on z/VM), ENOSUPP is returned to user space. The
correct return value is EOPNOTSUPP.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Cornelia Huck [Fri, 6 Jan 2006 08:19:25 +0000 (00:19 -0800)]
[PATCH] s390: multiple subchannel sets support
Add support for multiple subchannel sets. Works with arbitrary devices in
subchannel set 1 and is transparent to device drivers. Although currently
only two subchannel sets are available, this will work with the architectured
maximum number of subchannel sets as well.
Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Cornelia Huck [Fri, 6 Jan 2006 08:19:22 +0000 (00:19 -0800)]
[PATCH] s390: introduce for_each_subchannel
for_each_subchannel() is an iterator calling a function for every possible
subchannel id until non-zero is returned. Convert the current iterating
functions to it.
Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Cornelia Huck [Fri, 6 Jan 2006 08:19:21 +0000 (00:19 -0800)]
[PATCH] s390: introduce struct subchannel_id
This patch introduces a struct subchannel_id containing the subchannel number
(formerly referred to as "irq") and switches code formerly relying on the
subchannel number over to it.
While we're touching inline assemblies anyway, make sure they have correct
memory constraints.
Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Frank Pavlic [Fri, 6 Jan 2006 08:19:20 +0000 (00:19 -0800)]
[PATCH] s390: qdio V=V pass-through
New feature V=V qdio pass-through.
QDIO and HiperSockets processing in z/VM V=V guest environments (as well as
V=R with z/VM running in LPAR mode) requires shadowing of all QDIO
architecture queue elements. Especially the shadowing of SBALs and SLSBs
structures in the hypervisor, and the need to issue SIGA SYNC operations to
observe state changes, eventually causes significant CPU processing overhead
in the hypervisor.
The QDIO pass-through support for V=V guests avoids the shadowing of SBALs and
SLSBs. This significantly reduces the hypervisor overhead for QDIO based I/O.
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Glauber [Fri, 6 Jan 2006 08:19:17 +0000 (00:19 -0800)]
[PATCH] s390: in-kernel crypto rename
Replace all references to z990 by s390 in the in-kernel crypto files in
arch/s390/crypto. The code is not specific to a particular machine (z990) but
to the s390 platform. Big diff, does nothing..
Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Horst Hummel [Fri, 6 Jan 2006 08:19:15 +0000 (00:19 -0800)]
[PATCH] s390: dasd failfast support
To properly support multipath-failover handling, the linux block layer has
introduced a special request flag, 'REQ_FAILFAST'. This flag is now used to
return requests immediately in case the device is not operational.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Horst Hummel [Fri, 6 Jan 2006 08:19:14 +0000 (00:19 -0800)]
[PATCH] s390: BIODASDPRRD ioctl return code
The IOCTL BIODASDPRRD had no return code for 'profiling is inactive' and
therefore tunedasd wrote misleading message for request-counter = 0.
Introduce return-code EIO for inactive profiling.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Cornelia Huck [Fri, 6 Jan 2006 08:19:13 +0000 (00:19 -0800)]
[PATCH] s390: re-activated path detection
If we receive path not operational indications (pnom in pmcw nonzero), we
switch off those paths. To catch them becoming available again, we have to
recalculate the lpm from the pmcw each time we start path verification.
Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
There are some more places where the use of cputime_t instead of an integer
type and the associated macros is necessary for the virtual cputime accounting
on s390. Affected are the s390 specific appldata code and BSD process
accounting.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix the broken atomic_cmpxchg primitive. Add atomic_sub_and_test,
atomic64_sub_return, atomic64_sub_and_test, atomic64_cmpxchg,
atomic64_add_unless and atomic64_inc_not_zero. Replace old style
atomic_compare_and_swap by atomic_cmpxchg. Shorten the whole header by
defining most primitives with the two inline functions atomic_add_return and
atomic_sub_return.
In addition this patch contains the s390 related fixes of Hugh's "mm: fill
arch atomic64 gaps" patch.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:06 +0000 (00:19 -0800)]
[PATCH] uml: free network IRQ correctly
Free the network IRQ when closing down the network devices at shutdown.
Delete the device from the opened devices list on close.
These prevent an -EBADF when later disabling SIGIO on all extant descriptors
and a complaint from free_irq about freeing the IRQ twice.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:05 +0000 (00:19 -0800)]
[PATCH] uml: fix whitespace in mconsole driver
Fix up some bogus spacing in the mconsole driver. Also delete the
emacs formatting comment at the end.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:05 +0000 (00:19 -0800)]
[PATCH] uml: capture printk output for mconsole sysrq
Pass sysrq output back to the mconsole client using the mechanism
introduced for stack output.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:04 +0000 (00:19 -0800)]
[PATCH] uml: capture printk output for mconsole stack
The stack command now sends the printk output back to the mconsole client.
This is done by registering a special console for the mconsole driver. This
receives all printk output. Normally, it is ignored, but when a stack command
is issued, any printk output will be sent back to the client.
This will capture any printk output, whether it is stack output or not, since
we can't tell the difference.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:03 +0000 (00:19 -0800)]
[PATCH] uml: add mconsole_reply variant with length param
This is needed for the console output patch, since we have a possibly
non-NULL-terminated string there. So, the new interface takes a string and a
length, and the old interface calls strlen on its string and calls the new
interface with the length.
There's also a bit of whitespace cleanup.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:02 +0000 (00:19 -0800)]
[PATCH] uml: better diagnostics for broken configs
Produce a compile-time error if both MODE_SKAS and MODE_TT are disabled.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:01 +0000 (00:19 -0800)]
[PATCH] uml: SIGWINCH handling cleanup
Code cleanup - unregister_winch and winch_cleanup had some duplicate code.
This is now abstracted out into free_winch.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:19:01 +0000 (00:19 -0800)]
[PATCH] uml: umid cleanup
This patch cleans up the umid code:
- The only_if_set argument to get_umid is gone.
- get_umid returns an empty string rather than NULL if there is no umid.
- umid_is_random is gone since its users went away.
- Some printfs were turned into printks because the code runs late enough
that printk is working.
- Error paths were cleaned up.
- Some functions now return an error and let the caller print the error
message rather than printing it themselves. This eliminates the practice of
passing a pointer to printf or printk in, depending on where in the boot
process we are.
- Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
explaining why it doesn't react to errors the way you might expect.
- Calls to os_* interfaces that were moved under os are changed back to
their native libc forms.
- snprintf, strlcpy, and their bounds-checking friends are used more often,
replacing by-hand bounds checking in some places.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:59 +0000 (00:18 -0800)]
[PATCH] uml: separate libc-dependent umid code
I reworked Gennady's umid OS abstraction patch because the code shouldn't
be moved entirely to os. As it turns out, I moved most of it anyway. This
patch is the minimal one needed to move the code and have it work.
It turns out that the concept of the umid is OS-independent, but
almost everything else about the implementation is OS-dependent.
This is code movement without cleanup - a follow-on patch tidies
everything up without shuffling code around.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:58 +0000 (00:18 -0800)]
[PATCH] uml: Add throttling to console driver
This patch adds support for throttling and unthrottling input when the tty
driver can't handle it.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:58 +0000 (00:18 -0800)]
[PATCH] uml: Fix flip_buf full handling
When the tty flip_buf is full, it's a good idea to delay the input processing
for a jiffy, rather than just scheduling the tasklet immediately.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:57 +0000 (00:18 -0800)]
[PATCH] uml: Simplify console opening/closing and irq registration
This patch simplifies the opening and closing of host console devices and the
registration and deregistration of IRQs. The intent is to make it obvious
that an IRQ can't exist without an open file descriptor.
chan_enable will now open the channel, and when both opening and IRQ
registration are desired, this should be used. Opening only is done for the
initial console, so that interface still needs to exist.
The free_irqs_later interface is now gone. It was intended to avoid freeing
an IRQ while it was being processed. It did this, but it didn't eliminate the
possiblity of free_irq being called from an interrupt, which is bad. In its
place is a list of irqs to be freed, which is processed by the signal handler
just before exiting. close_one_chan now disables irqs.
When a host device disappears, it is just closed, and that disables IRQs.
The device id registered with the IRQ is now the chan structure, not the tty.
This is because the interrupt arrives on a descriptor associated with the
channel. This caused equivalent changes in the arguments to line_timer_cb.
line_disable is gone since it is not used any more.
The count field in the line structure is gone. tty->count is used instead.
The complicated logic in sigio_handler with freeing IRQs when necessary and
making sure its idea of the next irq is correct is now much simpler. The irq
list can't be rearranged underneath it, so it is now a simple list walk.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:55 +0000 (00:18 -0800)]
[PATCH] uml: move console configuration
This patch changes when console devices are configured in order to prepare the
ground for the next patch.
parse_chan_pair is now done earlier, when initcalls are run, rather than when
the device is opened.
When a host device disappears, the channel list is closed, but not freed.
This is required by the previous change. line_config now takes the options
structure as an argument, and line_open doesn't.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:54 +0000 (00:18 -0800)]
[PATCH] uml: line_setup interface change
line_setup is changed to return the device which it set up, rather than just
success or failure. This will be important in the line-config patch.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:54 +0000 (00:18 -0800)]
[PATCH] uml: Add static initializations and declarations
Some structure fields were being dynamically initialized when they could be
initialized at compile-time instead. This also makes some declarations static
(in the C sense).
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:53 +0000 (00:18 -0800)]
[PATCH] uml: Move mconsole support out of generic code
A bit of restructuring which eliminates the all_allowed argument (which is
mconsole-specific) to line_setup. That logic is moved to the mconsole
callback.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:52 +0000 (00:18 -0800)]
[PATCH] uml: Remove unneeded structure field
This removes a structure field which turned out to be pointless, and
references to it.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:51 +0000 (00:18 -0800)]
[PATCH] uml: use ARRAY_SIZE
This patch replaces instances of "sizeof(foo)/sizeof(foo[0])" with
ARRAY_SIZE(foo), which expands to the same thing.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:50 +0000 (00:18 -0800)]
[PATCH] uml: Formatting changes
This patch makes a bunch of non-functional changes -
return(foo); becomes return foo;
some statements are broken across lines for readability
some trailing whitespace is cleaned up
open_one_chan took four arguments, three of which could be
deduced from the first. Accordingly, they were eliminated.
some examples of "} else {" had a newline added
some whitespace cleanup in the indentation
lines_init got some control flow cleanup
some long lines were broken
removed another emacs-specific C formatting comment
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:49 +0000 (00:18 -0800)]
[PATCH] uml: non-void functions should return something
There are a few functions which are declared to return something, but don't.
These are actually infinite loops which are forced to be declared as non-void.
This makes them all return 0.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 6 Jan 2006 08:18:48 +0000 (00:18 -0800)]
[PATCH] uml: use kstrdup
There were a bunch of calls to uml_strdup dating from before kstrdup was
introduced. This changes those calls. It doesn't eliminate the definition
since there is still a couple of calls in userspace code (which should
probably call the libc strdup).
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hirokazu Takata [Fri, 6 Jan 2006 08:18:44 +0000 (00:18 -0800)]
[PATCH] m32r: Fix M32104 cache flushing routines
This patch fixes cache memory parameter setting for the M32104 target. So
far, its performance seemed to have been degraded due to incorrect cache
parameter setting.
* arch/m32r/boot/setup.S: Set SFR(Special Fuction Registers) region
to be non-cachable explicitly.
* arch/m32r/mm/cache.c: Fix cache flushing routines not to switch off
the M32104 cache.
Hirokazu Takata [Fri, 6 Jan 2006 08:18:42 +0000 (00:18 -0800)]
[PATCH] m32r: Update syscall macros for MMU-less targets
This patch is for updating m32r's MMU-less support.
Some legacy MMU-less m32r chips cannot return from a trap handler to the
right-hand side 16-bit halfword code of a 32-bit instrucion code pair, because
a "trap" instruction specification was expanded in M32R-II ISA.
This modification forces "trap" instructions to be placed in word alignment
location with a parallel "nop" code.
Hirokazu Takata [Fri, 6 Jan 2006 08:18:41 +0000 (00:18 -0800)]
[PATCH] m32r: Support M32104UT target platform
This patch is for supporting a new target platform, Renesas M32104UT
evaluation board.
The M32104UT is an eval board based on an uT-Engine specification. This board
has an MMU-less M32R family processor, M32104.
http://www-wa0.personal-media.co.jp/pmc/archive/te/te_m32104_e.pdf
This board is one of the most popular M32R platform, so we have ported
Linux/M32R to it.
Dave Jones [Fri, 6 Jan 2006 08:18:38 +0000 (00:18 -0800)]
[PATCH] don't freeze firewire on suspend.
We had a report from one loony user who tried out suspend to disk using a
swap partition on a firewire drive. As the firewire thread was put to
sleep it didn't work out too well.
Signed-off-by: Dave Jones <davej@redhat.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ben Collins <bcollins@debian.org> Cc: Jody McIntyre <scjody@modernduck.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This makes the swsusp_info structure become the header of the image in the
literal sense (ie. it is saved to the swap and read before any other image
data with the help of the swsusp's swap map structure, so generally it is
treated in the same way as the rest of the image).
The main thing it does is to make swsusp_header contain the offset of the swap
map used to track the image data pages rather than the offset of swsusp_info.
Simultaneously, swsusp_info becomes the first image page written to the swap.
The other changes are generally consequences of the above with a few
exceptions (there's some consolidation in the image reading part as a few
functions turn into trivial wrappers around something else).
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>
[PATCH] swsusp: improve handling of swap partitions
This changes the handling of swap partitions by swsusp to avoid locking of the
swap devices that are not used for suspend and, consequently, simplifies the
code.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] mm: add a new function (needed for swap suspend)
This adds the function get_swap_page_of_type() allowing us to specify an index
in swap_info[] and select a swap_info_struct structure to be used for
allocating a swap page.
This function (or another one of similar functionality) will be necessary for
implementing the image-writing part of swsusp in the user space. It can also
be used for simplifying the current in-kernel implementation of the
image-writing part of swsusp.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Make the suspend image size limit tunable via /sys/power/image_size.
It is necessary for systems on which there is a limited amount of swap
available for suspend. It can also be useful for optimizing performance of
swsusp on systems with 1 GB of RAM or more.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Limit the size of the suspend image to approx. 500 MB, which should
improve the overall performance of swsusp on systems with more than 1 GB of
RAM.
It introduces the constant IMAGE_SIZE that can be set to the preferred size
of the image (in MB) and modifies the memory-shrinking part of swsusp to
take this constant into account (500 is the default value of IMAGE_SIZE).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:20 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from opl3sa2 driver
This change removes the old, deprecated interface from the opl3sa2 driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:19 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from nm256 driver
This change removes the old, deprecated interface from the nm256 driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
Note that this driver has been obsoleted by an ALSA equivalent.
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:18 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from maestro driver
This change removes the old, deprecated interface from the maestro driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
The check_suspend() function and associated logic was not removed, even though
it is now unnecessary.
Note that this driver has been obsoleted by an ALSA equivalent.
Acked-by: Zach Brown <zab@zabbo.net> Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:17 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from cs46xx driver
This change removes the old, deprecated interface from the cs46xx driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
Note this driver has PCI PM hooks which are set properly. It also has the
ability to trigger suspend/resume from an ioctl. This functionality was not
touched, though it could use a serious review if this driver continues to
persist in the mainline tree..
Note that this driver has been obsoleted by an ALSA equivalent.
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:14 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from cs4281 driver
This change removes the old, deprecated interface from the cs4281 driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
Note that this driver has been obsoleted by an ALSA equivalent.
Note that this driver has hooks for PCI power management, but does not
implement the ->suspend()/->resume() methods.
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patrick Mochel [Fri, 6 Jan 2006 08:15:07 +0000 (00:15 -0800)]
[PATCH] oss: remove deprecated PM interface from ad1848 driver
This change removes the old, deprecated interface from the ad1848 driver,
including the pm_{,un}register() calls, the local storage of the pmdev object
and the reference to the old header files. This change is done to assist in
eradicating the users of the legacy interface so as to help facilitate the
removal of the interface itself.
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch fixes a problem with the function enough_free_mem() used by
swsusp to verify if there is a sufficient number of memory pages available
to it to create and save the suspend image.
Namely, enough_free_mem() uses nr_free_pages() to obtain the number of free
memory pages, which is incorrect, because this function returns the total
number of free pages, including free highmem pages, and the highmem pages
cannot be used by swsusp for storing the image data.
The patch makes enough_free_mem() avoid counting the free highmem
pages as available to swsusp.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch makes swsusp free only as much memory as needed to complete the
suspend and not as much as possible. In the most of cases this should speed
up the suspend and make the system much more responsive after resume,
especially if a GUI (eg. X Windows) is used.
If needed, the old behavior (ie to free as much memory as possible during
suspend) can be restored by unsetting FAST_FREE in power.h
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>
This patch introduces the swap map structure that can be used by swsusp for
keeping tracks of data pages written to the swap. The structure itself is
described in a comment within the patch.
The overall idea is to reduce the amount of metadata written to the swap and
to write and read the image pages sequentially, in a file-alike way. This
makes the swap-handling part of swsusp fairly independent of its
snapshot-handling part and will hopefully allow us to completely separate
these two parts in the future.
This patch is needed to remove the suspend image size limit imposed by the
limited size of the swsusp_info structure, which is essential for x86-64
systems with more than 512 MB of RAM.
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>
This patch removes the image encryption that is only used by swsusp instead of
zeroing the image after resume in order to prevent someone from reading some
confidential data from it in the future and it does not protect the image from
being read by an unauthorized person before resume. The functionality it
provides should really belong to the user space and will possibly be
reimplemented after the swap-handling functionality of swsusp is moved to the
user space.
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>