[PATCH] possible fix for broken floppy driver, take 2
Here is an updated patch for the floppy driver which got broken in
2.5.13. "read block 0 on ->revalidate()" is now implemented through
the bio interface, following a suggestion by Christoph Hellwig.
I still cannot explain why block_dev.c's ->bd_block_size change
caused data corruption, but removing that code fixes the floppy
driver and doesn't seem to cause any problems on my test box.
Roman Zippel [Wed, 22 May 2002 07:01:46 +0000 (00:01 -0700)]
[PATCH] m68k mmu update
This patch removes the quicklist support and updates m68k to the recent
page table and tlb interface changes.
It also includes some smaller cleanups:
- turn "extern inline" into "static inline"
- convert some macros into inline functions
This means we descend into the subdirectory when building
vmlinux / modules, depending on CONFIG_XXX. When we are building
vmlinux we also need to link whatever has been built in the
subdirectory, so we add it to $(obj-y) at the appropriate place
(link order is important).
Now, the extension below allows to rewrite the second case into
obj-$(CONFIG_E100) += e100/
which looks much nicer ;-) Existing behavior is not changed, and the
only prerequisite to using the extension above is that the O_TARGET in
the subdir is named "built-in.o".
Rusty Russell [Wed, 22 May 2002 05:24:24 +0000 (22:24 -0700)]
[PATCH] arch/arm/kernel/via82c505.c
(Included in 2.4)
johnpol@2ka.mipt.ru: 1) request_region:
> Send them one at a time. Last time I had to write a script to
> mail them one at a time to myself.
Ooops, sorry... I've got a gluk...
> Thanks!
> Rusty.
> --
> Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Rusty Russell [Wed, 22 May 2002 05:24:15 +0000 (22:24 -0700)]
[PATCH] jiffies.h
Trivial patch update against 2.5.17:
Tim Schmielau <tim@physik3.uni-rostock.de>: move jiffies from sched.h to it's own jiffies.h:
Move 'jiffies' from sched.h to their own header.
Then pull the sched.h dependency from 67 files that include sched.h for
no apparent reason other than the jiffies declaration.
Move the time_[before,after}{_eq}() macros from timer.h to jiffies.h,
since there are *no* files using them that don't also use jiffies.
Many more sched.h dependencies can be killed after capable(),
request_irq(), and free_irq() are moved out of <linux/sched.h>.
Rusty Russell [Wed, 22 May 2002 05:23:59 +0000 (22:23 -0700)]
[PATCH] smp_call_function doco fix
Trivial patch update against 2.5.17:
dipankar@in.ibm.com: smp_call_function change:
My earlier patch fixed only i386. As per Dave Miller's suggestion,
I have fixed smp_call_function for other smp architectures too.
Description
-----------
Going by the documentation and use of _bh version of spin_lock(),
smp_call_function() is allowed to be called from BH context,
We can run into a deadlock with some locks if we do so.
This because reader-writer locks can sometimes be used optimally
by not disabling irqs while taking the reader side if only the
reader side of the lock is taken from irq context.
CPU #0 CPU #1
read_lock(&tasklist_lock)
write_lock_irq(&tasklist_lock)
[spins with interrupt disabled]
[Interrupted by BH]
smp_call_function() for BH
handler
[ doesn't take the IPI]
So, cpu #1 doesn't take the IPI and cpu #0 spinwaits
for the IPI handler to start, resulting in a deadlock.
The last time I looked, I couldn't see smp_call_function() being
called from BH context anywhere. So, there is no immediate problem.
However it seems right to correct the documentation and also not
disable BH while taking the call lock since it isn't necessary.
This patch does exactly that.
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
Rusty Russell [Wed, 22 May 2002 05:23:20 +0000 (22:23 -0700)]
[PATCH] sigio delivery fix
Stephen Rothwell <sfr@canb.auug.org.au>: fix for sigio delivery:
Hi Linus,
This patch means that we keep the upper 16 bits of the si_code
field of the siginfo structure that is delivered with and SIGIOs.
We need this so that the code that actually copies the siginfo_t
out to user mode knows which part of the union to copy. We currently
get away with out this information because we always copy at least
two ints worth of the union, but this s an ugly hack and I would
like to tidy it up.
Rusty Russell [Wed, 22 May 2002 05:23:11 +0000 (22:23 -0700)]
[PATCH] min/max elimination in netfilter.h
Rusty Russell <rusty@rustcorp.com.au>: Trivial patch to remove minmax macros:
Hi Harald,
The MIN & MAX etc. macros aren't used anywhere, and kernel.h
has the new min & max anyway, which should be used.
Rusty Russell [Wed, 22 May 2002 05:22:34 +0000 (22:22 -0700)]
[PATCH] Fix order of #includes in init_version.c
[UTS_MACHINE is now defined in the (generated) compile.h]
David Gibson <david@gibson.dropbear.id.au>: [TRIVIAL PATCH] Fix order of #includes in init_version.c:
Linus, please apply. compile.h must be #included before uts.h, or
uts.h will define UTS_MACHINE (incorrectly) which is then redefined in
compile.h.
Rusty Russell [Wed, 22 May 2002 05:22:24 +0000 (22:22 -0700)]
[PATCH] Remove warning in fs/nfs/nfsroot.c
David Gibson <david@gibson.dropbear.id.au>: TRIVIAL: Remove warning in fs_nfs_nfsroot.c:
Linus, please apply. The patch below removes a warning in
fs/nfs/nfsroot.c by including a header file providing a prototype for
in_aton().
Rusty Russell [Wed, 22 May 2002 05:21:59 +0000 (22:21 -0700)]
[PATCH] declance.c
"Maciej W. Rozycki" <macro@ds2.pg.gda.pl>: [patch] 2.4.19-pre7: A few declance multicast updates:
Hello,
It seems all Ethernet device drivers were bulk-converted to use the new
common CRC functions. I discovered declance used incorrect endianness to
calculate the sum for its multicast filter and had a few alignment
problems there. I fixed these bugs in the MIPS/Linux CVS tree which is at
2.4.18 now. Here is the respective update for the official kernel.
The bugs make the filter non-functional. Please apply.
Alexander Viro [Wed, 22 May 2002 05:17:00 +0000 (22:17 -0700)]
[PATCH] (3/4) BKL removal from d_move()
nfsd_acceptable() calls permission() on a a dentry that is
not guaranteed to stay around (its child is pinned down, but there
is no promises that child won't move and nothing pins dentry itself).
Fixed, cleaned up.
Currently fs.h is full of unrelated declarations and included in almost
any source file. Thus it makes sense to spilt certain aspects out that are
only used by few users.
This patch starts with the namei/path lookup interface and splits it into
<linux/namei.h> which is now directly included by the 24 files that actually
need it.
David Brownell [Wed, 22 May 2002 04:47:37 +0000 (21:47 -0700)]
[PATCH] audio, set urb->interval
This sets urb->interval in two places it hadn't previously been set,
allowing things like SOX and XMMS to play through usb audio.
Using this and the previous patches, I was able to verify playback
of some Ogg Vorbis encoded music using most of the 2.5.17 host
controller drivers. However, "uhci-hcd" and "usb-uhci-hcd" did
not want to bind the audio driver: reading the config descriptor
(in audio.c) stalled rather consistently. That failure was seen
with the other USB 1.1 drivers too, but not as consistently.
David Brownell [Wed, 22 May 2002 04:47:07 +0000 (21:47 -0700)]
[PATCH] cpia_usb, remove urb->next
This is the 2.5 version of the sample driver patch I sent around
last week. It updates one video driver to work with the updated
ISO API: no urb->next (explicit resubmit, with error detection)
and explicit transfer interval (HCs must remove 1 msec limit).
The 2.4 version is known to work, but usb video in 2.5 seems to
be a bit ill so this just fixes the compilation problem created
by the first of these patches.
David Brownell [Wed, 22 May 2002 04:46:54 +0000 (21:46 -0700)]
[PATCH] usbcore, remove urb->next
Given the discussions of last week, this removes urb->next from
the USB core API. This change simplifies the driver API by getting
rid of a superfluous feature (and related new-developer confusion),
gets rid of a hidden failure mode (drivers can now see resubmit
failures), lets us get rid of a HCD feature that isn't consistently
implemented, and so on.
This will break some code. There are ISO drivers that don't use
urb->next (like audio), but most video drivers do. My patch #2
fixes one such driver. My patch #3 fixes host controller drivers,
most of which were already converted.
Alexander Viro [Wed, 22 May 2002 04:42:50 +0000 (21:42 -0700)]
[PATCH] (1/4) removal of BKL from d_move()
OK, it turned out that since the last time I've done that audit
a couple new users of d_parent had appeared. First, more crapectomy (strictly
speaking not necessary, but just look at that code - where the hell does IBM
find them?)
Martin Dalecki [Wed, 22 May 2002 04:41:48 +0000 (21:41 -0700)]
[PATCH] 2.5.17 IDE 69
- Apply small host chip driver cosmetics by Andrej xxx Panin
and Vojtech Pavlik.
- Remove support for "disc recovery time". It could only supposedly
help with really simplistic broken devices from the past,
which didn't have moderately sophisticated controllers.
And finally Vojtech voted for it as well... so I just trust him.
- Apply icside host chip driver and other ARM related updates by Russell King,
which finally settle the "portability" work a bit, well hopefully.
Martin Dalecki [Wed, 22 May 2002 04:23:28 +0000 (21:23 -0700)]
[PATCH] 2.5.17 IDE 67
- Nuke COMMERIAL and similar spurious configuration options...
The fact that every single default configuration option contained
those bits makes this trivial patch appear rather big.
Martin Dalecki [Wed, 22 May 2002 04:22:11 +0000 (21:22 -0700)]
[PATCH] 2.5.17 IDE 66
- Move ll_10byte_cmd_build to the only place where it's used: ide-cd. The SCSI
layer does have it's own implementation which additionally it's messing
around with the hard_nr_sectors struct request value. One should *not*
provide "infrastructure" until its really used as such.
If anywhere this should reside in a file called ATAPI.
- Unfold the INIT_REQUEST macro from blk.h. This showed up plenty of duplicate
checks for QUEUE_EMPTY. Clean them as well. Remove the over cautious
major(CURRENT->rq_dev != MAJOR_NR) checks. During the last several years I
never saw any report about it. Looking at the !CURRENT->bio it is clear that
dereferencing NULL will provide the same kind of panic as the check. Some
comments around the code in question show nicely that indeed INIT_REQUEST
was a good example of code obfuscation.
- A short look at RQ_INACTIVE shows that it is only used inside the scsi.c file
and during the removal of devices. This shows that the many checks for
RQ_INACTIVE are not necessary. Looking closer even shows that some of them
did happen before checks for an empty queue. Plenty of drivers didn't care
about it and the CD-ROM ones should be handled properly, because the
most common drivers would fail as well. Comments indicate that this
was an leftover from 1.3 days...
Alexander Viro [Wed, 22 May 2002 04:13:14 +0000 (21:13 -0700)]
[PATCH] rd.c blocksize handling
Unlike other drivers, rd.c wants block size to be set once an
forever (for everybody else setting block size as high as possible and
letting filesystems change it with set_blocksize() is OK; rd.c treats
invalidate_buffers() as "kill the ramdisk contents".
David S. Miller [Tue, 21 May 2002 18:25:54 +0000 (11:25 -0700)]
Sparc64 updates
- TLB infrastructure changes
- Make flush_tlb_pgtables not need to cook up
a dummy vma
- Update for do_fork return value change
- Update defconfig
People relied on the build generation number to find out if they actually
booted the right kernel, only incrementing it on config changes isn't
enough for them. So this patch goes back to the old behavior, only done
right this time:
We now don't increment the generation number on every invocation of make,
but on every link of vmlinux. At the same time, this patch fixes the
Makefile to only relink vmlinux if any of its prequisite object files
(or the command line) changed. Incrementing the version number
happens *after* we decided to relink vmlinux.
kbuild: Regenerate include/linux/version.h only if necessary
Before overwriting version.h, check if it actually changed - otherwise
we will unnecessarily rebuild a lot of files, as e.g. module.h depends
on version.h, and many files include module.h
Robert Love [Tue, 21 May 2002 11:00:36 +0000 (04:00 -0700)]
[PATCH] remove preempt_disable from pdflush
It seems by the comments the statements were only there to prevent the
thread from finding itself as TASK_RUNNING after a kernel preemption.
Since we reverted to the original preemption behavior (which does not do
that) it should be safe. Looking over the code confirms - it seems to
not be doing anything evil and is properly locked otherwise.
Pavel Machek [Tue, 21 May 2002 10:56:30 +0000 (03:56 -0700)]
[PATCH] One more fix for swsusp
As andrew pointed out, it is bad idea to run_task_queue() when
spinlock is held. This fixes it (only could be triggered by user
pressing Magic-D). There's minor problem left where Magic-D could be
delayed/ignored under high load. I'll either fix that or kill Magic-D
support (with acpi, it is very easy to trigger swsusp by echo 4 >
/proc/acpi/sleep, so magic key is probably not neccessary any more).
Robert Love [Tue, 21 May 2002 10:21:43 +0000 (03:21 -0700)]
[PATCH] get/put_cpu methods
This implements a get_cpu() and matching put_cpu() to safely hand out
the current CPU to avoid preempt races. Andrew and I have been bitching
about the need for such a method.
I also went ahead and replaced an example of current explicit
preempt-off with the new methods, as a case in point.
Pavel Machek [Tue, 21 May 2002 10:20:42 +0000 (03:20 -0700)]
[PATCH] more suspend-to-{RAM,disk} fixes
One more build fix, this time for !CONFIG_SOFTWARE_SUSPEND but
CONFIG_ACPI:
I've choosen this solution for now, as it is safest for ACPI people.
I'll modify suspend.c so that freezing part can be included without
whole suspend-to-disk support being included.
Pavel Machek [Tue, 21 May 2002 08:57:49 +0000 (01:57 -0700)]
[PATCH] suspend-to-{RAM,disk}
Here's suspend-to-{RAM,disk} combined patch for
2.5.17. Suspend-to-disk is pretty stable and was tested in
2.4-ac. Suspend-to-RAM is little more experimental, but works for me,
and is certainly better than disk-eating version currently in kernel.
Major parts are: process stopper, S3 specific code, S4 specific
code.
[PATCH] Update to srm_env.c driver (for Alpha arch.)
Hi Linus!
Please apply this patch. It updates the srm_env.c driver (to access
Alpha's SRM environment variables) to its current version (which is
already included in up-to-date 2.4.x kernels).
Brian Gerst [Tue, 21 May 2002 08:15:50 +0000 (01:15 -0700)]
[PATCH] remaining cpu_has cleanups
This patch cleans up the remaining direct tests against x86_capability.
It moves the cpu_has_* macros to the more appropriate
cpufeature.h. It also introduces the cpu_has() macro to test features
for individual cpus.
Brian Gerst [Tue, 21 May 2002 08:15:32 +0000 (01:15 -0700)]
[PATCH] cpu_has_mmx
This patch takes the cpu_has_mmx macro introduced in the xor.h header
and puts it in the proper place. It also converts the ov511 driver to
use the new macro.
Created the first of a series of usb-storage patches
this afternoon. Please find it below or on ftp.XX.kernel.org
under people/aeb/2.5.16-us-patch .
It removes 5% of the usb-storage code, but should, if I made
no mistake, not affect the behaviour of the code.
(This is the introduction of raw_bulk.c to hold USB-bulk
and scatter-gather code that was repeated three-five times
in various drivers. The next patch is smartmedia.c.)
Chris Mason [Tue, 21 May 2002 04:43:46 +0000 (21:43 -0700)]
[PATCH] reiserfs 64 bit bug in get_virtual_node_size
This patch fixes a problem with reiserfs on 64 bit machines. Our
struct virtual_item is a different size there, and some calculations
that assume otherwise lead to this panic create_virtual_node:
vs-8030: create_virtual_node: virtual node space consumed
Now that bfs no more is included in the big unions in fs.h it makes
sense to move the contents of bfs_fs_i.h and bfs_fs_sb.h to a bfs-private
location. I've created fs/bfs/bfs.h for that, also merging in bfs_defs.h.
In addition I've changed si_imap to an unsigned long pointer as the bitops
now use that type explicitly.
Rusty Russell [Tue, 21 May 2002 04:36:42 +0000 (21:36 -0700)]
[PATCH] Futex update.
This changes futex semantics to a simple "sleep if this address
equals this value" interface, which is more convenient for building
other primitives. It also adds a timeout value.
Example library can be found at:
http://www.kernel.org/pub/linux/kernel/people/rusty/futex-2.0.tar.gz
This is the most discussion-worthy patch of the series: Change the
meaning of si_meminfo->bufferram from "all pages in pagecache
backed by block devices" to "all pages in pagecache".
In the header/manpage is is documented as "Memory used by buffers",
but as the buffercache is gone I think the new meaning fits the
intention from pre-pagecache days much better.