<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/net/tlan.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>IRQ: Maintain regs pointer globally rather than passing to IRQ handlers</title>
<updated>2006-10-05T14:10:12+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-10-05T13:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7d12e780e003f93433d49ce78cfedf4b4c52adc5'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net: Trim trailing whitespace</title>
<updated>2006-09-13T17:24:59+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2006-09-13T17:24:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6aa20a2235535605db6d6d2bd850298b2fe7f31e'/>
<id>6aa20a2235535605db6d6d2bd850298b2fe7f31e</id>
<content type='text'>
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] irq-flags: drivers/net: Use the new IRQF_ constants</title>
<updated>2006-07-02T20:58:51+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2006-07-02T02:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1fb9df5d3069064c037c81c0ab8bf783ffa5e373'/>
<id>1fb9df5d3069064c037c81c0ab8bf783ffa5e373</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] drivers/net/tlan.c: #ifdef CONFIG_PCI the PCI specific code</title>
<updated>2006-02-24T05:20:08+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2006-02-04T23:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ad9f6713ae59f319ed676c2d014a7756b62f1c51'/>
<id>ad9f6713ae59f319ed676c2d014a7756b62f1c51</id>
<content type='text'>
drivers/net/tlan.c compiles with CONFIG_PCI=n only with a warning and
due to the dead code elimination of gcc.

Additionally, this fixes the only compile error I found with
CONFIG_PCI=n and the gcc -Werror-implicit-function-declaration
flag on i386.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/net/tlan.c compiles with CONFIG_PCI=n only with a warning and
due to the dead code elimination of gcc.

Additionally, this fixes the only compile error I found with
CONFIG_PCI=n and the gcc -Werror-implicit-function-declaration
flag on i386.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s/retreiv/retriev/g</title>
<updated>2006-01-03T12:27:11+00:00</updated>
<author>
<name>Matt Mackall</name>
<email>mpm@selenic.com</email>
</author>
<published>2006-01-03T12:27:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a4efbdee278b2f4ed91aad2db5c006ff754276e'/>
<id>4a4efbdee278b2f4ed91aad2db5c006ff754276e</id>
<content type='text'>
As everyone knows, the rule is: "i before e.. um.. always."

Signed-off-by: Matt Mackall &lt;mpm@selenic.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As everyone knows, the rule is: "i before e.. um.. always."

Signed-off-by: Matt Mackall &lt;mpm@selenic.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net/: Use the DMA_{64,32}BIT_MASK constants</title>
<updated>2005-06-26T22:22:14+00:00</updated>
<author>
<name>Domen Puncer</name>
<email>domen@coderock.org</email>
</author>
<published>2005-06-26T22:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1e7f0bd8c8f2d0496ad338be5e69ff4395d77da4'/>
<id>1e7f0bd8c8f2d0496ad338be5e69ff4395d77da4</id>
<content type='text'>
Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask()

This patch includes dma-mapping.h explicitly because it caused errors
on some architectures otherwise.

See http://marc.theaimsgroup.com/?t=108001993000001&amp;r=1&amp;w=2 for details

Signed-off-by: Tobias Klauser &lt;tklauser@nuerscht.ch&gt;
Signed-off-by: Domen Puncer &lt;domen@coderock.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask()

This patch includes dma-mapping.h explicitly because it caused errors
on some architectures otherwise.

See http://marc.theaimsgroup.com/?t=108001993000001&amp;r=1&amp;w=2 for details

Signed-off-by: Tobias Klauser &lt;tklauser@nuerscht.ch&gt;
Signed-off-by: Domen Puncer &lt;domen@coderock.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Automatic merge of /spare/repo/netdev-2.6 branch iff-running</title>
<updated>2005-06-04T21:11:28+00:00</updated>
<author>
<name></name>
<email>jgarzik@pretzel.yyz.us</email>
</author>
<published>2005-06-04T21:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=140fedb5f2efd1f23b26afb2d812004556ba9515'/>
<id>140fedb5f2efd1f23b26afb2d812004556ba9515</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] fix PROMISC/bridging in TLAN driver</title>
<updated>2005-05-16T02:47:56+00:00</updated>
<author>
<name>James Harper</name>
<email>james.harper@bendigoit.com.au</email>
</author>
<published>2005-05-05T22:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=562faf469f35bf63c0b021550811280c81bdc52e'/>
<id>562faf469f35bf63c0b021550811280c81bdc52e</id>
<content type='text'>
This has been a problem for me for ages.  When using bridging, the driver
is switched into promiscuous mode before the link init is complete.  The
init complete routine then resets the promisc bit on the card so the kernel
still thinks the card is in promiscuous mode but the card isn't.  doh.

I think this bug only shows up in bridging when the bridge is started at
boot time (or something else that sets promisc at the same time the card
was started).  If promisc is enabled later it works.

Here's a trivial (and hopefully correct) patch that works for me. It
just calls the promisc/multicast setup routine after init.

Cc: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been a problem for me for ages.  When using bridging, the driver
is switched into promiscuous mode before the link init is complete.  The
init complete routine then resets the promisc bit on the card so the kernel
still thinks the card is in promiscuous mode but the card isn't.  doh.

I think this bug only shows up in bridging when the bridge is started at
boot time (or something else that sets promisc at the same time the card
was started).  If promisc is enabled later it works.

Here's a trivial (and hopefully correct) patch that works for me. It
just calls the promisc/multicast setup routine after init.

Cc: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] tlan: restore deleted module parameters.</title>
<updated>2005-05-15T22:25:23+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@osdl.org</email>
</author>
<published>2005-05-04T22:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=15efa9bb2d4da7cd9feb1c67fcf3d9e0e1bd00c6'/>
<id>15efa9bb2d4da7cd9feb1c67fcf3d9e0e1bd00c6</id>
<content type='text'>
The module parameter values got lost in the conversion to the new module_param
interface. This should fix it.

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&gt;

Index: tlan/drivers/net/tlan.c
===================================================================
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The module parameter values got lost in the conversion to the new module_param
interface. This should fix it.

Signed-off-by: Stephen Hemminger &lt;shemminger@osdl.org&gt;

Index: tlan/drivers/net/tlan.c
===================================================================
</pre>
</div>
</content>
</entry>
<entry>
<title>[netdrvrs] Use netif_carrier_* instead of IFF_RUNNING</title>
<updated>2005-05-12T23:45:25+00:00</updated>
<author>
<name></name>
<email>tgraf@suug.ch</email>
</author>
<published>2005-05-12T23:45:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7d17c1d606f6e89778f05554ddea43791d5c92a0'/>
<id>7d17c1d606f6e89778f05554ddea43791d5c92a0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
