1. 12 Dec, 2013 28 commits
  2. 08 Dec, 2013 12 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.10.23 · 184c20bb
      Greg Kroah-Hartman authored
      184c20bb
    • Pierre Ossman's avatar
      drm/radeon/audio: correct ACR table · 84a0264e
      Pierre Ossman authored
      commit 3e71985f upstream.
      
      The values were taken from the HDMI spec, but they assumed
      exact x/1.001 clocks. Since we round the clocks, we also need
      to calculate different N and CTS values.
      
      Note that the N for 25.2/1.001 MHz at 44.1 kHz audio is out of
      spec. Hopefully this mode is rarely used and/or HDMI sinks
      tolerate overly large values of N.
      
      bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=69675Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84a0264e
    • Pierre Ossman's avatar
      drm/radeon/audio: improve ACR calculation · f789de21
      Pierre Ossman authored
      commit a2098250 upstream.
      
      In order to have any realistic chance of calculating proper
      ACR values, we need to be able to calculate both N and CTS,
      not just CTS. We still aim for the ideal N as specified in
      the HDMI spec though.
      
      bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=69675Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f789de21
    • Miroslav Lichvar's avatar
      ntp: Make periodic RTC update more reliable · 9baca2ff
      Miroslav Lichvar authored
      commit a97ad0c4 upstream.
      
      The current code requires that the scheduled update of the RTC happens
      in the closest tick to the half of the second. This seems to be
      difficult to achieve reliably. The scheduled work may be missing the
      target time by a tick or two and be constantly rescheduled every second.
      
      Relax the limit to 10 ticks. As a typical RTC drifts in the 11-minute
      update interval by several milliseconds, this shouldn't affect the
      overall accuracy of the RTC much.
      Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9baca2ff
    • Tomoki Sekiyama's avatar
      elevator: acquire q->sysfs_lock in elevator_change() · 72b9401c
      Tomoki Sekiyama authored
      commit 7c8a3679 upstream.
      
      Add locking of q->sysfs_lock into elevator_change() (an exported function)
      to ensure it is held to protect q->elevator from elevator_init(), even if
      elevator_change() is called from non-sysfs paths.
      sysfs path (elv_iosched_store) uses __elevator_change(), non-locking
      version, as the lock is already taken by elv_iosched_store().
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72b9401c
    • Tomoki Sekiyama's avatar
      elevator: Fix a race in elevator switching and md device initialization · 6d53d392
      Tomoki Sekiyama authored
      commit eb1c160b upstream.
      
      The soft lockup below happens at the boot time of the system using dm
      multipath and the udev rules to switch scheduler.
      
      [  356.127001] BUG: soft lockup - CPU#3 stuck for 22s! [sh:483]
      [  356.127001] RIP: 0010:[<ffffffff81072a7d>]  [<ffffffff81072a7d>] lock_timer_base.isra.35+0x1d/0x50
      ...
      [  356.127001] Call Trace:
      [  356.127001]  [<ffffffff81073810>] try_to_del_timer_sync+0x20/0x70
      [  356.127001]  [<ffffffff8118b08a>] ? kmem_cache_alloc_node_trace+0x20a/0x230
      [  356.127001]  [<ffffffff810738b2>] del_timer_sync+0x52/0x60
      [  356.127001]  [<ffffffff812ece22>] cfq_exit_queue+0x32/0xf0
      [  356.127001]  [<ffffffff812c98df>] elevator_exit+0x2f/0x50
      [  356.127001]  [<ffffffff812c9f21>] elevator_change+0xf1/0x1c0
      [  356.127001]  [<ffffffff812caa50>] elv_iosched_store+0x20/0x50
      [  356.127001]  [<ffffffff812d1d09>] queue_attr_store+0x59/0xb0
      [  356.127001]  [<ffffffff812143f6>] sysfs_write_file+0xc6/0x140
      [  356.127001]  [<ffffffff811a326d>] vfs_write+0xbd/0x1e0
      [  356.127001]  [<ffffffff811a3ca9>] SyS_write+0x49/0xa0
      [  356.127001]  [<ffffffff8164e899>] system_call_fastpath+0x16/0x1b
      
      This is caused by a race between md device initialization by multipathd and
      shell script to switch the scheduler using sysfs.
      
       - multipathd:
         SyS_ioctl -> do_vfs_ioctl -> dm_ctl_ioctl -> ctl_ioctl -> table_load
         -> dm_setup_md_queue -> blk_init_allocated_queue -> elevator_init
          q->elevator = elevator_alloc(q, e); // not yet initialized
      
       - sh -c 'echo deadline > /sys/$DEVPATH/queue/scheduler':
         elevator_switch (in the call trace above)
          struct elevator_queue *old = q->elevator;
          q->elevator = elevator_alloc(q, new_e);
          elevator_exit(old);                 // lockup! (*)
      
       - multipathd: (cont.)
          err = e->ops.elevator_init_fn(q);   // init fails; q->elevator is modified
      
      (*) When del_timer_sync() is called, lock_timer_base() will loop infinitely
      while timer->base == NULL. In this case, as timer will never initialized,
      it results in lockup.
      
      This patch introduces acquisition of q->sysfs_lock around elevator_init()
      into blk_init_allocated_queue(), to provide mutual exclusion between
      initialization of the q->scheduler and switching of the scheduler.
      
      This should fix this bugzilla:
      https://bugzilla.redhat.com/show_bug.cgi?id=902012Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6d53d392
    • Neil Horman's avatar
      iommu: Remove stack trace from broken irq remapping warning · 64545123
      Neil Horman authored
      commit 05104a4e upstream.
      
      The warning for the irq remapping broken check in intel_irq_remapping.c is
      pretty pointless.  We need the warning, but we know where its comming from, the
      stack trace will always be the same, and it needlessly triggers things like
      Abrt.  This changes the warning to just print a text warning about BIOS being
      broken, without the stack trace, then sets the appropriate taint bit.  Since we
      automatically disable irq remapping, theres no need to contiue making Abrt jump
      at this problem
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: Joerg Roedel <joro@8bytes.org>
      CC: Bjorn Helgaas <bhelgaas@google.com>
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      64545123
    • Julian Stecklina's avatar
      iommu/vt-d: Fixed interaction of VFIO_IOMMU_MAP_DMA with IOMMU address limits · 3de762b3
      Julian Stecklina authored
      commit f9423606 upstream.
      
      The BUG_ON in drivers/iommu/intel-iommu.c:785 can be triggered from userspace via
      VFIO by calling the VFIO_IOMMU_MAP_DMA ioctl on a vfio device with any address
      beyond the addressing capabilities of the IOMMU. The problem is that the ioctl code
      calls iommu_iova_to_phys before it calls iommu_map. iommu_map handles the case that
      it gets addresses beyond the addressing capabilities of its IOMMU.
      intel_iommu_iova_to_phys does not.
      
      This patch fixes iommu_iova_to_phys to return NULL for addresses beyond what the
      IOMMU can handle. This in turn causes the ioctl call to fail in iommu_map and
      (correctly) return EFAULT to the user with a helpful warning message in the kernel
      log.
      Signed-off-by: default avatarJulian Stecklina <jsteckli@os.inf.tu-dresden.de>
      Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3de762b3
    • Simon Wood's avatar
      HID: lg: fix Report Descriptor for Logitech MOMO Force (Black) · 7dc39b55
      Simon Wood authored
      commit 348cbaa8 upstream.
      
      By default the Logitech MOMO Force (Black) presents a combined accel/brake
      axis ('Y'). This patch modifies the HID descriptor to present seperate
      accel/brake axes ('Y' and 'Z').
      Signed-off-by: default avatarSimon Wood <simon@mungewell.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7dc39b55
    • Sasha Levin's avatar
      video: kyro: fix incorrect sizes when copying to userspace · ca77581e
      Sasha Levin authored
      commit 2ab68ec9 upstream.
      
      kyro would copy u32s and specify sizeof(unsigned long) as the size to copy.
      
      This would copy more data than intended and cause memory corruption and might
      leak kernel memory.
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ca77581e
    • Mel Gorman's avatar
      mm: numa: return the number of base pages altered by protection changes · f99510dc
      Mel Gorman authored
      commit 72403b4a upstream.
      
      Commit 0255d491 ("mm: Account for a THP NUMA hinting update as one
      PTE update") was added to account for the number of PTE updates when
      marking pages prot_numa.  task_numa_work was using the old return value
      to track how much address space had been updated.  Altering the return
      value causes the scanner to do more work than it is configured or
      documented to in a single unit of work.
      
      This patch reverts that commit and accounts for the number of THP
      updates separately in vmstat.  It is up to the administrator to
      interpret the pair of values correctly.  This is a straight-forward
      operation and likely to only be of interest when actively debugging NUMA
      balancing problems.
      
      The impact of this patch is that the NUMA PTE scanner will scan slower
      when THP is enabled and workloads may converge slower as a result.  On
      the flip size system CPU usage should be lower than recent tests
      reported.  This is an illustrative example of a short single JVM specjbb
      test
      
      specjbb
                             3.12.0                3.12.0
                            vanilla      acctupdates
      TPut 1      26143.00 (  0.00%)     25747.00 ( -1.51%)
      TPut 7     185257.00 (  0.00%)    183202.00 ( -1.11%)
      TPut 13    329760.00 (  0.00%)    346577.00 (  5.10%)
      TPut 19    442502.00 (  0.00%)    460146.00 (  3.99%)
      TPut 25    540634.00 (  0.00%)    549053.00 (  1.56%)
      TPut 31    512098.00 (  0.00%)    519611.00 (  1.47%)
      TPut 37    461276.00 (  0.00%)    474973.00 (  2.97%)
      TPut 43    403089.00 (  0.00%)    414172.00 (  2.75%)
      
                    3.12.0      3.12.0
                   vanillaacctupdates
      User         5169.64     5184.14
      System        100.45       80.02
      Elapsed       252.75      251.85
      
      Performance is similar but note the reduction in system CPU time.  While
      this showed a performance gain, it will not be universal but at least
      it'll be behaving as documented.  The vmstats are obviously different but
      here is an obvious interpretation of them from mmtests.
      
                                      3.12.0      3.12.0
                                     vanillaacctupdates
      NUMA page range updates        1408326    11043064
      NUMA huge PMD updates                0       21040
      NUMA PTE updates               1408326      291624
      
      "NUMA page range updates" == nr_pte_updates and is the value returned to
      the NUMA pte scanner.  NUMA huge PMD updates were the number of THP
      updates which in combination can be used to calculate how many ptes were
      updated from userspace.
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Reported-by: default avatarAlex Thorlton <athorlton@sgi.com>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f99510dc
    • Stephen Boyd's avatar
      clockevents: Prefer CPU local devices over global devices · 7281bb56
      Stephen Boyd authored
      commit 70e5975d upstream.
      
      On an SMP system with only one global clockevent and a dummy
      clockevent per CPU we run into problems. We want the dummy
      clockevents to be registered as the per CPU tick devices, but
      we can only achieve that if we register the dummy clockevents
      before the global clockevent or if we artificially inflate the
      rating of the dummy clockevents to be higher than the rating
      of the global clockevent. Failure to do so leads to boot
      hangs when the dummy timers are registered on all other CPUs
      besides the CPU that accepted the global clockevent as its tick
      device and there is no broadcast timer to poke the dummy
      devices.
      
      If we're registering multiple clockevents and one clockevent is
      global and the other is local to a particular CPU we should
      choose to use the local clockevent regardless of the rating of
      the device. This way, if the clockevent is a dummy it will take
      the tick device duty as long as there isn't a higher rated tick
      device and any global clockevent will be bumped out into
      broadcast mode, fixing the problem described above.
      Reported-and-tested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Tested-by: soren.brinkmann@xilinx.com
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: John Stultz <john.stultz@linaro.org>
      Link: http://lkml.kernel.org/r/20130613183950.GA32061@codeaurora.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Kim Phillips <kim.phillips@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7281bb56