1. 01 9月, 2015 4 次提交
    • N
      md/raid5: consider updating reshape_position at start of reshape. · 92140480
      NeilBrown 提交于
      md/raid5 only updates ->reshape_position (which is stored in
      metadata and is authoritative) occasionally, but particularly
      when getting closed to ->resync_max as it must be correct
      when ->resync_max is reached.
      
      When mdadm tries to stop an array which is reshaping it will:
       - freeze the reshape,
       - set resync_max to where the reshape has reached.
       - unfreeze the reshape.
      When this happens, the reshape is aborted and then restarted.
      
      The restart doesn't check that resync_max is close, and so doesn't
      update ->reshape_position like it should.
      This results in the reshape stopping, but ->reshape_position being
      incorrect.
      
      So on that first call to reshape_request, make sure ->reshape_position
      is updated if needed.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      92140480
    • N
      md: close some races between setting and checking sync_action. · 985ca973
      NeilBrown 提交于
      When checking sync_action in a script, we want to be sure it is
      as accurate as possible.
      As resync/reshape etc doesn't always start immediately (a separate
      thread is scheduled to do it), it is best if 'action_show'
      checks if MD_RECOVER_NEEDED is set (which it does) and in that
      case reports what is likely to start soon (which it only sometimes
      does).
      
      So:
       - report 'reshape' if reshape_position suggests one might start.
       - set MD_RECOVERY_RECOVER in raid1_reshape(), because that is very
         likely to happen next.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      985ca973
    • N
      md: Keep /proc/mdstat reporting recovery until fully DONE. · f7851be7
      NeilBrown 提交于
      Currently when a recovery completes, mdstat shows that it has finished
      before the new device is marked as a full member.  Because of this it
      can appear to a script that the recovery finished but the array isn't
      in sync.
      
      So while MD_RECOVERY_DONE is still set, keep mdstat reporting "recovery".
      Once md_reap_sync_thread() completes, the spare will be active and then
      MD_RECOVERY_DONE will be cleared.
      
      To ensure this is race-free, set MD_RECOVERY_DONE before clearning
      curr_resync.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      f7851be7
    • A
      md/raid6: delta syndrome for ARM NEON · 0e833e69
      Ard Biesheuvel 提交于
      This implements XOR syndrome calculation using NEON intrinsics.
      As before, the module can be built for ARM and arm64 from the
      same source.
      
      Relative performance on a Cortex-A57 based system:
      
        raid6: int64x1  gen()   905 MB/s
        raid6: int64x1  xor()   881 MB/s
        raid6: int64x2  gen()  1343 MB/s
        raid6: int64x2  xor()  1286 MB/s
        raid6: int64x4  gen()  1896 MB/s
        raid6: int64x4  xor()  1321 MB/s
        raid6: int64x8  gen()  1773 MB/s
        raid6: int64x8  xor()  1165 MB/s
        raid6: neonx1   gen()  1834 MB/s
        raid6: neonx1   xor()  1278 MB/s
        raid6: neonx2   gen()  2528 MB/s
        raid6: neonx2   xor()  1942 MB/s
        raid6: neonx4   gen()  2888 MB/s
        raid6: neonx4   xor()  2334 MB/s
        raid6: neonx8   gen()  2957 MB/s
        raid6: neonx8   xor()  2232 MB/s
        raid6: using algorithm neonx8 gen() 2957 MB/s
        raid6: .... xor() 2232 MB/s, rmw enabled
      
      Cc: Markus Stockhausen <stockhausen@collogia.de>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      0e833e69
  2. 03 8月, 2015 10 次提交
    • N
      md/raid0: update queue parameter in a safer location. · 199dc6ed
      NeilBrown 提交于
      When a (e.g.) RAID5 array is reshaped to RAID0, the updating
      of queue parameters (e.g. max number of sectors per bio) is
      done in the wrong place.
      It should be part of ->run, but it is actually part of ->takeover.
      This means it happens before level_store() calls:
      
      	blk_set_stacking_limits(&mddev->queue->limits);
      
      and so it ineffective.  This can lead to errors from underlying
      devices.
      
      So move all the relevant settings out of create_stripe_zones()
      and into raid0_run().
      
      As this can lead to a bug-on it is suitable for any -stable
      kernel which supports reshape to RAID0.  So 2.6.35 or later.
      As the bug has been present for five years there is no urgency,
      so no need to rush into -stable.
      
      Fixes: 9af204cf ("md: Add support for Raid5->Raid0 and Raid10->Raid0 takeover")
      Cc: stable@vger.kernel.org (v2.6.35+ - please delay until after -final release).
      Reported-by: NYi Zhang <yizhan@redhat.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      199dc6ed
    • B
      md: simplify get_bitmap_file now that "file" is zeroed. · 25eafe1a
      Benjamin Randazzo 提交于
      There is no point assigning '\0' to file->pathname[0] as
      file is now zeroed out, so remove that branch and
      simplify the code.
      
      [Original patch combined this with the change to use
       kzalloc.  I split the two so that the change to kzalloc
       is easier to backport. - neilb]
      Signed-off-by: NBenjamin Randazzo <benjamin@randazzo.fr>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      25eafe1a
    • N
      md/raid5: don't let shrink_slab shrink too far. · 49895bcc
      NeilBrown 提交于
      I have a report of drop_one_stripe() called from
      raid5_cache_scan() apparently finding ->max_nr_stripes == 0.
      
      This should not be allowed.
      
      So add a test to keep max_nr_stripes above min_nr_stripes.
      
      Also use a 'mask' rather than a 'mod' in drop_one_stripe
      to ensure 'hash' is valid even if max_nr_stripes does reach zero.
      
      
      Fixes: edbe83ab ("md/raid5: allow the stripe_cache to grow and shrink.")
      Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b)
      Reported-by: NTomas Papan <tomas.papan@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      49895bcc
    • B
      md: use kzalloc() when bitmap is disabled · b6878d9e
      Benjamin Randazzo 提交于
      In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
      mdu_bitmap_file_t called "file".
      
      5769         file = kmalloc(sizeof(*file), GFP_NOIO);
      5770         if (!file)
      5771                 return -ENOMEM;
      
      This structure is copied to user space at the end of the function.
      
      5786         if (err == 0 &&
      5787             copy_to_user(arg, file, sizeof(*file)))
      5788                 err = -EFAULT
      
      But if bitmap is disabled only the first byte of "file" is initialized
      with zero, so it's possible to read some bytes (up to 4095) of kernel
      space memory from user space. This is an information leak.
      
      5775         /* bitmap disabled, zero the first byte and copy out */
      5776         if (!mddev->bitmap_info.file)
      5777                 file->pathname[0] = '\0';
      Signed-off-by: NBenjamin Randazzo <benjamin@randazzo.fr>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      b6878d9e
    • N
      md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies · 423f04d6
      NeilBrown 提交于
      raid1_end_read_request() assumes that the In_sync bits are consistent
      with the ->degaded count.
      raid1_spare_active updates the In_sync bit before the ->degraded count
      and so exposes an inconsistency, as does error()
      So extend the spinlock in raid1_spare_active() and error() to hide those
      inconsistencies.
      
      This should probably be part of
        Commit: 34cab6f4 ("md/raid1: fix test for 'was read error from
        last working device'.")
      as it addresses the same issue.  It fixes the same bug and should go
      to -stable for same reasons.
      
      Fixes: 76073054 ("md/raid1: clean up read_balance.")
      Cc: stable@vger.kernel.org (v3.0+)
      Signed-off-by: NNeilBrown <neilb@suse.com>
      423f04d6
    • L
      Linux 4.2-rc5 · 74d33293
      Linus Torvalds 提交于
      74d33293
    • L
      Merge tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · d08c3181
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       - TCE table memory calculation fix from Alexey
       - Build fix for ans-lcd from Luis
       - Unbalanced IRQ warning fix from Alistair
      
      * tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/eeh-powernv: Fix unbalanced IRQ warning
        macintosh/ans-lcd: fix build failure after module_init/exit relocation
        powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table
      d08c3181
    • L
      i915: temporary fix for DP MST docking station NULL pointer dereference · 27667f47
      Linus Torvalds 提交于
      Ted Ts'o reports that his Lenovo T540p ThinkPad crashes at boot if
      attached to the docking station.  This is a regression that he was able
      to bisect to commit 8c7b5ccb: "drm/i915: Use atomic helpers for
      computing changed flags:"
      
      The reason seems to be the new call to drm_atomic_helper_check_modeset()
      added to intel_modeset_compute_config(), which in turn calls
      update_connector_routing(), and somehow ends up picking a NULL crtc for
      the connector state, causing the subsequent drm_crtc_index() to OOPS.
      
      Daniel Vetter says that the fundamental issue seems to be confusion in
      the encoder selection, and this isn't the right fix, but while he chases
      down the proper fix, this at least avoids the NULL pointer dereference
      and makes Ted's docking station work again.
      Reported-bisected-and-tested-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Mani Nikula <jani.nikula@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      27667f47
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · d4edea40
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "A set of three fixes for the ipr driver and one fairly major one for
        memory leaks in the mq path of SCSI"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: fix memory leak with scsi-mq
        ipr: Fix invalid array indexing for HRRQ
        ipr: Fix incorrect trace indexing
        ipr: Fix locking for unit attention handling
      d4edea40
    • L
      Merge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 30c7b56d
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "Things are calming down nicely here w.r.t. fixes.  This batch
        includes two week's worth since I missed to send before -rc4.
      
        Nothing particularly scary to point out, smaller fixes here and there.
        Shortlog describes it pretty well"
      
      * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: dts: keystone: fix dt bindings to use post div register for mainpll
        ARM: nomadik: disable UART0 on Nomadik boards
        ARM: dts: i.MX35: Fix can support.
        ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc
        ARM: dts: add CPU OPP and regulator supply property for exynos4210
        ARM: dts: Update video-phy node with syscon phandle for exynos3250
        ARM: DRA7: hwmod: fix gpmc hwmod
      30c7b56d
  3. 02 8月, 2015 5 次提交
  4. 01 8月, 2015 13 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7c764cec
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Must teardown SR-IOV before unregistering netdev in igb driver, from
          Alex Williamson.
      
       2) Fix ipv6 route unreachable crash in IPVS, from Alex Gartrell.
      
       3) Default route selection in ipv4 should take the prefix length, table
          ID, and TOS into account, from Julian Anastasov.
      
       4) sch_plug must have a reset method in order to purge all buffered
          packets when the qdisc is reset, likewise for sch_choke, from WANG
          Cong.
      
       5) Fix deadlock and races in slave_changelink/br_setport in bridging.
          From Nikolay Aleksandrov.
      
       6) mlx4 bug fixes (wrong index in port even propagation to VFs,
          overzealous BUG_ON assertion, etc.) from Ido Shamay, Jack
          Morgenstein, and Or Gerlitz.
      
       7) Turn off klog message about SCTP userspace interface compat that
          makes no sense at all, from Daniel Borkmann.
      
       8) Fix unbounded restarts of inet frag eviction process, causing NMI
          watchdog soft lockup messages, from Florian Westphal.
      
       9) Suspend/resume fixes for r8152 from Hayes Wang.
      
      10) Fix busy loop when MSG_WAITALL|MSG_PEEK is used in TCP recv, from
          Sabrina Dubroca.
      
      11) Fix performance regression when removing a lot of routes from the
          ipv4 routing tables, from Alexander Duyck.
      
      12) Fix device leak in AF_PACKET, from Lars Westerhoff.
      
      13) AF_PACKET also has a header length comparison bug due to signedness,
          from Alexander Drozdov.
      
      14) Fix bug in EBPF tail call generation on x86, from Daniel Borkmann.
      
      15) Memory leaks, TSO stats, watchdog timeout and other fixes to
          thunderx driver from Sunil Goutham and Thanneeru Srinivasulu.
      
      16) act_bpf can leak memory when replacing programs, from Daniel
          Borkmann.
      
      17) WOL packet fixes in gianfar driver, from Claudiu Manoil.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (79 commits)
        stmmac: fix missing MODULE_LICENSE in stmmac_platform
        gianfar: Enable device wakeup when appropriate
        gianfar: Fix suspend/resume for wol magic packet
        gianfar: Fix warning when CONFIG_PM off
        act_pedit: check binding before calling tcf_hash_release()
        net: sk_clone_lock() should only do get_net() if the parent is not a kernel socket
        net: sched: fix refcount imbalance in actions
        r8152: reset device when tx timeout
        r8152: add pre_reset and post_reset
        qlcnic: Fix corruption while copying
        act_bpf: fix memory leaks when replacing bpf programs
        net: thunderx: Fix for crash while BGX teardown
        net: thunderx: Add PCI driver shutdown routine
        net: thunderx: Fix crash when changing rss with mutliple traffic flows
        net: thunderx: Set watchdog timeout value
        net: thunderx: Wakeup TXQ only if CQE_TX are processed
        net: thunderx: Suppress alloc_pages() failure warnings
        net: thunderx: Fix TSO packet statistic
        net: thunderx: Fix memory leak when changing queue count
        net: thunderx: Fix RQ_DROP miscalculation
        ...
      7c764cec
    • L
      Merge branch 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · acea568f
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "Filipe fixed up a hard to trigger ENOSPC regression from our merge
        window pull, and we have a few other smaller fixes"
      
      * 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix quick exhaustion of the system array in the superblock
        btrfs: its btrfs_err() instead of btrfs_error()
        btrfs: Avoid NULL pointer dereference of free_extent_buffer when read_tree_block() fail
        btrfs: Fix lockdep warning of btrfs_run_delayed_iputs()
      acea568f
    • L
      Merge tag 'sound-4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · c6fd4fc7
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "This became a relative big update as it includes the collected ASoC
        fixes.  There are a few fixes in ASoC core side, mostly for DAPM and
        the new topology API.  The rest are various ASoC driver-specific
        fixes, as well as the usual HD-audio and USB-audio quirks"
      
      * tag 'sound-4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits)
        ALSA: hda - Fix MacBook Pro 5,2 quirk
        ALSA: hda - Fix race between PM ops and HDA init/probe
        ALSA: usb-audio: add dB range mapping for some devices
        ALSA: hda - Apply a fixup to Dell Vostro 5480
        ALSA: hda - Add pin quirk for the headset mic jack detection on Dell laptop
        ALSA: hda - Apply fixup for another Toshiba Satellite S50D
        ALSA: fireworks: add support for AudioFire2 quirk
        ALSA: hda - Fix the headset mic that will not work on Dell desktop machine
        ALSA: hda - fix cs4210_spdif_automute()
        ASoC: pcm1681: Fix setting de-emphasis sampling rate selection
        ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
        ASoC: sgtl5000: Fix up define for SGTL5000_SMALL_POP
        ASoC: dapm: Don't add prefix to widget stream name
        ASoC: rt5645: Check if codec is initialized in workqueue handler
        ASoC: Intel: Get correct usage_count value to load firmware
        ASoC: topology: Fix to add dapm mixer info
        ASoC: zx: spdif: Fix devm_ioremap_resource return value check
        ASoC: zx: i2s: Fix devm_ioremap_resource return value check
        ASoC: mediatek: Use platform_of_node for machine drivers
        ASoC: Free card DAPM context on snd_soc_instantiate_card() error path
        ...
      c6fd4fc7
    • J
      stmmac: fix missing MODULE_LICENSE in stmmac_platform · ea111545
      Joachim Eastwood 提交于
      Commit 50649ab1 ("stmmac: drop driver from stmmac platform code")
      was a bit overzealous in removing code and dropped the MODULE_*
      macro's that are still needed since stmmac_platform can be a module.
      Fix this by putting the macro's remvoed in 50649ab1 back.
      
      This fixes the following errors when used as a module:
        stmmac_platform: module license 'unspecified' taints kernel.
        Disabling lock debugging due to kernel taint
        stmmac_platform: Unknown symbol devm_kmalloc (err 0)
        stmmac_platform: Unknown symbol stmmac_suspend (err 0)
        stmmac_platform: Unknown symbol platform_get_irq_byname (err 0)
        stmmac_platform: Unknown symbol stmmac_dvr_remove (err 0)
        stmmac_platform: Unknown symbol platform_get_resource (err 0)
        stmmac_platform: Unknown symbol of_get_phy_mode (err 0)
        stmmac_platform: Unknown symbol of_property_read_u32_array (err 0)
        stmmac_platform: Unknown symbol of_alias_get_id (err 0)
        stmmac_platform: Unknown symbol stmmac_resume (err 0)
        stmmac_platform: Unknown symbol stmmac_dvr_probe (err 0)
      
      Fixes: 50649ab1 ("stmmac: drop driver from stmmac platform code")
      Reported-by: NIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Signed-off-by: NJoachim Eastwood <manabian@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea111545
    • D
      Merge branch 'gianfar-wol-fixes' · ef1f4364
      David S. Miller 提交于
      Claudiu Manoil says:
      
      ====================
      gianfar: wol magic packet fixes
      
      These changes were already validated as part of FSL SDK.
      Patch 2 fixes occasional wake-on magic packet failures during
      traffic, probably due to incorrect traffic stop/ device halt
      sequence and incorrect usage of txlock.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef1f4364
    • C
      gianfar: Enable device wakeup when appropriate · b0734b6d
      Claudiu Manoil 提交于
      The wol_en flag is 0 by default anyway, and we have the
      following inconsistency: a MAGIC packet wol capable eth
      interface is registered as a wake-up source but unable
      to wake-up the system as wol_en is 0 (wake-on flag set to 'd').
      Calling set_wakeup_enable() at netdev open is just redundant
      because wol_en is 0 by default.
      Let only ethtool call set_wakeup_enable() for now.
      
      The bflock is obviously obsoleted, its utility has been corroded
      over time.  The bitfield flags used today in gianfar are accessed
      only on the init/ config path, with no real possibility of
      concurrency - nothing that would justify smth. like bflock.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0734b6d
    • C
      gianfar: Fix suspend/resume for wol magic packet · 614b4242
      Claudiu Manoil 提交于
      If we disable NAPI in the first place we can mask the device's
      interrupts (and halt it) without fearing that imask may be
      concurrently accessed from interrupt context, so there's
      no need to do local_irq_save() around gfar_halt_nodisable().
      lock_rx_qs()/unlock_tx_qs() are just obsoleted and potentially
      buggy routines.  The txlock is currently used in the driver only
      to manage TX congestion, it has nothing to do with halting the
      device.  With these changes, the TX processing is stopped before
      gfar_halt().
      
      Compact gfar_halt() is used instead of gfar_halt_nodisable(),
      as it disables Rx/TX DMA h/w blocks and the Rx/TX h/w queues.
      gfar_start() re-enables all these blocks on resume.  Enabling
      the magic-packet mode remains the same, note that the RX block
      is re-enabled just before entering sleep mode.
      
      Add IRQF_NO_SUSPEND flag for the error interrupt line, to signal
      that the interrupt line must remain active during sleep in order
      to wake the system by magic packet (MAG) reception interrupt.
      (On some systems the MAG interrupt did trigger w/o this flag
      as well, but on others it didn't.)
      
      Without these fixes, when suspended during fair Tx traffic the
      interface occasionally failed to be woken up by magic packet.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      614b4242
    • C
      gianfar: Fix warning when CONFIG_PM off · 84868305
      Claudiu Manoil 提交于
      CC      drivers/net/ethernet/freescale/gianfar.o
      drivers/net/ethernet/freescale/gianfar.c:568:13: warning: 'lock_tx_qs'
      defined but not used [-Wunused-function]
       static void lock_tx_qs(struct gfar_private *priv)
                   ^
      drivers/net/ethernet/freescale/gianfar.c:576:13: warning: 'unlock_tx_qs'
      defined but not used [-Wunused-function]
       static void unlock_tx_qs(struct gfar_private *priv)
                   ^
      Reported-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84868305
    • W
      act_pedit: check binding before calling tcf_hash_release() · 5175f710
      WANG Cong 提交于
      When we share an action within a filter, the bind refcnt
      should increase, therefore we should not call tcf_hash_release().
      
      Fixes: 1a29321e ("net_sched: act: Dont increment refcnt on replace")
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NCong Wang <cwang@twopensource.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5175f710
    • M
      ARM: dts: keystone: fix dt bindings to use post div register for mainpll · c1bfa985
      Murali Karicheri 提交于
      All of the keystone devices have a separate register to hold post
      divider value for main pll clock. Currently the fixed-postdiv
      value used for k2hk/l/e SoCs works by sheer luck as u-boot happens to
      use a value of 2 for this. Now that we have fixed this in the pll
      clock driver change the dt bindings for the same.
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Acked-by: NSantosh Shilimkar <ssantosh@kernel.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      c1bfa985
    • L
      Merge tag 'iommu-fixes-v4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 5e49e0be
      Linus Torvalds 提交于
      Pull IOMMU fixes from Joerg Roedel:
       "These fixes are all for the AMD IOMMU driver:
      
         - A regression with HSA caused by the conversion of the driver to
           default domains.  The fixes make sure that an HSA device can still
           be attached to an IOMMUv2 domain and that these domains also allow
           non-IOMMUv2 capable devices.
      
         - Fix iommu=pt mode which did not work because the dma_ops where set
           to nommu_ops, which breaks devices that can only do 32bit DMA.
      
         - Fix an issue with non-PCI devices not working, because there are no
           dma_ops for them.  This issue was discovered recently as new AMD
           x86 platforms have non-PCI devices too"
      
      * tag 'iommu-fixes-v4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Allow non-ATS devices in IOMMUv2 domains
        iommu/amd: Set global dma_ops if swiotlb is disabled
        iommu/amd: Use swiotlb in passthrough mode
        iommu/amd: Allow non-IOMMUv2 devices in IOMMUv2 domains
        iommu/amd: Use iommu core for passthrough mode
        iommu/amd: Use iommu_attach_group()
      5e49e0be
    • L
      Merge tag 'drm-intel-fixes-2015-07-31' of git://anongit.freedesktop.org/drm-intel · 23ff9e19
      Linus Torvalds 提交于
      Pull drm intel fixes from Daniel Vetter:
       "I delayed my -fixes pull a bit hoping that I could include a fix for
        the dp mst stuff but looks a bit more nasty than that.  So just 3
        other regression fixes, one 4.2 other two cc: stable"
      
      * tag 'drm-intel-fixes-2015-07-31' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Declare the swizzling unknown for L-shaped configurations
        drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
        drm/i915: Replace WARN inside I915_READ64_2x32 with retry loop
      23ff9e19
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · fd56d1d6
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This has a bunch of nouveau fixes, as Ben has been hibernating and has
        lots of small fixes for lots of bugs across nouveau.
      
        Radeon has one major fix for hdmi/dp audio regression that is larger
        than Alex would like, but seems to fix up a fair few bugs, along with
        some misc fixes.
      
        And a few msm fixes, one of which is also a bit large.
      
        But nothing in here seems insane or crazy for this stage, just more
        than I'd like"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (33 commits)
        drm/msm/mdp5: release SMB (shared memory blocks) in various cases
        drm/msm: change to uninterruptible wait in atomic commit
        drm/msm: mdp4: Fix drm_framebuffer dereference crash
        drm/msm: fix msm_gem_prime_get_sg_table()
        drm/amdgpu: add new parameter to seperate map and unmap
        drm/amdgpu: hdp_flush is not needed for inside IB
        drm/amdgpu: different emit_ib for gfx and compute
        drm/amdgpu: information leak in amdgpu_info_ioctl()
        drm/amdgpu: clean up init sequence for failures
        drm/radeon/combios: add some validation of lvds values
        drm/radeon: rework audio modeset to handle non-audio hdmi features
        drm/radeon: rework audio detect (v4)
        drm/amdgpu: Drop drm/ prefix for including drm.h in amdgpu_drm.h
        drm/radeon: Drop drm/ prefix for including drm.h in radeon_drm.h
        drm/nouveau/nouveau/ttm: fix tiled system memory with Maxwell
        drm/nouveau/kms/nv50-: guard against enabling cursor on disabled heads
        drm/nouveau/fbcon/g80: reduce PUSH_SPACE alloc, fire ring on accel init
        drm/nouveau/fbcon/gf100-: reduce RING_SPACE allocation
        drm/nouveau/fbcon/nv11-: correctly account for ring space usage
        drm/nouveau/bios: add proper support for opcode 0x59
        ...
      fd56d1d6
  5. 31 7月, 2015 8 次提交
    • J
      Revert "dmaengine: virt-dma: don't always free descriptor upon completion" · 8c8fe97b
      Jun Nie 提交于
      This reverts commit b9855f03.
      The patch break existing DMA usage case. For example, audio SOC
      dmaengine never release channel and cause virt-dma to cache too
      much memory in descriptor to exhaust system memory.
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      8c8fe97b
    • T
      dmaengine: mv_xor: fix big endian operation in register mode · 0ec9ebc7
      Thomas Petazzoni 提交于
      Commit 6f166312 ("dmaengine: mv_xor: add support for a38x command
      in descriptor mode") introduced the support for a feature that
      appeared in Armada 38x: specifying the operation to be performed in a
      per-descriptor basis rather than globally per channel.
      
      However, when doing so, it changed the function mv_chan_set_mode() to
      use:
      
        if (IS_ENABLED(__BIG_ENDIAN))
      
      instead of:
      
        #if defined(__BIG_ENDIAN)
      
      While IS_ENABLED() is perfectly fine for CONFIG_* symbols, it is not
      for other symbols such as __BIG_ENDIAN that is provided directly by
      the compiler. Consequently, the commit broke support for big-endian,
      as the XOR_DESCRIPTOR_SWAP flag was not set in the XOR channel
      configuration register.
      
      The primarily visible effect was some nasty warnings and failures
      appearing during the self-test of the XOR unit:
      
      [    1.197368] mv_xor d0060900.xor: error on chan 0. intr cause 0x00000082
      [    1.197393] mv_xor d0060900.xor: config       0x00008440
      [    1.197410] mv_xor d0060900.xor: activation   0x00000000
      [    1.197427] mv_xor d0060900.xor: intr cause   0x00000082
      [    1.197443] mv_xor d0060900.xor: intr mask    0x000003f7
      [    1.197460] mv_xor d0060900.xor: error cause  0x00000000
      [    1.197477] mv_xor d0060900.xor: error addr   0x00000000
      [    1.197491] ------------[ cut here ]------------
      [    1.197513] WARNING: CPU: 0 PID: 1 at ../drivers/dma/mv_xor.c:664 mv_xor_interrupt_handler+0x14c/0x170()
      
      See also:
      
        http://storage.kernelci.org/next/next-20150617/arm-mvebu_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y/lab-khilman/boot-armada-xp-openblocks-ax3-4.txtSigned-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Fixes: 6f166312 ("dmaengine: mv_xor: add support for a38x command in descriptor mode")
      Reviewed-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      0ec9ebc7
    • R
      dmaengine: xgene-dma: Fix the resource map to handle overlapping · cda8e937
      Rameshwar Prasad Sahu 提交于
      There is an overlap in dma ring cmd csr region due to sharing of ethernet
      ring cmd csr region. This patch fix the resource overlapping by mapping
      the entire dma ring cmd csr region.
      Signed-off-by: NRameshwar Prasad Sahu <rsahu@apm.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      cda8e937
    • C
      dmaengine: at_xdmac: fix transfer data width in at_xdmac_prep_slave_sg() · 1c8a38b1
      Cyrille Pitchen 提交于
      This patch adds the missing update of the transfer data width in
      at_xdmac_prep_slave_sg().
      
      Indeed, for each item in the scatter-gather list, we check whether the
      transfer length is aligned with the data width provided by
      dmaengine_slave_config(). If so, we directly use this data width for the
      current part of the transfer we are preparing. Otherwise, the data width
      is reduced to 8 bits (1 byte). Of course, the actual number of register
      accesses must also be updated to match the new data width.
      
      So one chunk was missing in the original patch (see Fixes tag below): the
      number of register accesses was correctly set to (len >> fixed_dwidth) in
      mbr_ubc but the real data width was not updated in mbr_cfg. Since mbr_cfg
      may change for each part of the scatter-gather transfer this also explains
      why the original patch used the Descriptor View 2 instead of the
      Descriptor View 1.
      
      Let's take the example of a DMA transfer to write 8bit data into an Atmel
      USART with FIFOs. When FIFOs are enabled in the USART, its Transmit
      Holding Register (THR) works in multidata mode, that is to say that up to
      4 8bit data can be written into the THR in a single 32bit access and it is
      still possible to write only one data with a 8bit access. To take
      advantage of this new feature, the DMA driver was modified to allow
      multiple dwidths when doing slave transfers.
      For instance, when the total length is 22 bytes, the USART driver splits
      the transfer into 2 parts:
      
      First part: 20 bytes transferred through 5 32bit writes into THR
      Second part: 2 bytes transferred though 2 8bit writes into THR
      
      For the second part, the data width was first set to 4_BYTES by the USART
      driver thanks to dmaengine_slave_config() then at_xdmac_prep_slave_sg()
      reduces this data width to 1_BYTE because the 2 byte length is not aligned
      with the original 4_BYTES data width. Since the data width is modified,
      the actual number of writes into THR must be set accordingly.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Fixes: 6d3a7d9e ("dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers")
      Cc: stable@vger.kernel.org #4.0 and later
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      1c8a38b1
    • C
      dmaengine: at_hdmac: fix residue computation · 93dce3a6
      Cyrille Pitchen 提交于
      As claimed by the programmer datasheet and confirmed by the IP designer,
      the Block Transfer Size (BTSIZE) bitfield of the Channel x Control A
      Register (CTRLAx) always refers to a number of Source Width (SRC_WIDTH)
      transfers.
      
      Both the SRC_WIDTH and BTSIZE bitfields can be extacted from the CTRLAx
      register to compute the DMA residue. So the 'tx_width' field is useless
      and can be removed from the struct at_desc.
      
      Before this patch, atc_prep_slave_sg() was not consistent: BTSIZE was
      correctly initialized according to the SRC_WIDTH but 'tx_width' was always
      set to reg_width, which was incorrect for MEM_TO_DEV transfers. It led to
      bad DMA residue when 'tx_width' != SRC_WIDTH.
      
      Also the 'tx_width' field was mostly set only in the first and last
      descriptors. Depending on the kind of DMA transfer, this field remained
      uninitialized for intermediate descriptors. The accurate DMA residue was
      computed only when the currently processed descriptor was the first or the
      last of the chain. This algorithm was a little bit odd. An accurate DMA
      residue can always be computed using the SRC_WIDTH and BTSIZE bitfields
      in the CTRLAx register.
      
      Finally, the test to check whether the currently processed descriptor is
      the last of the chain was wrong: for cyclic transfer, last_desc->lli.dscr
      is NOT equal to zero, since set_desc_eol() is never called, but logically
      equal to first_desc->txd.phys. This bug has a side effect on the
      drivers/tty/serial/atmel_serial.c driver, which uses cyclic DMA transfer
      to receive data. Since the DMA residue was wrong each time the DMA
      transfer reaches the second (and last) period of the transfer, no more
      data were received by the USART driver till the cyclic DMA transfer loops
      back to the first period.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: NTorsten Fleischer <torfl6749@gmail.com>
      Tested-by: NJirí Prchal <jiri.prchal@aksignal.cz>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      93dce3a6
    • L
      dmaengine: at_xdmac: fix bug about channel configuration · 20cadcb4
      Ludovic Desroches 提交于
      When using descriptor view 2 or higher, we don't write the configuration
      into AT_XDMAC_CC register because this configuration will be fetch from
      the descriptor. Unfortunately, the PROT bit is not updated with this
      method, we have to do it manually before enabling the channel.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      20cadcb4
    • J
      iommu/amd: Allow non-ATS devices in IOMMUv2 domains · 1c1cc454
      Joerg Roedel 提交于
      With the grouping of multi-function devices a non-ATS
      capable device might also end up in the same domain as an
      IOMMUv2 capable device.
      So handle this situation gracefully and don't consider it a
      bug anymore.
      Tested-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      1c1cc454
    • A
      x86/ldt: Make modify_ldt synchronous · 37868fe1
      Andy Lutomirski 提交于
      modify_ldt() has questionable locking and does not synchronize
      threads.  Improve it: redesign the locking and synchronize all
      threads' LDTs using an IPI on all modifications.
      
      This will dramatically slow down modify_ldt in multithreaded
      programs, but there shouldn't be any multithreaded programs that
      care about modify_ldt's performance in the first place.
      
      This fixes some fallout from the CVE-2015-5157 fixes.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Reviewed-by: NBorislav Petkov <bp@suse.de>
      Cc: Andrew Cooper <andrew.cooper3@citrix.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jan Beulich <jbeulich@suse.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: security@kernel.org <security@kernel.org>
      Cc: <stable@vger.kernel.org>
      Cc: xen-devel <xen-devel@lists.xen.org>
      Link: http://lkml.kernel.org/r/4c6978476782160600471bd865b318db34c7b628.1438291540.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      37868fe1