<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/floppy.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block/floppy.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block/floppy.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-10-05T14:10:12Z</updated>
<entry>
<title>IRQ: Maintain regs pointer globally rather than passing to IRQ handlers</title>
<updated>2006-10-05T14:10:12Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-10-05T13:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d12e780e003f93433d49ce78cfedf4b4c52adc5'/>
<id>urn:sha1:7d12e780e003f93433d49ce78cfedf4b4c52adc5</id>
<content type='text'>
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
</content>
</entry>
<entry>
<title>[PATCH] Split struct request -&gt;flags into two parts</title>
<updated>2006-09-30T18:23:37Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-08-10T06:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4aff5e2333c9a1609662f2091f55c3f6fffdad36'/>
<id>urn:sha1:4aff5e2333c9a1609662f2091f55c3f6fffdad36</id>
<content type='text'>
Right now -&gt;flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
-&gt;cmd_type and -&gt;cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] exit early in floppy_init when no floppy exists</title>
<updated>2006-09-01T18:39:08Z</updated>
<author>
<name>Olaf Hering</name>
<email>olaf@aepfle.de</email>
</author>
<published>2006-09-01T04:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef16b5194f3233a11851180cd82eafb76542047d'/>
<id>urn:sha1:ef16b5194f3233a11851180cd82eafb76542047d</id>
<content type='text'>
modprobe -v floppy on a Apple G5 writes incorrect stuff to dmesg:

Floppy drive(s): fd0 is 2.88M

The reason is that the legacy io check happens very late,
when part of the floppy stuff is already initialized.
check_legacy_ioport() returns either -ENODEV right away, or it walks
the device-tree looking for a floppy node.

Signed-off-by: Olaf Hering &lt;olaf@aepfle.de&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: floppy.c irq release fix</title>
<updated>2006-07-03T22:27:00Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-07-03T07:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e541a4ae534a7e59ad464af9abea382b3035724'/>
<id>urn:sha1:3e541a4ae534a7e59ad464af9abea382b3035724</id>
<content type='text'>
The lock validator triggered a number of bugs in the floppy driver, all
related to the floppy driver allocating and freeing irq and dma resources from
interrupt context.  The initial solution was to use schedule_work() to push
this into process context, but this caused further problems: for example the
current floppy driver in -mm2 is totally broken and all floppy commands time
out with an error.  (as reported by Barry K.  Nathan)

This patch tries another solution: simply get rid of all that dynamic IRQ and
DMA allocation/freeing.  I doubt it made much sense back in the heydays of
floppies (if two devices raced for DMA or IRQ resources then we didnt handle
those cases too gracefully anyway), and today it makes near zero sense.

So the new code does the simplest and most straightforward thing: allocate IRQ
and DMA resources at module init time, and free them at module removal time.
Dont try to release while the driver is operational.  This, besides making the
floppy driver functional again has an added bonus, floppy IRQ stats are
finally persistent and visible in /proc/interrupts:

  6: 63 XT-PIC-level floppy

Besides normal floppy IO i have also tested IO error handling, motor-off
timeouts, etc.  - and everything seems to be working fine.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree</title>
<updated>2006-06-26T19:25:08Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff23eca3e8f613034e0d20ff86f6a89b62f5a14e'/>
<id>urn:sha1:ff23eca3e8f613034e0d20ff86f6a89b62f5a14e</id>
<content type='text'>
Also fixes up all files that #include it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] devfs: Remove devfs_remove() function from the kernel tree</title>
<updated>2006-06-26T19:25:07Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8ab5e4c15b53e147c08031a959d9f776823dbe73'/>
<id>urn:sha1:8ab5e4c15b53e147c08031a959d9f776823dbe73</id>
<content type='text'>
Removes the devfs_remove() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree</title>
<updated>2006-06-26T19:25:06Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1a715c5cf917326a285533d1116d725f5f2593c2'/>
<id>urn:sha1:1a715c5cf917326a285533d1116d725f5f2593c2</id>
<content type='text'>
Removes the devfs_mk_bdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree</title>
<updated>2006-06-26T19:25:06Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95dc112a5770dc670a1b45a3d9ee346fdd2b2697'/>
<id>urn:sha1:95dc112a5770dc670a1b45a3d9ee346fdd2b2697</id>
<content type='text'>
Removes the devfs_mk_dir() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] powerpc: Use check_legacy_ioport() on ppc32 too.</title>
<updated>2006-04-28T11:04:55Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2006-04-24T22:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1269277a5e7c6d7ae1852e648a8bcdb78035e9fa'/>
<id>urn:sha1:1269277a5e7c6d7ae1852e648a8bcdb78035e9fa</id>
<content type='text'>
Some people report that we die on some Macs when we are expecting to
catch machine checks after poking at some random I/O address. I'd seen
it happen on my dual G4 with serial ports until we fixed those to use
OF, but now other users are reporting it with i8042.

This expands the use of check_legacy_ioport() to avoid that situation
even on 32-bit kernels.

Signed-off-by: David Woodhouse &lt;dwmw2@infradead.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] drivers/block/*: use time_after() and friends</title>
<updated>2006-03-28T17:16:06Z</updated>
<author>
<name>Marcelo Feitoza Parisi</name>
<email>marcelo@feitoza.com.br</email>
</author>
<published>2006-03-28T09:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50297cbf07427b47f0fff5ade8e21cdabf860249'/>
<id>urn:sha1:50297cbf07427b47f0fff5ade8e21cdabf860249</id>
<content type='text'>
They deal with wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi &lt;marcelo@feitoza.com.br&gt;
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
