1. 15 11月, 2012 4 次提交
    • L
      ACPICA: Fix indent caused divergences. · 1f86e8c1
      Lv Zheng 提交于
      New version of "indent" program will generate different outputs that
      will lead to the divergences between the Linux and the ACPICA.
      This patch fixes such divergences caused by the "indent" program.
      The version of the "indent" used for this patch is "GNU indent 2.2.11".
      
      This patch will not affect the generated vmlinux binary.
      This will decrease 581 lines of 20120913 divergence.diff.
      Signed-off-by: NRobert Moore <robert.moore@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1f86e8c1
    • L
      ACPICA: Fix AcpiSrc caused divergences. · 644ef74e
      Lv Zheng 提交于
      There are definitions that can been converted into new styles by
      the recent AcpiSrc while they remain the old styles in the Linux.
      This patch fixes those definitions that will be converted by the
      AcpiSrc.
      
      This patch will not affect the generated vmlinux binary.
      This will decrease 97 lines of 20120913 divergence.diff.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      644ef74e
    • L
      ACPICA: Fix divergences of definition conflicts. · 78e25fef
      Lv Zheng 提交于
      There are conflicts in the "acpi_device_id*" definitions between the
      Linux and the ACPICA.  The definitions of acpi_device_id* in ACPICA
      have been changed to the "acpi_pnp_device_id*".  This patch changes
      the corresponding "acpica_device_id*" definitiions in the Linux.
      
      This patch will not affect the generated vmlinx binary.
      This will decrease 298 lines of 20120913 divergence.diff.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      78e25fef
    • L
      ACPICA: Fix unmerged debugger divergences. · f540fadf
      Lv Zheng 提交于
      Debugger improvements in ACPICA are always ignored by ACPICA Linux
      release.  This will lead to divergences between Linux and ACPICA.
      This patch fixes such unmerged debugger updates.
      
      Following patches are included:
      1. Fixed a couple compiler warnings for extra extern
         Wed, 14 Mar 2007 21:12:19 +0000
      2. Cleanup for internal Reference Object.
         Wed, 27 Aug 2008 10:11:30 -0700
      3. Debugger: Lock method args for multithread command.
         Fri, 24 Apr 2009 12:28:49 -0700
      4. Debugger: Add max count argument for Batch command.
         Tue, 29 Sep 2009 12:31:58 -0700
      5. Add new host interfaces for _OSI support.
         Thu, 5 Aug 2010 14:18:28 -0700
      6. Increase debugger buffer size for method return objects.
         Wed, 17 Nov 2010 13:48:30 -0800
      7. Debugger: Add command to display status of global handlers.
         Tue, 25 Jan 2011 13:47:58 -0800
      8. Debugger: Split large dbcmds.c file.
         Wed, 26 Jan 2011 13:03:41 -0800
      9. Debugger/AcpiExec: Add support to pass complex args to methods.
         Tue, 17 May 2011 13:33:39 -0700
      10.Debugger: Add Template command to dump resource templates.
         Fri, 28 Oct 2011 14:18:51 -0700
      11.Support for custom ACPICA build for ACPI 5.0 reduced hardware.
         Wed, 1 Feb 2012 13:18:17 -0800
      12.Debugger: Improve command help support.
         Wed, 15 Feb 2012 07:59:26 -0800
      13.Update ACPI_HW_DEPENDENT* macro invocations.
         Wed, 15 Feb 2012 08:14:08 -0800
      14.Debugger: Rename function to simplify source code conversion.
         Wed, 13 Jun 2012 14:23:06 -0700
      15.Debugger: Enhance "Tables" and "Unload" commands.
         Fri, 29 Jun 2012 13:10:58 -0700
      16.Debugger: update prototype for AcpiDbSleep function.
         Fri, 17 Aug 2012 13:43:02 -0700
      
      This patch will not affect the generated vmlinx binary.
      This will decrease 264 lines of 20120913 divergence.diff.
      Signed-off-by: NRobert Moore <robert.moore@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f540fadf
  2. 10 11月, 2012 1 次提交
    • A
      of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again · 0bce04be
      Andreas Larsson 提交于
      This bug-fix makes sure that of_address_to_resource is defined extern for sparc
      so that the sparc-specific implementation of of_address_to_resource() is once
      again used when including include/linux/of_address.h in a sparc context. A
      number of drivers in mainline relies on this function working for sparc.
      
      The bug was introduced in a850a755, "of/address:
      add empty static inlines for !CONFIG_OF". Contrary to that commit title, the
      static inlines are added for !CONFIG_OF_ADDRESS, and CONFIG_OF_ADDRESS is never
      defined for sparc. This is good behavior for the other functions in
      include/linux/of_address.h, as the extern functions defined in
      drivers/of/address.c only gets linked when OF_ADDRESS is configured. However,
      for of_address_to_resource there exists a sparc-specific implementation in
      arch/sparc/arch/sparc/kernel/of_device_common.c
      
      Solution suggested by: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndreas Larsson <andreas@gaisler.com>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bce04be
  3. 09 11月, 2012 1 次提交
    • A
      revert "epoll: support for disabling items, and a self-test app" · a80a6b85
      Andrew Morton 提交于
      Revert commit 03a7beb5 ("epoll: support for disabling items, and a
      self-test app") pending resolution of the issues identified by Michael
      Kerrisk, copied below.
      
      We'll revisit this for 3.8.
      
      : I've taken a look at this patch as it currently stands in 3.7-rc1, and
      : done a bit of testing. (By the way, the test program
      : tools/testing/selftests/epoll/test_epoll.c does not compile...)
      :
      : There are one or two places where the behavior seems a little strange,
      : so I have a question or two at the end of this mail. But other than
      : that, I want to check my understanding so that the interface can be
      : correctly documented.
      :
      : Just to go though my understanding, the problem is the following
      : scenario in a multithreaded application:
      :
      : 1. Multiple threads are performing epoll_wait() operations,
      :    and maintaining a user-space cache that contains information
      :    corresponding to each file descriptor being monitored by
      :    epoll_wait().
      :
      : 2. At some point, a thread wants to delete (EPOLL_CTL_DEL)
      :    a file descriptor from the epoll interest list, and
      :    delete the corresponding record from the user-space cache.
      :
      : 3. The problem with (2) is that some other thread may have
      :    previously done an epoll_wait() that retrieved information
      :    about the fd in question, and may be in the middle of using
      :    information in the cache that relates to that fd. Thus,
      :    there is a potential race.
      :
      : 4. The race can't solved purely in user space, because doing
      :    so would require applying a mutex across the epoll_wait()
      :    call, which would of course blow thread concurrency.
      :
      : Right?
      :
      : Your solution is the EPOLL_CTL_DISABLE operation. I want to
      : confirm my understanding about how to use this flag, since
      : the description that has accompanied the patches so far
      : has been a bit sparse
      :
      : 0. In the scenario you're concerned about, deleting a file
      :    descriptor means (safely) doing the following:
      :    (a) Deleting the file descriptor from the epoll interest list
      :        using EPOLL_CTL_DEL
      :    (b) Deleting the corresponding record in the user-space cache
      :
      : 1. It's only meaningful to use this EPOLL_CTL_DISABLE in
      :    conjunction with EPOLLONESHOT.
      :
      : 2. Using EPOLL_CTL_DISABLE without using EPOLLONESHOT in
      :    conjunction is a logical error.
      :
      : 3. The correct way to code multithreaded applications using
      :    EPOLL_CTL_DISABLE and EPOLLONESHOT is as follows:
      :
      :    a. All EPOLL_CTL_ADD and EPOLL_CTL_MOD operations should
      :       should EPOLLONESHOT.
      :
      :    b. When a thread wants to delete a file descriptor, it
      :       should do the following:
      :
      :       [1] Call epoll_ctl(EPOLL_CTL_DISABLE)
      :       [2] If the return status from epoll_ctl(EPOLL_CTL_DISABLE)
      :           was zero, then the file descriptor can be safely
      :           deleted by the thread that made this call.
      :       [3] If the epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY,
      :           then the descriptor is in use. In this case, the calling
      :           thread should set a flag in the user-space cache to
      :           indicate that the thread that is using the descriptor
      :           should perform the deletion operation.
      :
      : Is all of the above correct?
      :
      : The implementation depends on checking on whether
      : (events & ~EP_PRIVATE_BITS) == 0
      : This replies on the fact that EPOLL_CTL_AD and EPOLL_CTL_MOD always
      : set EPOLLHUP and EPOLLERR in the 'events' mask, and EPOLLONESHOT
      : causes those flags (as well as all others in ~EP_PRIVATE_BITS) to be
      : cleared.
      :
      : A corollary to the previous paragraph is that using EPOLL_CTL_DISABLE
      : is only useful in conjunction with EPOLLONESHOT. However, as things
      : stand, one can use EPOLL_CTL_DISABLE on a file descriptor that does
      : not have EPOLLONESHOT set in 'events' This results in the following
      : (slightly surprising) behavior:
      :
      : (a) The first call to epoll_ctl(EPOLL_CTL_DISABLE) returns 0
      :     (the indicator that the file descriptor can be safely deleted).
      : (b) The next call to epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY.
      :
      : This doesn't seem particularly useful, and in fact is probably an
      : indication that the user made a logic error: they should only be using
      : epoll_ctl(EPOLL_CTL_DISABLE) on a file descriptor for which
      : EPOLLONESHOT was set in 'events'. If that is correct, then would it
      : not make sense to return an error to user space for this case?
      
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: "Paton J. Lewis" <palewis@adobe.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a80a6b85
  4. 08 11月, 2012 3 次提交
  5. 07 11月, 2012 1 次提交
  6. 04 11月, 2012 1 次提交
  7. 03 11月, 2012 1 次提交
  8. 01 11月, 2012 2 次提交
    • X
      KVM: x86: fix vcpu->mmio_fragments overflow · 87da7e66
      Xiao Guangrong 提交于
      After commit b3356bf0 (KVM: emulator: optimize "rep ins" handling),
      the pieces of io data can be collected and write them to the guest memory
      or MMIO together
      
      Unfortunately, kvm splits the mmio access into 8 bytes and store them to
      vcpu->mmio_fragments. If the guest uses "rep ins" to move large data, it
      will cause vcpu->mmio_fragments overflow
      
      The bug can be exposed by isapc (-M isapc):
      
      [23154.818733] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
      [ ......]
      [23154.858083] Call Trace:
      [23154.859874]  [<ffffffffa04f0e17>] kvm_get_cr8+0x1d/0x28 [kvm]
      [23154.861677]  [<ffffffffa04fa6d4>] kvm_arch_vcpu_ioctl_run+0xcda/0xe45 [kvm]
      [23154.863604]  [<ffffffffa04f5a1a>] ? kvm_arch_vcpu_load+0x17b/0x180 [kvm]
      
      Actually, we can use one mmio_fragment to store a large mmio access then
      split it when we pass the mmio-exit-info to userspace. After that, we only
      need two entries to store mmio info for the cross-mmio pages access
      Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      87da7e66
    • K
      xen/mmu: Use Xen specific TLB flush instead of the generic one. · 95a7d768
      Konrad Rzeszutek Wilk 提交于
      As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
      hypervisor to do a TLB flush on all active vCPUs. If instead
      we were using the generic one (which ends up being xen_flush_tlb)
      we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
      before we make that hypercall the kernel will IPI all of the
      vCPUs (even those that were asleep from the hypervisor
      perspective). The end result is that we needlessly wake them
      up and do a TLB flush when we can just let the hypervisor
      do it correctly.
      
      This patch gives around 50% speed improvement when migrating
      idle guest's from one host to another.
      
      Oracle-bug: 14630170
      
      CC: stable@vger.kernel.org
      Tested-by: NJingjie Jiang <jingjie.jiang@oracle.com>
      Suggested-by: NMukesh Rathor <mukesh.rathor@oracle.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      95a7d768
  9. 30 10月, 2012 1 次提交
  10. 29 10月, 2012 2 次提交
  11. 27 10月, 2012 1 次提交
    • J
      mac80211: verify that skb data is present · 9b395bc3
      Johannes Berg 提交于
      A number of places in the mesh code don't check that
      the frame data is present and in the skb header when
      trying to access. Add those checks and the necessary
      pskb_may_pull() calls. This prevents accessing data
      that doesn't actually exist.
      
      To do this, export ieee80211_get_mesh_hdrlen() to be
      able to use it in mac80211.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9b395bc3
  12. 26 10月, 2012 1 次提交
  13. 25 10月, 2012 2 次提交
  14. 24 10月, 2012 2 次提交
  15. 23 10月, 2012 3 次提交
  16. 22 10月, 2012 1 次提交
  17. 20 10月, 2012 4 次提交
  18. 19 10月, 2012 1 次提交
  19. 18 10月, 2012 4 次提交
    • K
      of/irq: sparse fixes · d2e41518
      Kim Phillips 提交于
      drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer
      drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer
      drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer
      drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer
      drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers)
      drivers/of/irq.c:470:37:    expected int ( *[usertype] irq_init_cb )( ... )
      drivers/of/irq.c:470:37:    got void const *const data
      drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types)
      
      drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types)
      drivers/of/of_pci_irq.c:91:40:    expected unsigned int const [usertype] *intspec
      drivers/of/of_pci_irq.c:91:40:    got restricted __be32 *<noident>
      drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types)
      drivers/of/of_pci_irq.c:91:53:    expected unsigned int const [usertype] *addr
      drivers/of/of_pci_irq.c:91:53:    got restricted __be32 *<noident>
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      d2e41518
    • K
      of/address: sparse fixes · 47b1e689
      Kim Phillips 提交于
      drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:66:29:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:66:29:    got unsigned int [usertype] *addr
      drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:87:32:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:87:32:    got unsigned int [usertype] *addr
      drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types)
      drivers/of/address.c:91:30:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/of/address.c:91:30:    got restricted __be32 [usertype] <noident>
      drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types)
      drivers/of/address.c:92:22:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/of/address.c:92:22:    got restricted __be32 [usertype] <noident>
      drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:147:35:    expected restricted __be32 const [usertype] *addr
      drivers/of/address.c:147:35:    got unsigned int [usertype] *addr
      drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:157:34:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:157:34:    got unsigned int [usertype] *
      drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer
      drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer
      drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:262:34:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:262:34:    got unsigned int [usertype] *
      drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:372:41:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:372:41:    got unsigned int [usertype] *addr
      drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types)
      drivers/of/address.c:395:53:    expected restricted __be32 const [usertype] *addr
      drivers/of/address.c:395:53:    got unsigned int [usertype] *addr
      drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types)
      drivers/of/address.c:443:50:    expected restricted __be32 const [usertype] *addr
      drivers/of/address.c:443:50:    got unsigned int *<noident>
      drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types)
      drivers/of/address.c:455:49:    expected restricted __be32 const [usertype] *cell
      drivers/of/address.c:455:49:    got unsigned int *<noident>
      drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types)
      drivers/of/address.c:480:60:    expected restricted __be32 const [usertype] *addr
      drivers/of/address.c:480:60:    got unsigned int *<noident>
      drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
      drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      47b1e689
    • O
      of: add stub of_get_child_by_name for non-OF builds · 25c040c9
      Olof Johansson 提交于
      Fixes build error on s3c6400_defconfig, introduced by commit
      06455bbc, "dt/s3c64xx/spi: Use
      of_get_child_by_name to get a named child".
      
      drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata':
      drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function
          'of_get_child_by_name' [-Werror=implicit-function-declaration]
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      25c040c9
    • G
      USB: usb.h: remove dbg() macro · 2c78040c
      Greg Kroah-Hartman 提交于
      There are no users of this macro anymore in the kernel tree, so finally
      delete it.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2c78040c
  20. 17 10月, 2012 4 次提交