1. 14 2月, 2013 4 次提交
    • A
      rbd: implement sync object read with new code · 788e2df3
      Alex Elder 提交于
      Reimplement the synchronous read operation used for reading a
      version 1 header using the new request tracking code.  Name the
      resulting function rbd_obj_read_sync() to better reflect that
      it's a full object operation, not an object request.  To do this,
      implement a new OBJ_REQUEST_PAGES object request type.
      
      This implements a new mechanism to allow the caller to wait for
      completion for an rbd_obj_request by calling rbd_obj_request_wait().
      
      This partially resolves:
          http://tracker.newdream.net/issues/3755Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      788e2df3
    • A
      rbd: kill rbd_req_coll and rbd_request · 7d250b94
      Alex Elder 提交于
      The two remaining callers of rbd_do_request() always pass a null
      collection pointer, so the "coll" and "coll_index" parameters are
      not needed.  There is no other use of that data structure, so it
      can be eliminated.
      
      Deleting them means there is no need to allocate a rbd_request
      structure for the callback function.  And since that's the only use
      of *that* structure, it too can be eliminated.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      7d250b94
    • A
      rbd: kill rbd_rq_fn() and all other related code · 2250a71b
      Alex Elder 提交于
      Now that the request function has been replaced by one using the new
      request management data structures the old one can go away.
      Deleting it makes rbd_dev_do_request() no longer needed, and
      deleting that makes other functions unneeded, and so on.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      2250a71b
    • A
      rbd: new request tracking code · bf0d5f50
      Alex Elder 提交于
      This patch fully implements the new request tracking code for rbd
      I/O requests.
      
      Each I/O request to an rbd image will get an rbd_image_request
      structure allocated to track it.  This provides access to all
      information about the original request, as well as access to the
      set of one or more object requests that are initiated as a result
      of the image request.
      
      An rbd_obj_request structure defines a request sent to a single osd
      object (possibly) as part of an rbd image request.  An rbd object
      request refers to a ceph_osd_request structure built up to represent
      the request; for now it will contain a single osd operation.  It
      also provides space to hold the result status and the version of the
      object when the osd request completes.
      
      An rbd_obj_request structure can also stand on its own.  This will
      be used for reading the version 1 header object, for issuing
      acknowledgements to event notifications, and for making object
      method calls.
      
      All rbd object requests now complete asynchronously with respect
      to the osd client--they supply a common callback routine.
      
      This resolves:
          http://tracker.newdream.net/issues/3741Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      bf0d5f50
  2. 26 1月, 2013 3 次提交
  3. 24 1月, 2013 2 次提交
    • P
      mfd: vexpress-sysreg: Don't skip initialization on probe · 52666298
      Pawel Moll 提交于
      The vexpress-sysreg driver does not have to be initialized
      early, when the platform doesn't require this. Unfortunately
      in such case it wasn't initialized correctly - master site
      lookup and config bridge registration were missing. Fixed now.
      Signed-off-by: NPawel Moll <pawel.moll@arm.com>
      52666298
    • A
      USB: EHCI: fix build error in ehci-mxc · dba63b2f
      Alan Stern 提交于
      This patch (as1643b) fixes a build error in ehci-hcd when compiling for
      ARM with allmodconfig:
      
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not used [-Wunused-variable]
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      
      The fix is to convert ehci-mxc over to the new "ehci-hcd is a library"
      scheme so that it can coexist peacefully with the ehci-platform
      driver.  As part of the conversion the ehci_mxc_priv data structure,
      which was allocated dynamically, is now placed where it belongs: in
      the private area at the end of struct ehci_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dba63b2f
  4. 23 1月, 2013 8 次提交
  5. 22 1月, 2013 12 次提交
  6. 21 1月, 2013 3 次提交
    • M
      i2c: mxs: Fix misuse init_completion · 85de7fac
      Marek Vasut 提交于
      The init_completion() call does reinit not only the variable carrying
      the flag that the completion finished, but also initialized the
      waitqueue associated with the completion. On the contrary, the
      INIT_COMPLETION() call only reinits the flag.
      
      In case there was anything still stuck in the waitqueue, subsequent call
      to init_completion() would be able to create possible race condition. This
      patch uses the proper function and moves init_completion() into .probe() call
      of the driver, to be issued only once.
      
      Note that such scenario is impossible, since two threads can never enter the
      mxs_i2c_xfer_msg(), since whole this section is protected by mutex in I2C core.
      This by no means allows this issue to exit though.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      85de7fac
    • D
      ttm: on move memory failure don't leave a node dangling · 014b3440
      Dave Airlie 提交于
      if we have a move notify callback, when moving fails, we call move notify
      the opposite way around, however this ends up with *mem containing the mm_node
      from the bo, which means we double free it. This is a follow on to the previous
      fix.
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      014b3440
    • D
      ttm: don't destroy old mm_node on memcpy failure · 63054186
      Dave Airlie 提交于
      When we are using memcpy to move objects around, and we fail to memcpy
      due to lack of memory to populate or failure to finish the copy, we don't
      want to destroy the mm_node that has been copied into old_copy.
      
      While working on a new kms driver that uses memcpy, if I overallocated bo's
      up to the memory limits, and eviction failed, then machine would oops soon
      after due to having an active bo with an already freed drm_mm embedded in it,
      freeing it a second time didn't end well.
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      63054186
  7. 19 1月, 2013 2 次提交
  8. 18 1月, 2013 6 次提交
    • B
      powernow-k8: Add a kconfig dependency on acpi-cpufreq · 631e8ac1
      Borislav Petkov 提交于
      Andreas reports in https://bugzilla.kernel.org/show_bug.cgi?id=51741
      that with his Gentoo config, acpi-cpufreq wasn't enabled and
      powernow-k8 couldn't handoff properly to acpi-cpufreq leading to
      running without P-state support (i.e., cores are constantly in P0).
      
      To alleaviate that, we need to make powernow-k8 depend on acpi-cpufreq
      so that acpi-cpufreq is always present.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=51741Reported-by: NAndreas <linuxuser330250@gmx.net>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: 3.7+ <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      631e8ac1
    • K
      ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled · b88a634a
      Konrad Rzeszutek Wilk 提交于
      If cpuidle is disabled, that means that:
      
      	per_cpu(acpi_cpuidle_device, pr->id)
      
      is set to NULL as the acpi_processor_power_init ends up failing at
      
      	 retval = cpuidle_register_driver(&acpi_idle_driver)
      
      (in acpi_processor_power_init) and never sets the per_cpu idle
      device.  So when acpi_processor_hotplug on CPU online notification
      tries to reference said device it crashes:
      
      cpu 3 spinlock event irq 62
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
      IP: [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
      PGD a259b067 PUD ab38b067 PMD 0
      Oops: 0002 [#1] SMP
      odules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c nouveau mxm_wmi wmi radeon ttm sg sr_mod sd_mod cdrom ata_generic ata_piix libata crc32c_intel scsi_mod atl1c i915 fbcon tileblit font bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
      CPU 1
      Pid: 3047, comm: bash Not tainted 3.8.0-rc3upstream-00250-g165c029 #1 MSI MS-7680/H61M-P23 (MS-7680)
      RIP: e030:[<ffffffff81381013>]  [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
      RSP: e02b:ffff88001742dca8  EFLAGS: 00010202
      RAX: 0000000000010be9 RBX: ffff8800a0a61800 RCX: ffff880105380000
      RDX: 0000000000000003 RSI: 0000000000000200 RDI: ffff8800a0a61800
      RBP: ffff88001742dce8 R08: ffffffff81812360 R09: 0000000000000200
      R10: aaaaaaaaaaaaaaaa R11: 0000000000000001 R12: ffff8800a0a61800
      R13: 00000000ffffff01 R14: 0000000000000000 R15: ffffffff81a907a0
      FS:  00007fd6942f7700(0000) GS:ffff880105280000(0000) knlGS:0000000000000000
      CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000004 CR3: 00000000a6773000 CR4: 0000000000042660
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process bash (pid: 3047, threadinfo ffff88001742c000, task ffff880017944000)
      Stack:
       0000000000000150 ffff880100f59e00 ffff88001742dcd8 ffff8800a0a61800
       0000000000000000 00000000ffffff01 0000000000000000 ffffffff81a907a0
       ffff88001742dd18 ffffffff813815b1 ffff88001742dd08 ffffffff810ae336
      Call Trace:
       [<ffffffff813815b1>] acpi_processor_hotplug+0x7c/0x9f
       [<ffffffff810ae336>] ? schedule_delayed_work_on+0x16/0x20
       [<ffffffff8137ee8f>] acpi_cpu_soft_notify+0x90/0xca
       [<ffffffff8166023d>] notifier_call_chain+0x4d/0x70
       [<ffffffff810bc369>] __raw_notifier_call_chain+0x9/0x10
       [<ffffffff81094a4b>] __cpu_notify+0x1b/0x30
       [<ffffffff81652cf7>] _cpu_up+0x103/0x14b
       [<ffffffff81652e18>] cpu_up+0xd9/0xec
       [<ffffffff8164a254>] store_online+0x94/0xd0
       [<ffffffff814122fb>] dev_attr_store+0x1b/0x20
       [<ffffffff81216404>] sysfs_write_file+0xf4/0x170
      
      This patch fixes it.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b88a634a
    • K
      intel_idle: Don't register CPU notifier if we are not running. · 6f8c2e79
      Konrad Rzeszutek Wilk 提交于
      The 'intel_idle_probe' probes the CPU and sets the CPU notifier.
      But if later on during the module initialization we fail (say
      in cpuidle_register_driver), we stop loading, but we neglect
      to unregister the CPU notifier.  This means that during CPU
      hotplug events the system will fail:
      
      calling  intel_idle_init+0x0/0x326 @ 1
      intel_idle: MWAIT substates: 0x1120
      intel_idle: v0.4 model 0x2A
      intel_idle: lapic_timer_reliable_states 0xffffffff
      intel_idle: intel_idle yielding to none
      initcall intel_idle_init+0x0/0x326 returned -19 after 14 usecs
      
      ... some time later, offlining and onlining a CPU:
      
      cpu 3 spinlock event irq 62
      BUG: unable to ] __cpuidle_register_device+0x1c/0x120
      PGD 99b8b067 PUD 99b95067 PMD 0
      Oops: 0000 [#1] SMP
      Modules linked in: xen_evtchn nouveau mxm_wmi wmi radeon ttm i915 fbcon tileblit font atl1c bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
      CPU 0
      Pid: 2302, comm: udevd Not tainted 3.8.0-rc3upstream-00249-g09ad159 #1 MSI MS-7680/H61M-P23 (MS-7680)
      RIP: e030:[<ffffffff814d956c>]  [<ffffffff814d956c>] __cpuidle_register_device+0x1c/0x120
      RSP: e02b:ffff88009dacfcb8  EFLAGS: 00010286
      RAX: 0000000000000000 RBX: ffff880105380000 RCX: 000000000000001c
      RDX: 0000000000000000 RSI: 0000000000000055 RDI: ffff880105380000
      RBP: ffff88009dacfce8 R08: ffffffff81a4f048 R09: 0000000000000008
      R10: 0000000000000008 R11: 0000000000000000 R12: ffff880105380000
      R13: 00000000ffffffdd R14: 0000000000000000 R15: ffffffff81a523d0
      FS:  00007f37bd83b7a0(0000) GS:ffff880105200000(0000) knlGS:0000000000000000
      CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000008 CR3: 00000000a09ea000 CR4: 0000000000042660
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process udevd (pid: 2302, threadinfo ffff88009dace000, task ffff88009afb47f0)
      Stack:
       ffffffff8107f2d0 ffffffff810c2fb7 ffff88009dacfce8 00000000ffffffea
       ffff880105380000 00000000ffffffdd ffff88009dacfd08 ffffffff814d9882
       0000000000000003 ffff880105380000 ffff88009dacfd28 ffffffff81340afd
      Call Trace:
       [<ffffffff8107f2d0>] ? collect_cpu_info_local+0x30/0x30
       [<ffffffff810c2fb7>] ? __might_sleep+0xe7/0x100
       [<ffffffff814d9882>] cpuidle_register_device+0x32/0x70
       [<ffffffff81340afd>] intel_idle_cpu_init+0xad/0x110
       [<ffffffff81340bc8>] cpu_hotplug_notify+0x68/0x80
       [<ffffffff8166023d>] notifier_call_chain+0x4d/0x70
       [<ffffffff810bc369>] __raw_notifier_call_chain+0x9/0x10
       [<ffffffff81094a4b>] __cpu_notify+0x1b/0x30
       [<ffffffff81652cf7>] _cpu_up+0x103/0x14b
       [<ffffffff81652e18>] cpu_up+0xd9/0xec
       [<ffffffff8164a254>] store_online+0x94/0xd0
       [<ffffffff814122fb>] dev_attr_store+0x1b/0x20
       [<ffffffff81216404>] sysfs_write_file+0xf4/0x170
       [<ffffffff811a1024>] vfs_write+0xb4/0x130
       [<ffffffff811a17ea>] sys_write+0x5a/0xa0
       [<ffffffff816643a9>] system_call_fastpath+0x16/0x1b
      Code: 03 18 00 c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 30 48 89 5d e8 4c 89 65 f0 48 89 fb 4c 89 6d f8 e8 84 08 00 00 <48> 8b 78 08 49 89 c4 e8 f8 7f c1 ff 89 c2 b8 ea ff ff ff 84 d2
      RIP  [<ffffffff814d956c>] __cpuidle_register_device+0x1c/0x120
       RSP <ffff88009dacfcb8>
      
      This patch fixes that by moving the CPU notifier registration
      as the last item to be done by the module.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: 3.6+ <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6f8c2e79
    • B
      usb: gadget: FunctionFS: Fix missing braces in parse_opts · b8100750
      Benoit Goby 提交于
      Add missing braces around an if block in ffs_fs_parse_opts. This broke
      parsing the uid/gid mount options and causes mount to fail when using
      uid/gid. This has been introduced by commit b9b73f7c (userns: Convert usb
      functionfs to use kuid/kgid where appropriate) in 3.7.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBenoit Goby <benoit@android.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b8100750
    • P
      usb: dwc3: gadget: fix ep->maxburst for ep0 · 6048e4c6
      Pratyush Anand 提交于
      dwc3_gadget_set_ep_config expects maxburst as incremented by 1. So, by
      default initialize ep->maxburst to 1 for ep0.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6048e4c6
    • P
      usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap · c2c9caa9
      Peter Chen 提交于
      As mach/hardware.h is deleted, we can't visit platform code at driver.
      It has no phy driver to combine with this controller, so it has to use
      ioremap to map phy address as a workaround.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c2c9caa9