Skip to content
Snippets Groups Projects
  1. Jun 28, 2008
    • Jeff Garzik's avatar
      [netdrvr] kill sync_irq-before-freq_irq pattern · be0976be
      Jeff Garzik authored
      
      synchronize_irq() is superfluous when free_irq() call immediately follows it,
      because free_irq() also does a synchronize_irq() call of its own.
      
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      be0976be
    • Márton Németh's avatar
      8139too: some style cleanups · a9879c4f
      Márton Németh authored
      
      Clean up the following errors and warnings reported by checkpatch.pl:
       + ERROR: Macros with complex values should be enclosed in parenthesis
       + WARNING: __func__ should be used instead of gcc specific __FUNCTION__
       + WARNING: plain inline is preferred over __inline__
       + WARNING: Use #include <linux/io.h> instead of <asm/io.h>
       + WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
      
      The changes were verified with by comparing the "objdump -d 8139too.ko"
      output which is exactly the same for the old and new version in case of
      config CONFIG_8139TOO=m, CONFIG_8139TOO_PIO=n, CONFIG_8139TOO_TUNE_TWISTER=n,
      CONFIG_8139TOO_8129=n, CONFIG_8139_OLD_RX_RESET=n.
      Software versions used: gcc 4.2.3, objdump 2.18.0.20080103, on elf32-i386.
      
      Signed-off-by: default avatarMárton Németh <nm127@freemail.hu>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      a9879c4f
  2. May 12, 2008
  3. Mar 25, 2008
  4. Feb 11, 2008
  5. Oct 19, 2007
  6. Oct 10, 2007
  7. Jul 31, 2007
  8. Jul 11, 2007
    • Auke Kok's avatar
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok authored
      
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      
      Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  9. Jul 10, 2007
  10. Apr 25, 2007
  11. Feb 20, 2007
  12. Dec 12, 2006
    • Ingo Molnar's avatar
      [PATCH] net, 8139too.c: fix netpoll deadlock · b57bd066
      Ingo Molnar authored
      
      fix deadlock in the 8139too driver: poll handlers should never forcibly
      enable local interrupts, because they might be used by netpoll/printk
      from IRQ context.
      
        =================================
        [ INFO: inconsistent lock state ]
        2.6.19 #11
        ---------------------------------
        inconsistent {softirq-on-W} -> {in-softirq-W} usage.
        swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
         (&npinfo->poll_lock){-+..}, at: [<c0350a41>] net_rx_action+0x64/0x1de
        {softirq-on-W} state was registered at:
          [<c0134c86>] mark_lock+0x5b/0x39c
          [<c0135012>] mark_held_locks+0x4b/0x68
          [<c01351e9>] trace_hardirqs_on+0x115/0x139
          [<c02879e6>] rtl8139_poll+0x3d7/0x3f4
          [<c035c85d>] netpoll_poll+0x82/0x32f
          [<c035c775>] netpoll_send_skb+0xc9/0x12f
          [<c035cdcc>] netpoll_send_udp+0x253/0x25b
          [<c0288463>] write_msg+0x40/0x65
          [<c011cead>] __call_console_drivers+0x45/0x51
          [<c011cf16>] _call_console_drivers+0x5d/0x61
          [<c011d4fb>] release_console_sem+0x11f/0x1d8
          [<c011d7d7>] register_console+0x1ac/0x1b3
          [<c02883f8>] init_netconsole+0x55/0x67
          [<c010040c>] init+0x9a/0x24e
          [<c01049cf>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
        irq event stamp: 819992
        hardirqs last  enabled at (819992): [<c0350a16>] net_rx_action+0x39/0x1de
        hardirqs last disabled at (819991): [<c0350b1e>] net_rx_action+0x141/0x1de
        softirqs last  enabled at (817552): [<c01214e4>] __do_softirq+0xa3/0xa8
        softirqs last disabled at (819987): [<c0106051>] do_softirq+0x5b/0xc9
      
        other info that might help us debug this:
        no locks held by swapper/1.
      
        stack backtrace:
         [<c0104d88>] dump_trace+0x63/0x1e8
         [<c0104f26>] show_trace_log_lvl+0x19/0x2e
         [<c010532d>] show_trace+0x12/0x14
         [<c0105343>] dump_stack+0x14/0x16
         [<c0134980>] print_usage_bug+0x23c/0x246
         [<c0134d33>] mark_lock+0x108/0x39c
         [<c01356a7>] __lock_acquire+0x361/0x9ed
         [<c0136018>] lock_acquire+0x56/0x72
         [<c03aff1f>] _spin_lock+0x35/0x42
         [<c0350a41>] net_rx_action+0x64/0x1de
         [<c0121493>] __do_softirq+0x52/0xa8
         [<c0106051>] do_softirq+0x5b/0xc9
         [<c0121338>] irq_exit+0x3c/0x48
         [<c0106163>] do_IRQ+0xa4/0xbd
         [<c01047c6>] common_interrupt+0x2e/0x34
         [<c011db92>] vprintk+0x2c0/0x309
         [<c011dbf6>] printk+0x1b/0x1d
         [<c01003f2>] init+0x80/0x24e
         [<c01049cf>] kernel_thread_helper+0x7/0x10
         =======================
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b57bd066
  13. Nov 22, 2006
  14. 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
  15. Sep 13, 2006
  16. 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
  17. Aug 19, 2006
  18. Jul 05, 2006
  19. Jul 02, 2006
  20. Jun 30, 2006
  21. Jun 27, 2006
  22. May 26, 2006
  23. Mar 24, 2006
  24. Mar 20, 2006
  25. Mar 03, 2006
  26. Feb 01, 2006
  27. Jan 10, 2006
  28. Nov 10, 2005
    • Jeff Garzik's avatar
      [netdrvr 8139too] fast poll for thread, if an unlikely race occurs · 760559e1
      Jeff Garzik authored
      The rtl8139 thread is triggered only on rare 8139 hardware, the race
      itself is unlikely, and the impact of racing is low.  We don't care
      enough to create a more-complex race-free solution.
      
      Rather, if the trylock fails, we now simply poll twice a second until
      we do get the lock.
      760559e1
  29. Nov 04, 2005
  30. Oct 31, 2005
Loading