1. 10 6月, 2007 1 次提交
    • B
      ibmveth: Fix h_free_logical_lan error on pool resize · 4aa9c93e
      Brian King 提交于
      When attempting to activate additional rx buffer pools on an ibmveth interface that
      was not yet up, the error below was seen. The patch fixes this by only closing
      and opening the interface to activate the resize if the interface is already
      opened.
      
      (drivers/net/ibmveth.c:597 ua:30000004) ERROR: h_free_logical_lan failed with fffffffffffffffc, continuing with close
      Unable to handle kernel paging request for data at address 0x00000ff8
      Faulting instruction address: 0xd0000000002540e0
      Oops: Kernel access of bad area, sig: 11 [#1]
      SMP NR_CPUS=128 NUMA PSERIES LPAR
      Modules linked in: ip6t_REJECT xt_tcpudp ipt_REJECT xt_state iptable_mangle ipta
      ble_nat ip_nat iptable_filter ip6table_mangle ip_conntrack nfnetlink ip_tables i
      p6table_filter ip6_tables x_tables ipv6 apparmor aamatch_pcre loop dm_mod ibmvet
      h sg ibmvscsic sd_mod scsi_mod
      NIP: D0000000002540E0 LR: D0000000002540D4 CTR: 80000000001AF404
      REGS: c00000001cd27870 TRAP: 0300   Not tainted  (2.6.16.46-0.4-ppc64)
      MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 24242422  XER: 00000007
      DAR: 0000000000000FF8, DSISR: 0000000040000000
      TASK = c00000001ca7b4e0[1636] 'sh' THREAD: c00000001cd24000 CPU: 0
      GPR00: D0000000002540D4 C00000001CD27AF0 D000000000265650 C00000001C936500
      GPR04: 8000000000009032 FFFFFFFFFFFFFFFF 0000000000000007 000000000002C2EF
      GPR08: FFFFFFFFFFFFFFFF 0000000000000000 C000000000652A10 C000000000652AE0
      GPR12: 0000000000004000 C0000000004A3300 00000000100A0000 0000000000000000
      GPR16: 00000000100B8808 00000000100C0F60 0000000000000000 0000000010084878
      GPR20: 0000000000000000 00000000100C0CB0 00000000100AF498 0000000000000002
      GPR24: 00000000100BA488 C00000001C936760 D000000000258DD0 C00000001C936000
      GPR28: 0000000000000000 C00000001C936500 D000000000265180 C00000001C936000
      NIP [D0000000002540E0] .ibmveth_close+0xc8/0xf4 [ibmveth]
      LR [D0000000002540D4] .ibmveth_close+0xbc/0xf4 [ibmveth]
      Call Trace:
      [C00000001CD27AF0] [D0000000002540D4] .ibmveth_close+0xbc/0xf4 [ibmveth] (unreliable)
      [C00000001CD27B80] [D0000000002545FC] .veth_pool_store+0xd0/0x260 [ibmveth]
      [C00000001CD27C40] [C00000000012E0E8] .sysfs_write_file+0x118/0x198
      [C00000001CD27CF0] [C0000000000CDAF0] .vfs_write+0x130/0x218
      [C00000001CD27D90] [C0000000000CE52C] .sys_write+0x4c/0x8c
      [C00000001CD27E30] [C00000000000871C] syscall_exit+0x0/0x40
      Instruction dump:
      419affd8 2fa30000 419e0020 e93d0000 e89e8040 38a00255 e87e81b0 80c90018
      48001531 e8410028 e93d00e0 7fa3eb78 <e8090ff8> f81d0430 4bfffdc9 38210090
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4aa9c93e
  2. 28 4月, 2007 1 次提交
    • M
      Fix sparse errors in drivers/net/ibmveth.c · 493a684a
      Michael Ellerman 提交于
      drivers/net/ibmveth.c:96:46: error: marked inline, but without a definition
      drivers/net/ibmveth.c:96: warning: 'ibmveth_rxq_harvest_buffer' declared inline after being called
      drivers/net/ibmveth.c:96: warning: previous declaration of 'ibmveth_rxq_harvest_buffer' was here
      
      Just let the compiler decide, as it happens gcc 4.~ inlines it anyway.
      
      drivers/net/ibmveth.c:957:71: warning: Using plain integer as NULL pointer
      drivers/net/ibmveth.c:964:85: warning: Using plain integer as NULL pointer
      
      Split the long lines as well, ugly, but < 80 columns.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      493a684a
  3. 26 4月, 2007 1 次提交
  4. 13 2月, 2007 1 次提交
  5. 04 12月, 2006 1 次提交
  6. 22 10月, 2006 2 次提交
    • D
      [PATCH] ibmveth: Fix index increment calculation · 047a66d4
      David Gibson 提交于
      The recent commit 751ae21c introduced a bug
      in the producer/consumer index calculation in the ibmveth driver -
      incautious use of the post-increment ++ operator resulted in an increment
      being immediately reverted.  This patch corrects the logic.
      
      Without this patch, the driver oopses almost immediately after activation
      on at least some machines.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Acked-by: NSantiago Leon <santil@us.ibm.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      047a66d4
    • D
      [PATCH] ibmveth: Fix index increment calculation · 5826cade
      David Gibson 提交于
      On Thu, Oct 12, 2006 at 06:22:14PM +1000, David Gibson wrote:
      > Your recent ibmveth commit, 751ae21c
      > ("fix int rollover panic"), causes a rapid oops on my test machine
      > (POWER5 LPAR).
      >
      > I've bisected it down to that commit, but am still investigating the
      > cause of the crash itself.
      
      Found the problem, I believe: an object lesson in the need for great
      caution using ++.
      
      [...]
      @@ -213,6 +213,7 @@ static void ibmveth_replenish_buffer_poo
       		}
      
       		free_index = pool->consumer_index++ % pool->size;
      +		pool->consumer_index = free_index;
       		index = pool->free_map[free_index];
      
       		ibmveth_assert(index != IBM_VETH_INVALID_MAP);
      
      Since the ++ is used as post-increment, the increment is not included
      in free_index, and so the added line effectively reverts the
      increment.  The produced_index side has an analagous bug.
      
      The following change corrects this:
      
      The recent commit 751ae21c introduced
      a bug in the producer/consumer index calculation in the ibmveth driver
      - incautious use of the post-increment ++ operator resulted in an
      increment being immediately reverted.  This patch corrects the logic.
      
      Without this patch, the driver oopses almost immediately after
      activation on at least some machines.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5826cade
  7. 11 10月, 2006 1 次提交
  8. 05 10月, 2006 6 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
    • S
      [PATCH] ibmveth: fix int rollover panic · 751ae21c
      Santiago Leon 提交于
      This patch fixes a nasty bug that has been sitting there since the
      very first versions of the driver, but is generating a panic because
      we changed the number of 2K buffers for 2.6.16.
      
      The consumer_index and producer_index are u32's that get incremented
      on every buffer emptied and replenished respectively.  We use
      the {producer,consumer}_index mod'ed with the size of the pool to
      pick out an entry in the free_map.  The problem happens when the
      u32 rolls over and the number of the buffers in the pool is not a
      perfect divisor of 2^32.  i.e. if the number of 2K buffers is 0x300,
      before the consumer_index rolls over,  our index to the free map =
      0xffffffff mod 0x300 = 0xff.  The next time a buffer is emptied, we
      want the index to the free map to be 0x100, but 0x0 mod 0x300 is 0x0.
      
      This patch assigns the mod'ed result back to the consumer and producer
      indexes so that they never roll over.  The second chunk of the patch
      covers the unlikely case where the consumer_index has just been reset
      to 0x0 and the hypervisor is not able to accept that buffer.
      Signed-off-by: NSantiago Leon <santil@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      751ae21c
    • S
      [PATCH] ibmveth: rename proc entry name · 03a85d09
      Santiago Leon 提交于
      This patch changes the name of the proc file for each ibmveth adapter
      from the network device name to the slot number in the virtual bus.
      
      The proc file is created when the device is probed, so a change
      in the name of the device will not be reflected in the name of the
      proc file giving problems when identifying and removing the adapter.
      The slot number is a property that does not change through the life
      of the adapter so we use that instead.
      Signed-off-by: NSantiago Leon <santil@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      03a85d09
    • S
      [PATCH] ibmveth: kdump interrupt fix · 4347ef15
      Santiago Leon 提交于
      This patch fixes a race that panics the kernel when opening the
      device after a kdump.  Without this patch there is a window where the
      hypervisor can send an interrupt before all the structures for the
      kdump ibmveth module are ready (because the hypervisor is not aware
      that the partition crashed and that the virtual driver is reloading).
      We close this window by disabling the interrupts before registering
      the adapter to the hypervisor.
      
      This patch depends on the "ibmveth: Harden driver initilisation" patch.
      Signed-off-by: NSantiago Leon <santil@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4347ef15
    • S
      [PATCH] ibmveth: Add netpoll function · 6b422374
      Santiago Leon 提交于
      This patch adds the net poll controller function to ibmveth to support
      netconsole and netdump.
      Signed-off-by: NSantiago Leon <santil@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6b422374
    • M
      [PATCH] ibmveth: Harden driver initilisation · bbedefcc
      Michael Ellerman 提交于
      This patch has been floating around for a while now, Santi originally
      sent it in March: http://www.spinics.net/lists/netdev/msg00471.html
      
      After a kexec the ibmveth driver will fail when trying to register
      with the Hypervisor because the previous kernel has not unregistered.
      
      So if the registration fails, we unregister and then try again.
      
      We don't unconditionally unregister, because we don't want to disturb
      the regular code path for 99% of users.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Acked-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NSantiago Leon <santil@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      bbedefcc
  9. 14 9月, 2006 1 次提交
  10. 01 8月, 2006 1 次提交
    • A
      [POWERPC] clean up pseries hcall interfaces · b9377ffc
      Anton Blanchard 提交于
      Our pseries hcall interfaces are out of control:
      
      	plpar_hcall_norets
      	plpar_hcall
      	plpar_hcall_8arg_2ret
      	plpar_hcall_4out
      	plpar_hcall_7arg_7ret
      	plpar_hcall_9arg_9ret
      
      Create 3 interfaces to cover all cases:
      
      	plpar_hcall_norets:	7 arguments no returns
      	plpar_hcall:		6 arguments 4 returns
      	plpar_hcall9:		9 arguments 9 returns
      
      There are only 2 cases in the kernel that need plpar_hcall9, hopefully
      we can keep it that way.
      
      Pass in a buffer to stash return parameters so we avoid the &dummy1,
      &dummy2 madness.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      --
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9377ffc
  11. 01 7月, 2006 1 次提交
  12. 24 5月, 2006 2 次提交
    • J
      [netdrvr ibmlana, ibmveth] trim trailing whitespace · d7fbeba6
      Jeff Garzik 提交于
      d7fbeba6
    • S
      [PATCH] ibmveth change buffer pools dynamically · 860f242e
      Santiago Leon 提交于
      This patch provides a sysfs interface to change some properties of the
      ibmveth buffer pools (size of the buffers, number of buffers per pool,
      and whether a pool is active).  Ethernet drivers use ethtool to provide
      this type of functionality.  However, the buffers in the ibmveth driver
      can have an arbitrary size (not only regular, mini, and jumbo which are
      the only sizes that ethtool can change), and also ibmveth can have an
      arbitrary number of buffer pools
      
      Under heavy load we have seen dropped packets which obviously kills TCP
      performance.  We have created several fixes that mitigate this issue,
      but we definitely need a way of changing the number of buffers for an
      adapter dynamically.  Also, changing the size of the buffers allows
      users to change the MTU to something big (bigger than a jumbo frame)
      greatly improving performance on partition to partition transfers.
      
      The patch creates directories pool1...pool4 in the device directory in
      sysfs, each with files: num, size, and active (which default to the
      values in the mainline version).
      
      Comments and suggestions are welcome...
      --
      Santiago A. Leon
      Power Linux Development
      IBM Linux Technology Center
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      860f242e
  13. 22 4月, 2006 1 次提交
  14. 01 4月, 2006 1 次提交
  15. 11 11月, 2005 1 次提交
  16. 09 11月, 2005 1 次提交
    • O
      [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason · 733482e4
      Olaf Hering 提交于
      This patch removes almost all inclusions of linux/version.h.  The 3
      #defines are unused in most of the touched files.
      
      A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
      unfortunatly in linux/version.h.
      
      There are also lots of #ifdef for long obsolete kernels, this was not
      touched.  In a few places, the linux/version.h include was move to where
      the LINUX_VERSION_CODE was used.
      
      quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
      
      search pattern:
      /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      733482e4
  17. 02 11月, 2005 1 次提交
  18. 29 10月, 2005 6 次提交
  19. 27 10月, 2005 1 次提交
  20. 24 10月, 2005 2 次提交
  21. 29 9月, 2005 1 次提交
  22. 30 8月, 2005 1 次提交
  23. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4