Adrian Bunk [Sun, 11 Jul 2004 02:39:27 +0000 (19:39 -0700)]
[PATCH] kill IKCONFIG_VERSION
The patch below (already ACK'ed by Randy Dunlap) kills the unused
IKCONFIG_VERSION from kernel/configs.c .
This patch is based on a previous patch by Anton Blanchard and an idea of
Bartlomiej Zolnierkiewicz. (I hope I haven't forgotten anyone who contributed
to this patch. ;-) )
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sun, 11 Jul 2004 02:39:05 +0000 (19:39 -0700)]
[PATCH] remove outdated ext2 help text parts
The patch below solves Bugzilla #3014 by removing much outdated information
from the ext2 help text.
The help text is now very short, but few correct information is better than
outdated information - and if you think it's too short, feel free to send a
patch that adds more current information.
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
From: Ursula Braun-Krahl <braunu@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
iucv driver changes:
- Fix iucv declare/retrieve buffer which the cpu hotplug patch has broken.
- Make smp_call_function_on call func(info) in non-smp kernels.
- Use a spinlock to get smp_get_cpu/smp_put_cpu race free.
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>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
From: Ulrich Weigand <uweigand@de.ibm.com>
s390 core changes:
- Add signo between signal frame and the signal return instruction on the
user stack for backtrace over signal handlers.
- Add hfp floating point exceptions.
- Use a single function for region, segment and page translation exceptions.
- Discard SIGTRAP for single stepped instructions if the trapping instruction
is repeated (normal memory faults) or if another signal is delivered anyway.
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>
Andrea Arcangeli [Sun, 11 Jul 2004 02:38:19 +0000 (19:38 -0700)]
[PATCH] mpage_writepages() i_size reading fix
I believe reading the i_size from memory multiple times can generate fs
corruption. The "offset" and the "end_index" were not coherent. this is
writepages and it runs w/o the i_sem, so the i_size can change from under
us anytime. If a parallel write happens while writepages run, the i_size
could advance from 4095 to 4100. With the current 2.6 code that could
translate in end_index = 0 and offset = 4. That's broken because end_index
and offset could be not coherent. Either end_index=1 and offset =4, or
end_index = 0 and offset = 4095. When they lose coherency the memset can
zeroout actual data. The below patch fixes that (it's at least a
theoretical bug).
I don't really expect this tiny race to fix the bug in practice after the
more serious bugs we covered yesterday didn't fix it (more likely the
compiler will get involved into the equation soon ;).
This is also an optimization for 32bit archs that needs special locking to
read 64bit i_size coherenty.
This patch also arranges for mpage_writepages() to always zero out the file's
final page between i_size and the end of the file's final block. This is a
best-effort correctness thing to deal with errant applications which write
into the mmapped page beyond the underlying file's EOF.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrea Arcangeli [Sun, 11 Jul 2004 02:37:57 +0000 (19:37 -0700)]
[PATCH] writepage fs corruption fix
Fix a data loss bug in mpage_writepages(), triggerable under extreme memory
pressure on ext2, JFS, hfs and hfsplus:
The bug is the marking of the bh clean despite we could still run into the
"confused" path. After that the confused path really becomes confused and it
writes nothing and fs corruption triggers silenty (the reugular writepage only
writes bh that are marked dirty, it never attempts to submit_bh anything
marked clean). The mpage-writepage code must never mark the bh clean as far
as it wants to still fallback in the regular writepage which depends on the bh
to be dirty (i.e. the "goto confused" path). This could only triggers with
memory pressure (it also needs buffer_heads_over_limit == 0, and that is
frequent under mm pressure).
Thanks a lot to Chris for his fine debugging that localized the problem in the
writepage code.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
CC [M] sound/oss/ad1889.o
sound/oss/ad1889.c: In function `ad1889_ac97_init':
sound/oss/ad1889.c:854: warning: comparison is always false
due to limited range of data type
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick has tracked scheduling-while-atomic errors to shmem's fragile kmap
avoidance: the root error appears to lie deeper, but rework that fragility.
Plus I've been indicted for war crimes at the end of shmem_swp_entry: my
apologia scorned, so now hide the evidence.
Paul Mundt [Sun, 11 Jul 2004 02:37:09 +0000 (19:37 -0700)]
[PATCH] sh64: Add asm-sh64/setup.h
With the recent changes to init/main.c, we need an asm-sh64/setup.h. This
pulls out the definitions from arch/sh64/kernel/setup.c and moves them to
setup.h instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mundt [Sun, 11 Jul 2004 02:36:57 +0000 (19:36 -0700)]
[PATCH] sh64: Fix init_task.c build.
resource.h was falling a bit behind, so we use the asm-sh version instead.
This exposed another compile issue with init_task.c, which in turn needed
linux/mqueue.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sun, 11 Jul 2004 02:35:50 +0000 (19:35 -0700)]
[PATCH] crc16 kconfig touchups
drivers/net/hamradio/Kconfig:116:warning: 'select' used by config symbol 'BAYCOM_SER_FDX' refer to undefined symbol 'CRC16'
drivers/net/hamradio/Kconfig:136:warning: 'select' used by config symbol 'BAYCOM_SER_HDX' refer to undefined symbol 'CRC16'
drivers/net/hamradio/Kconfig:154:warning: 'select' used by config symbol 'BAYCOM_PAR' refer to undefined symbol 'CRC16'
drivers/net/hamradio/Kconfig:169:warning: 'select' used by config symbol 'BAYCOM_EPP' refer to undefined symbol 'CRC16'
net/irda/Kconfig:8:warning: 'select' used by config symbol 'IRDA' refer to undefined symbol 'CRC16'
drivers/net/Kconfig:1749:warning: 'select' used by config symbol 'VIA_VELOCITY' refer to undefined symbol 'CRC16'
drivers/net/Kconfig:2465:warning: 'select' used by config symbol 'PPP_ASYNC' refer to undefined symbol 'CRC16'
drivers/isdn/hisax/Kconfig:403:warning: 'select' used by config symbol 'HISAX_ST5481' refer to undefined symbol 'CRC16'
drivers/isdn/hisax/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_HISAX' refer to undefined symbol 'CRC16'
drivers/isdn/tpam/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_TPAM' refer to undefined symbol 'CRC16'
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
As pointed by Thomas Sailer, crc16.c module contains CRC16-CCITT (x^16 + x^12
+ x^5 + 1) implementation, not IBM CRC16 (x^16 + x^15 + x^2 + 1) one. Looks
like we need to rename it accordingly and this patchset does exactly this.
Andrew Morton [Sun, 11 Jul 2004 02:34:41 +0000 (19:34 -0700)]
[PATCH] slab: fix get_user inside spinlock
This little debugging __get_user is in fact happening inside a spinlock. It
was never very useful, and has caused problems for some architectures in the
past. Let's just remove it.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mika Kukkonen [Sun, 11 Jul 2004 02:34:08 +0000 (19:34 -0700)]
[PATCH] Correct return type of hashfn() in fs/dquot.c
CC fs/dquot.o
fs/dquot.c:208: warning: type qualifiers ignored on function return type
Once again with extra gcc warnings enabled. Every user of the function is
expecting unsigned value, not int in first place, and I think the const is
just misplaced.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mika Kukkonen [Sun, 11 Jul 2004 02:33:57 +0000 (19:33 -0700)]
[PATCH] Remove always false check in mm/slab.c
CC mm/slab.o
mm/slab.c: In function `kmem_cache_create':
mm/slab.c:1129: warning: comparison of unsigned expression < 0 is always false
This comes from the fact that 'align' is size_t and so unsigned. Just to be
sure, I did
$ grep __kernel_size_t include/*/posix_types.h
and yes, every arch defines that to be unsigned.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andy Whitcroft [Sun, 11 Jul 2004 02:33:34 +0000 (19:33 -0700)]
[PATCH] convert uses of ZONE_HIGHMEM to is_highmem
As the comments in mmzone.h indicate is_highmem() is designed to reduce the
proliferation of the constant ZONE_HIGHMEM. This patch updates references
to ZONE_HIGHMEM to use is_highmem(). None appear to be on critical paths.
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rusty Russell [Sun, 11 Jul 2004 02:32:49 +0000 (19:32 -0700)]
[PATCH] trivial: RCS___IGNORE quilt backup files
From: David Gibson <david@gibson.dropbear.id.au>
This patch excludes the .pc directory from the same things that
SCCS/BitKeeper/.svn/CVS files are excluded from. The .pc directory is used
for backup/reference files by quilt, a patch mangling system conceptually
derived from akpm's patch scripts. Excluding the .pc directory is handy,
because otherwise old versions of files found in there tend to end up at the
front of the TAGS index.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rusty Russell [Sun, 11 Jul 2004 02:32:15 +0000 (19:32 -0700)]
[PATCH] trivial: scripts_kernel-doc: ignoring embedded structs shouldn't be
From: <adobriyan@mail.ru>
Imagine you have a code similar to
struct foo {
union {
struct tcphdr *th;
} h;
union {
struct iphdr *iph;
} nh;
};
kernel-doc in it's current state will happily eat everything from first '{' to
last '}' and nobody will see parameter 'h' in documentation (look at
include/linux/skbuff.h:struct sk_buff for real world example).
So, fix the greedy regexp.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mika Kukkonen [Sun, 11 Jul 2004 02:32:04 +0000 (19:32 -0700)]
[PATCH] int return to unsigned in smb_proc_readdir_long() in fs/smbfs/proc.c
CC [M] fs/smbfs/proc.o
fs/smbfs/proc.c: In function `smb_proc_readdir_long':
fs/smbfs/proc.c:2313: warning: comparison of unsigned expression < 0 is always false
fs/smbfs/proc.c:2467: warning: comparison of unsigned expression < 0 is always false
The first one is pretty dangerous looking, as smb_proc_readdir_long() can
return several negative error values and all those are converted to
unsigned and then erronously pass the test on line 2313. Chris Wright gave
it a quick look and we did not see immediately if this can be remotely
exploited, but it looks pretty scary.
The second warning on line 2467 is just extra so I just removed it.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The <driver>_config function called just before clear DEV_CONFIG, and
DEV_STALE_LINK isn't set anywhere else. This is a copy & paste thing found
in all old pcmcia drivers.
The patch has been sent to the isdn list ages ago but I didn't get any
response.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sun, 11 Jul 2004 02:30:34 +0000 (19:30 -0700)]
[PATCH] Fix MCA_LEGACY dependencies
The patch below against 2.6.7-mm5 fixes more compile errors with
MCA_LEGACY=n.
Cc: Jeff Garzik <jgarzik@pobox.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Sun, 11 Jul 2004 02:30:22 +0000 (19:30 -0700)]
[PATCH] kAFS automount support
Here's a patch to allow the kAFS filesystem to use the automount facility
patch presented in a previous email.
It allows me to mount an AFS root volume on /afs and then just walk through
the directory structure causing referenced volumes to be automounted and
autoumounted.
For instance, if I do:
[root@andromeda root]# mount -t afs \#root.afs. /afs
[root@andromeda root]# ls /afs
asd cambridge cambridge.redhat.com grand.central.org
[root@andromeda root]# ls /afs/cambridge
afsdoc
[root@andromeda root]# ls /afs/cambridge/afsdoc/
ChangeLog html LICENSE pdf RELNOTES-1.2.2
David Howells [Sun, 11 Jul 2004 02:30:11 +0000 (19:30 -0700)]
[PATCH] intrinsic automount and mountpoint degradation support
Here's a patch that I worked out with Al Viro that adds support for a
filesystem (such as kAFS) to perform automounting intrinsically without the
need for a userspace daemon. It also adds support for such mountpoints to be
degraded at the filesystem's behest until they've been untouched long enough
that they'll be removed.
I've a patch (to follow) that removes some #ifdef's from fs/afs/* thus
allowing it to make use of this facility.
There are five pieces to this:
(1) Any interested filesystem needs to have at least one list to which
expirable mountpoints can be added.
Access to this list is governed by the vfsmount_lock.
(2) When a filesystem wants to create an expirable mount, it calls
do_kern_mount() to get a handle on the filesystem it wants mounting, and
then calls do_add_mount() to mount that filesystem on the designated
mountpoint, supplying the list mentioned in (1) to which the vfsmount
will be added.
In kAFS's case, the mountpoint is a directory with a follow_link() method
defined (fs/afs/mntpt.c). This uses the struct nameidata supplied as an
argument as a determination of where the new filesystem should be
mounted.
(3) When something using a vfsmount finishes dealing with it, it calls
mntput(). This unmarks the vfsmount for immediate expiry.
There are two criteria for determining if a vfsmount may be expired - it
mustn't be marked as in use for anything other than being a child of
another vfsmount, and it must have an expiry mark against it already.
(4) The filesystem then determines the policy on expiring the mounts created
in (2). When it feels the need to, it passes the list mentioned in (1) to
mark_mounts_for_expiry() to request everything on the list be expired.
This function examines each mount listed. If the vfsmount meets the
criteria mentioned in (3), then the vfsmount is deleted from the
namespace and disposed of as for unmounting; otherwise the vfsmount is
left untouched apart from now bearing an expiration mark if it didn't
before.
kAFS's expiration policy is simply to invoke this process at regular
intervals for all the mounts on its list.
(5) An expiration facility is also provided to userspace: by calling umount()
with a MNT_EXPIRE flag, it can make a request to unmount only if the
mountpoint hasn't been used since the last request and isn't in use now.
This allows expiration to be driven by userspace instead of by the
kernel if that is desirable.
This also means that do_umount() has to use a different version of
path_release() to everyone else... it can't call mntput() as that clears
the expiration flag, thus rendering this unachievable; so it's version of
path_release() calls _mntput(), which doesn't do the clear.
My original idea was to give the kernel more knowledge of automounted
things. This avoids a certain problem with stat() on a mountpoint causing it
to mount (for example, do "ls -l /afs" on a machine with kAFS), but Al wanted
it done this way.
> Why is autofs unsuitable?
Because:
(1) Autofs is flat; AFS requires a tree - mounts on mounts on mounts on
mounts...
(2) AFS holds the data as to what the mountpoints are and where they go, and
these may be cross-links to subtrees beyond your control. It's also not
trivial to extract a list of mountpoints as is required for autofs.
(3) Autofs is not namespace safe.
(4) Ducking back to userspace to get that to do the mount is pretty tricky if
namespaces are involved.
In fact, autofs may well want to make use of this facility.
Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Sun, 11 Jul 2004 02:29:37 +0000 (19:29 -0700)]
[PATCH] ppc64: update lparcfg to use seq_file
From: Will Schmidt <willschm@us.ibm.com>
This patch includes updates and cleanup for the PPC64 proc/lparcfg interface.
- use seq_file's seq_printf for output
- remove redundant e2a function. (use viopath.c's instead)
- change to Kconfig to allow building as a module.
- export required symbols from LparData.c
Pass # 2 updates..
- Per Pauls request I've removed the vpurr references, and left
just a stub function get_purr().
- this should apply clean to latest linus tree. (test-applied against
2.6.7-rc3).
Pass # 3 updates...
- Correcting my previously incorrect description of the
lparcfg_count_active_processors() function..
This is for the cases where we have some number of virtual
processors that are different than the total number of threads
in the system. (i.e. systemcfg->processorcount isnt the desired
value for partition_active_processors)
- moved e2a function into its own file in arch/ppc64/lib.
- changed lparcfg_count_active_processors() to use a while loop
instead of a for loop.
- removed redundant of_node_put in lparcfg_count_active_processors().
- removed unneeded parms from get-system-parameter rtas_call.
Signed-off-by: Will Schmidt <willschm@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Sun, 11 Jul 2004 02:29:25 +0000 (19:29 -0700)]
[PATCH] ppc64: enable EEH on PCI host bridges
On recent pSeries systems, EEH needs to be enabled even on PCI Host Bridges
(PHB's). If not enabled, then ordinary PCI probing (config-space
reads/writes to the bridges) will generate firmware error messages,
possibly a very large number of messages for systems with large numbers of
pci slots.
Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Sun, 11 Jul 2004 02:29:14 +0000 (19:29 -0700)]
[PATCH] ppc64: fix unbalanced dev_get/put calls in EEH code
This patch fixes some unbalanced usage of pci_dev_get()/pci_dev_put() calls
in the eeh code. The old code had too many calls to dev_put, which could
cause memory structs to be freed prematurely, possibly leading to bad bad
pointer derefs in certain cases.
Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Sun, 11 Jul 2004 02:29:02 +0000 (19:29 -0700)]
[PATCH] ppc64: uninline some user copy routines
gcc 3.5 is complaining about the size of copy_from_user. It turns out it
is rather large and putting it out of line saves us about 30kB on a default
kernel build.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Olaf Hering [Sun, 11 Jul 2004 02:28:39 +0000 (19:28 -0700)]
[PATCH] ppc32: serial console autodetection
We have something like this in our kernel since many months. It sets the
console device to what OF uses. ppc64 does the same, and it works ok.
serial is found on CHRP, ch-a is used on all powermacs.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Kara [Sun, 11 Jul 2004 02:28:28 +0000 (19:28 -0700)]
[PATCH] quota: inode->i_flags locking fixes
The patch fixes locking of i_flags. It removes S_QUOTA flag from i_flags
because it was almost unused and updating it on some places correctly
(under i_sem) would be tricky. Note that accessing of S_NOQUOTA flag is
serialized by dqptr_sem and so we can reliably tested without i_sem.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Thu, 8 Jul 2004 16:03:57 +0000 (17:03 +0100)]
Back out smc91x late collision "performance" hack.
Apparantly, the reason for this change is that it gives "much less
NFS stalls with a SMC91C96 on a 10/100MB switch."
Alan Cox's comments on this is:
"spec says 16 collision retries max _ever_. I bet his 'broken
switch' is a case of half v full duplex" and a recommendation to
remove it.
Also, since the change does not limit the number of times we may
retry to send the packet, I think this code opens a potential DoS
attack against network which has a machine connected running this
code.
John Lenz [Thu, 8 Jul 2004 15:35:07 +0000 (16:35 +0100)]
[ARM PATCH] 1937/1: LoCoMo common device
Patch from John Lenz
Cleanup and forward port of patch 1849.
This patch provides support for the SHARP LoCoMo device,
a companion chip similar to the sa1111 device. It is present
in many of the SHARP Zaurus line of PDAs.
Add two further attributes, "card_insert" and "card_eject". Reading
these files will fail; but writing _anything_ non-empty to these
files will execute an user insert/ejection request -- equivalent
to "cardctl insert", "cardctl eject".
To ensure proper error values to userspace, transform the return
values from CS_ error codes to -E error codes.
[PCMCIA] core socket sysfs support, export card type
Patch from Dominik Brodowski
Add a first socket-related sysfs entry; and to keep things ordered,
do so in a new file drivers/pcmcia/socket_sysfs.c. To keep things
easy, all files will be present all the time, even if no card is in
the socket at a specific moment -- however, accessing the file will
result in -ENODEV then, so that
The attribute "card_type" will return either "16-bit" or "32-bit",
depending on whether the PCCard is a 16-bit PCMCIA card or a 32-bit
CardBus card. The result "invalid" should not happen, and if it
happens, something strange is going on.
Ian Campbell [Tue, 6 Jul 2004 19:21:56 +0000 (20:21 +0100)]
[ARM PATCH] 1954/2: Make pxa platform device names more sensible
Patch from Ian Campbell
Update 1954/1 to use pxa2xx- as the platform device prefix
instead of pxa2xx_. This changes pxamci to pxa2xx-mci, pxa2xx_udc
to pxa2xx-udc and pxafb to pxa2xx-fb. pxa2xx-uart doesn't need changing.
The reference count (d_count) of the struct dentry of a new epoll-fd was
set to TWO. (new_inode() assigned ONE, than ep_getfd() incremented it by
dget()). There was only ONE reference to this dentry, so struct dentry and
struct inode were never freed.
Added a new scrolling mode (SCROLL_PAN_REDRAW) to fbcon that should greatly
benefit unaccelerated drivers such as VESA fbdev. An increase of 3-10 times
in scrolling speed can be expected.
Currently, fbcon has 4 different scrolling methods (1-4). Potentially, we can
have 6. This patch implements SCROLL_PAN_REDRAW (5). SCROLL_WRAP_REDRAW (6)
is still unimplemented.
Scroll Mode Operation YPan YWrap
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1. SCROLL_ACCEL copyarea No No
2. SCROLL_REDRAW imageblit No No
3. SCROLL_PAN copyarea Yes No
4. SCROLL_WRAP copyarea No Yes
5. SCROLL_PAN_REDRAW imageblit Yes No
6. SCROLL_WRAP_REDRAW imageblit No Yes
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Note 1: I've changed the nomenclature to increase clarity:
To demonstrate the effect of each of the scrolling methods on
an unaccelerated PCI/AGP-based driver (vesafb), I used a simple
benchmark (time cat linux/MAINTAINERS - a 50K text file). The
framebuffer is set at:
1024x768-8bpp, 8x16 font, yres_virtual = 2*yres
1. SCROLL_MOVE:
real 5m50.277s
user 0m0.001s
sys 5m50.227s
Almost 6 minutes for a 50K text file. Using soft copyarea on a
PCI-based card is just too slow (because copyarea has to
read from the framebuffer memory).
2. SCROLL_PAN_MOVE
scrollmode: SCROLL_PAN
real 0m8.592s
user 0m0.000s
sys 0m8.586s
Using ypan with copyarea dramatically improves the scrolling. However, the
scrolling action is jerky (fast during the panning stages, slows down during
the copyarea stages).
3. SCROLL_REDRAW (this is the default scrolling mode)
real 0m3.189s
user 0m0.000s
sys 0m3.170s
Simply eliminating the copyarea, even without ypanning, makes it faster than
SCROLL_PAN_MOvE. Plus, the scrolling action is smoother.
So, if we combine YPanning with imageblit (PAN_REDRAW), we get this:
4. SCROLL_PAN_REDRAW
real 0m0.520s
user 0m0.000s
sys 0m0.518s
That's almost 6x faster than SCROLL_REDRAW. Increasing the amount of video
RAM still increases the speed, but not very dramatically. Higher than 16 MB,
the increase is negligible.
Using an accelerated driver, we see almost the same effect but not as
dramatically:
1. SCROLL_MOVE - accel
real 0m3.112s
user 0m0.000s
sys 0m3.112s
2. SCROLL_REDRAW - accel
real 0m2.604s
user 0m0.000s
sys 0m2.603s
Redraw is still faster than move, but not much.
3. SCROLL_PAN_MOVE - accel
real 0m0.203s
user 0m0.000s
sys 0m0.202s
4. SCROLL_PAN_REDRAW - accel
real 0m0.326s
user 0m0.002s
sys 0m0.323s
This is one exception. If panning is enabled, move is actually faster than
redraw. As to why, I don't know.
So based on the above, fbcon will choose the scrolling method based on the
following preference:
Note 2: Exception: accel copyarea > accel imageblit if Pan/Wrap is enabled.
Note 3: soft copyarea will be avoided by fbcon as much as possible unless
there is a specific override, ie., FBINFO_READS_FAST flag is set. If this
flag is set, fbcon will prefer copyarea over imageblit, accel or soft.
As a final note, in order for fbcon to use the best scrolling method, the
low-level drivers must provide the correct hinting by setting the
FBINFO_HWACCEL_* flags.
To vesafb users: boot vesafb like this for fastest scrolling action:
yesterday I finally found why 2.6.x has problems with taking
over vgacon. Problem is that take_over_console does:
if (IS_VISIBLE)
save_screen(i);
...
visual_init(i, 0);
...
so code nicely saves screen contents, and calls visual_init,
which calls fbcon's init, which in turn can issue vc_resize. And this
vc_resize will trigger read from vc->vc_origin. But vc_origin still
points to videomemory, not to the buffer where save_screen() copied
its data.
End quote
So updating vc->vc_origin to point to screenbuf after the previous console
deinitializes allows fbcon to correctly update the screen from the screen
buffer. This change makes the clearing of vram (using fillrect) unnecessary.
2. If FBINFO_MISC_MODESWITCH flag is set in info, do the set_par() in
fbcon_switch() instead of piggy-backing the set_par() on fbcon_resize(). This
preserves the current var, skipping the unnecessary fb_find_mode() step.
Ugly workaround. When switching from KD_GRAPHICS to KD_TEXT, the event is
captured at fbcon_blank() allowing fbcon to reinitialize the hardware.
However, some hardware requires the reinitialization to be done
immediately, others require it to be done later. Others may need it to be
done immediately and later, this is the worst case.
This patch introduces a notifier chain for cpu idle. There are two events
CPU_IDLE and CPU_NOT_IDLE that are called just before the cpu goes to sleep
and right after the cpu woke up again. The notifier is used to simplify the
no-hz-timer-in-idle feature and the virtual cpu timers. In addition the
virtual cpu timer functions have been moved to arch/s390/kernel/vtime.c, which
gives a nice separation between the timer functions related to real time and
the timer functions related to virtual cpu time.
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>
ctc driver changes:
- Make use of the debug feature to ease debugging.
- ctctty: use dev_alloc_name to allocate a network device name.
- ctctty: avoid deadlock of ctc_tty_close vs ctc_tty_flush_buffer.
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>