Skip to content
Snippets Groups Projects
  1. Nov 10, 2008
  2. Nov 03, 2008
  3. Oct 27, 2008
  4. Oct 16, 2008
  5. Aug 07, 2008
  6. Jul 21, 2008
  7. Jun 26, 2008
    • Ingo Molnar's avatar
      [netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable · c5643cab
      Ingo Molnar authored
      
      Original Author: Michael Buesch <mb@bu3sch.de>
      
      net, vortex: fix lockup
      
      Ingo Molnar reported:
      
      -tip testing found that Johannes Berg's "softirq: remove irqs_disabled
      warning from local_bh_enable" enhancement to lockdep triggers a new
      warning on an old testbox that uses 3c59x vortex and netlogging:
      
      ----->
          calling  vortex_init+0x0/0xb0
          PCI: Found IRQ 10 for device 0000:00:0b.0
          PCI: Sharing IRQ 10 with 0000:00:0a.0
          PCI: Sharing IRQ 10 with 0000:00:0b.1
          3c59x: Donald Becker and others.
          0000:00:0b.0: 3Com PCI 3c556 Laptop Tornado at e0800400.
          PCI: Enabling bus mastering for device 0000:00:0b.0
          initcall vortex_init+0x0/0xb0 returned 0 after 47 msecs
      ...
          calling  init_netconsole+0x0/0x1b0
          netconsole: local port 4444
          netconsole: local IP 10.0.1.9
          netconsole: interface eth0
          netconsole: remote port 4444
          netconsole: remote IP 10.0.1.16
          netconsole: remote ethernet address 00:19:xx:xx:xx:xx
          netconsole: device eth0 not up yet, forcing it
          eth0:  setting half-duplex.
          eth0:  setting full-duplex.
      ------------[ cut here ]------------
          WARNING: at kernel/softirq.c:137 local_bh_enable_ip+0xd1/0xe0()
          Pid: 1, comm: swapper Not tainted 2.6.26-rc6-tip #2091
           [<c0125ecf>] warn_on_slowpath+0x4f/0x70
           [<c0126834>] ? release_console_sem+0x1b4/0x1d0
           [<c0126d00>] ? vprintk+0x2a0/0x450
           [<c012fde5>] ? __mod_timer+0xa5/0xc0
           [<c046f7fd>] ? mdio_sync+0x3d/0x50
           [<c0160ef6>] ? marker_probe_cb+0x46/0xa0
           [<c0126ed7>] ? printk+0x27/0x50
           [<c046f4c3>] ? vortex_set_duplex+0x43/0xc0
           [<c046f521>] ? vortex_set_duplex+0xa1/0xc0
           [<c0471b92>] ? vortex_timer+0xe2/0x3e0
           [<c012b361>] local_bh_enable_ip+0xd1/0xe0
           [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
           [<c0471b92>] vortex_timer+0xe2/0x3e0
           [<c014743b>] ? trace_hardirqs_on+0xb/0x10
           [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
           [<c012f8b2>] run_timer_softirq+0x162/0x1c0
           [<c0471ab0>] ? vortex_timer+0x0/0x3e0
           [<c012b361>] local_bh_enable_ip+0xd1/0xe0
           [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
           [<c0471b92>] vortex_timer+0xe2/0x3e0
           [<c014743b>] ? trace_hardirqs_on+0xb/0x10
           [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
           [<c012f8b2>] run_timer_softirq+0x162/0x1c0
           [<c0471ab0>] ? vortex_timer+0x0/0x3e0
           [<c0471ab0>] ? vortex_timer+0x0/0x3e0
           [<c012b60a>] __do_softirq+0x9a/0x160
           [<c012b570>] ? __do_softirq+0x0/0x160
           [<c0106775>] call_on_stack+0x15/0x30
           [<c012b4f5>] ? irq_exit+0x55/0x60
           [<c0106e85>] ? do_IRQ+0x85/0xd0
           [<c0147391>] ? trace_hardirqs_on_caller+0xc1/0x160
           [<c0104888>] ? common_interrupt+0x28/0x30
           [<c08d8ac8>] ? mutex_unlock+0x8/0x10
           [<c08d8180>] ? _cond_resched+0x10/0x30
           [<c07a3be7>] ? netpoll_setup+0x117/0x390
           [<c0cbfcfe>] ? init_netconsole+0x14e/0x1b0
           [<c013d539>] ? ktime_get+0x19/0x40
           [<c0c9bab2>] ? kernel_init+0x1b2/0x2c0
           [<c0cbfbb0>] ? init_netconsole+0x0/0x1b0
           [<c0396aa4>] ? trace_hardirqs_on_thunk+0xc/0x10
           [<c0103f12>] ? restore_nocheck_notrace+0x0/0xe
           [<c0c9b900>] ? kernel_init+0x0/0x2c0
           [<c0c9b900>] ? kernel_init+0x0/0x2c0
           [<c0104aa7>] ? kernel_thread_helper+0x7/0x10
           =======================
      ---[ end trace 37f9c502aff112e0 ]---
          console [netcon0] enabled
          netconsole: network logging started
          initcall init_netconsole+0x0/0x1b0 returned 0 after 2914 msecs
      
      looking at the driver I think the bug is real and the fix actually
      is trivial.
      
      vp->lock is also taken in hardware IRQ context, so we _have_ to always
      use irqsafe locking. As we run in a timer with IRQs disabled,
      we can simply use spin_lock.
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      c5643cab
  8. May 06, 2008
  9. Oct 17, 2007
  10. Oct 16, 2007
  11. Oct 10, 2007
  12. Aug 13, 2007
  13. Jul 31, 2007
  14. Jul 10, 2007
  15. May 09, 2007
  16. Apr 25, 2007
  17. Mar 09, 2007
    • Ralf Baechle's avatar
      3c59x: Fix several modpost warnings · 95c408a9
      Ralf Baechle authored
      
      WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4580) and 'vortex_eisa_remove'
      WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4584) and 'vortex_eisa_remove'
      WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4588) and 'vortex_eisa_remove'
      WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x458c) and 'vortex_eisa_remove'
      
      Fixed by:
      
       o move definition of vortex_eisa_driver below the functions it references.
       o remove now unnecessary prototypes for vortex_eisa_probe and
         vortex_eisa_remove.
       o Make vortex_eisa_probe an __init function.
       o Make vortex_eisa_remove a __devexit function.
       o Wrap vortex_eisa_driver reference to vortex_eisa_remove with
         __devexit_p().
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      
       drivers/net/3c59x.c |   28 +++++++++++++---------------
       1 file changed, 13 insertions(+), 15 deletions(-)
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      95c408a9
  18. Mar 06, 2007
  19. Feb 06, 2007
  20. Oct 05, 2006
    • David Howells's avatar
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells authored
      
      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: default avatarDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  21. Sep 27, 2006
    • Michael Tokarev's avatar
      [PATCH] EISA bus MODALIAS attributes support · 07563c71
      Michael Tokarev authored
      
      Add modalias attribute support for the almost forgotten now EISA bus and
      (at least some) EISA-aware modules.
      
      The modalias entry looks like (for an 3c509 NIC):
      
       eisa:sTCM5093
      
      and the in-module alias like:
      
       eisa:sTCM5093*
      
      The patch moves struct eisa_device_id declaration from include/linux/eisa.h
      to include/linux/mod_devicetable.h (so that the former now #includes the
      latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
      drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
      declared), and adds recognision of __mod_eisa_device_table to
      scripts/mod/file2alias.c so that proper modules.alias will be generated.
      
      There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
      by any existing tools, and because with in-kernel modalias mechanism those
      maps are obsolete anyway.
      
      The rationale for this patch is:
      
       a) to make EISA bus to act as other busses with modalias
          support, to unify driver loading
      
       b) to foget about EISA finally - with this patch, kernel
          (who still supports EISA) will be the only one who knows
          how to choose the necessary drivers for this bus ;)
      
      [akpm@osdl.org: fix the kbuild bit]
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Acked-the-net-bits-by: default avatarJeff Garzik <jeff@garzik.org>
      Acked-the-tulip-bit-by: default avatarValerie Henson <val_henson@linux.intel.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      07563c71
  22. Sep 22, 2006
  23. Sep 13, 2006
  24. Sep 12, 2006
    • Andy Gospodarek's avatar
      [PATCH] Remove more unnecessary driver printk's · d5b20697
      Andy Gospodarek authored
      
      As I promised last week, here is the first pass at removing all
      unnecessary printk's that exist in network device drivers currently in
      promiscuous mode.  The duplicate messages are not needed so they have
      been removed.  Some of these drivers are quite old and might not need an
      update, but I did them all anyway.
      
      I am currently auditing the remaining conditional printk's and will send
      out a patch for those soon.
      
      Signed-off-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      d5b20697
  25. Aug 19, 2006
  26. Jul 05, 2006
  27. Jul 03, 2006
  28. Jul 02, 2006
  29. Jun 30, 2006
  30. Jun 27, 2006
  31. Jun 26, 2006
    • Jeff Garzik's avatar
      [netdrvr] Remove long-unused bits from Becker template drivers · 1f1bd5fc
      Jeff Garzik authored
      
      Symbols such as PCI_USES_IO, PCI_ADDR0, etc. originated from Donald
      Becker's net driver template, but have been long unused.  Remove.
      
      In a few drivers, this allows the further eliminate of the pci_flags (or
      just plain flags) member in the template driver probe structure.
      
      Most of this logic is simply open-coded in most drivers, since it never
      changes.
      
      Made a few other cleanups while I was in there, too:
      * constify, __devinitdata several PCI ID tables
      * replace table terminating entries such as "{0,}," and "{NULL},"
        with a more-clean "{ }".
      
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1f1bd5fc
  32. Jun 20, 2006
    • David S. Miller's avatar
      [SPARC]: Kill __irq_itoa(). · c6387a48
      David S. Miller authored
      
      This ugly hack was long overdue to die.
      
      It was a way to print out Sparc interrupts in a more freindly format,
      since IRQ numbers were arbitrary opaque 32-bit integers which vectored
      into PIL levels.  These 32-bit integers were not necessarily in the
      0-->NR_IRQS range, but the PILs they vectored to were.
      
      The idea now is that we will increase NR_IRQS a little bit and use a
      virtual<-->real IRQ number mapping scheme similar to PowerPC.
      
      That makes this IRQ printing hack irrelevant, and furthermore only a
      handful of drivers actually used __irq_itoa() making it even less
      useful.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6387a48
  33. Mar 31, 2006
Loading