Commit graph

380724 commits

Author SHA1 Message Date
Alex Shi a9dc5d0e33 sched: Change get_rq_runnable_load() to static and inline
Based-on-patch-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alex Shi <alex.shi@intel.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-14-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:44 +02:00
Alex Shi a9cef46a10 sched/tg: Remove tg.load_weight
Since no one use it.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-13-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:43 +02:00
Alex Shi 2509940fd7 sched/cfs_rq: Change atomic64_t removed_load to atomic_long_t
Similar to runnable_load_avg, blocked_load_avg variable, long type is
enough for removed_load in 64 bit or 32 bit machine.

Then we avoid the expensive atomic64 operations on 32 bit machine.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-12-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:41 +02:00
Alex Shi bf5b986ed4 sched/tg: Use 'unsigned long' for load variable in task group
Since tg->load_avg is smaller than tg->load_weight, we don't need a
atomic64_t variable for load_avg in 32 bit machine.
The same reason for cfs_rq->tg_load_contrib.

The atomic_long_t/unsigned long variable type are more efficient and
convenience for them.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-11-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:40 +02:00
Alex Shi 72a4cf20cb sched: Change cfs_rq load avg to unsigned long
Since the 'u64 runnable_load_avg, blocked_load_avg' in cfs_rq struct are
smaller than 'unsigned long' cfs_rq->load.weight. We don't need u64
vaiables to describe them. unsigned long is more efficient and convenience.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-10-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:38 +02:00
Alex Shi a003a25b22 sched: Consider runnable load average in move_tasks()
Aside from using runnable load average in background, move_tasks is
also the key function in load balance. We need consider the runnable
load average in it in order to make it an apple to apple load
comparison.

Morten had caught a div u64 bug on ARM, thanks!

Thanks-to: Morten Rasmussen <morten.rasmussen@arm.com>
Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-8-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:36 +02:00
Alex Shi b92486cbf2 sched: Compute runnable load avg in cpu_load and cpu_avg_load_per_task
They are the base values in load balance, update them with rq runnable
load average, then the load balance will consider runnable load avg
naturally.

We also try to include the blocked_load_avg as cpu load in balancing,
but that cause kbuild performance drop 6% on every Intel machine, and
aim7/oltp drop on some of 4 CPU sockets machines.
Or only add blocked_load_avg into get_rq_runable_load, hackbench still
drop a little on NHM EX.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-7-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:35 +02:00
Alex Shi 83dfd5235e sched: Update cpu load after task_tick
To get the latest runnable info, we need do this cpuload update after
task_tick.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-6-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:33 +02:00
Alex Shi 282cf499f0 sched: Fix sleep time double accounting in enqueue entity
The woken migrated task will __synchronize_entity_decay(se); in
migrate_task_rq_fair, then it needs to set
`se->avg.last_runnable_update -= (-se->avg.decay_count) << 20' before
update_entity_load_avg, in order to avoid sleep time is updated twice
for se.avg.load_avg_contrib in both __syncchronize and
update_entity_load_avg.

However if the sleeping task is woken up from the same cpu, it miss
the last_runnable_update before update_entity_load_avg(se, 0, 1), then
the sleep time was used twice in both functions.  So we need to remove
the double sleep time accounting.

Paul also contributed some code comments in this commit.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-5-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:32 +02:00
Alex Shi a75cdaa915 sched: Set an initial value of runnable avg for new forked task
We need to initialize the se.avg.{decay_count, load_avg_contrib} for a
new forked task. Otherwise random values of above variables cause a
mess when a new task is enqueued:

    enqueue_task_fair
        enqueue_entity
            enqueue_entity_load_avg

and make fork balancing imbalance due to incorrect load_avg_contrib.

Further more, Morten Rasmussen notice some tasks were not launched at
once after created. So Paul and Peter suggest giving a start value for
new task runnable avg time same as sched_slice().

PeterZ said:

> So the 'problem' is that our running avg is a 'floating' average; ie. it
> decays with time. Now we have to guess about the future of our newly
> spawned task -- something that is nigh impossible seeing these CPU
> vendors keep refusing to implement the crystal ball instruction.
>
> So there's two asymptotic cases we want to deal well with; 1) the case
> where the newly spawned program will be 'nearly' idle for its lifetime;
> and 2) the case where its cpu-bound.
>
> Since we have to guess, we'll go for worst case and assume its
> cpu-bound; now we don't want to make the avg so heavy adjusting to the
> near-idle case takes forever. We want to be able to quickly adjust and
> lower our running avg.
>
> Now we also don't want to make our avg too light, such that it gets
> decremented just for the new task not having had a chance to run yet --
> even if when it would run, it would be more cpu-bound than not.
>
> So what we do is we make the initial avg of the same duration as that we
> guess it takes to run each task on the system at least once -- aka
> sched_slice().
>
> Of course we can defeat this with wakeup/fork bombs, but in the 'normal'
> case it should be good enough.

Paul also contributed most of the code comments in this commit.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Reviewed-by: Paul Turner <pjt@google.com>
[peterz; added explanation of sched_slice() usage]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-4-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:30 +02:00
Alex Shi fa6bddeb14 sched: Move a few runnable tg variables into CONFIG_SMP
The following 2 variables are only used under CONFIG_SMP, so its
better to move their definiation into CONFIG_SMP too.

        atomic64_t load_avg;
        atomic_t runnable_avg;

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-3-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:29 +02:00
Alex Shi 141965c749 Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"
Remove CONFIG_FAIR_GROUP_SCHED that covers the runnable info, then
we can use runnable load variables.

Also remove 2 CONFIG_FAIR_GROUP_SCHED setting which is not in reverted
patch(introduced in 9ee474f), but also need to revert.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/51CA76A3.3050207@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-27 10:07:22 +02:00
James Bottomley a9e94ec350 This patch fixes a critical bug that was introduced in 3.9
related to VLAN tagging FCoE frames.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyfSGAAoJEEajxTw9cn4HezEP/3wE3j+Ra+3OcH5hQhFdViLZ
 MWzxZ+p3R115OlkPMl2RAcvNfkaBywsfGoBIN2zJWCmlfYwFgHp6XXiLE3NBbRxb
 BZDNoiUO2Gr5fkWdS+IopAhyQaM1uaJFmDgoRATCe8+0m7i8yD7VI6lnKtnJ12RR
 dJUZbRChvzvWfNFNHx4fi+8qPupBj9ahHqtisbbyoP34ZuljTPzlcUrl5AldkHL1
 RsklezD9ENwSCDlP0OAoTXLf6RYfVhaNvUVWOFrCg+VXI+LFEi+Nl0WX271axH3T
 r7LqaDfX9TVRHZ1o37HwsZ/ic1eLQDaRIR1lmAB6ksF+WIohIcCic6SsNbmIux4D
 3TybtbTrqT9/3EOg4YQxwnx8ppaHXdWDCk6BAfg7pJsLmFAr+DwVfHifEypqYExU
 T+QPScCXqqXHp/ziAdVSx2ft8Pzm8BWzWEaNm0IN74nbjd+GpBbQ8Lq3yaoSOlij
 PxxSDzrSmFr7EImcwrqcaxru86rKTgvufjeakxTQ73GJKvYcXrGsnvT5K7iPlt06
 IZjIHpfa6U+OFL5Ah8k2QvQ7xcl7AzgmFIORMxXCtYmdweu/6Ite+3NffgcrapZo
 0sFHxE7vCrMk20Us05SSpOzML3TMYBptmU5MsnbhLl+gcMmSVLZA8lq2QUDTfSQO
 /ARHI2Gm7EYDjDU21mZk
 =Sbz8
 -----END PGP SIGNATURE-----

Merge tag 'fcoe1' into fixes

This patch fixes a critical bug that was introduced in 3.9
related to VLAN tagging FCoE frames.
2013-06-26 23:08:22 -07:00
James Bottomley 36a279686b 3.10 fixes
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRm7ALAAoJEEajxTw9cn4Hv0wP/2N8BJUYhzPguRS+d0GrFDD6
 Zdhwyul+uZobqFVgqM9yZR/zF2R49vmd9cWfM+PKVXZkm1mPD2HNmCHsoj74MfTH
 NFellPnDtr2WPLeIEYSwhuSws01UvahZM8nAJlU988U1TgU6Ztr70xy3u0I7Duw9
 07ou4Dw8+BLh1nMVbXHzKP02h0pu4oyB01e1EponGpDBvsEMjgi0gMd4IH4LboUz
 hkvsmHcjTh13W4Byx3xp7aSDxSI7bTU7iss7UAnqI8G59d7y6GFMD82ar/mwVp8T
 TilJzYEGO1cQaIq7yYhcH5ZoqLPYXvoi6uVWkXG7Kex5/kt6woi6SN8as9XoQ3cg
 stl83VLbnNXQl68xWvRyfFXTsvukVqqk3ZDpOLYvWai7OyBOjjPeTwHU4tjZWCva
 d/uq3LF9zf+BDZFin3Iw4VY6J/qLARamUXi8b6TMYO3ScCnFk9rmMhJ7Av9b7for
 sQSeeIVmbxEn+8hRSqXQAEUGJ3mchEkcX6s3h2aNz/cGtWCweNe05ykROtLRDggK
 JrnHicsDZyKpv5g+UWX5qQQrL4xLc2VV2F6wtgcmNkyhc9M9/OS/RgIvXfv3j5bh
 TRrEymsQ/99R/XYnVy/OVPNSCyfa3FIWrrW2cD4/RjgIJnD326IgKzp42bYJIeBj
 u0sNqarvvO0BBbjsuij3
 =+dRk
 -----END PGP SIGNATURE-----

Merge tag 'fcoe' into fixes

3.10 fixes
2013-06-26 23:07:53 -07:00
Linus Torvalds 98b6ed0f2b Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Found via trinity:

    If you connect up an ipv6 socket to an ipv4 mapped address then an
    ipv6 one, sendmsg() can croak because ip6_sk_dst_check() assumes the
    route cached in the socket is an ipv6 one.  In this case there is an
    ipv4 route attached, so it gets stomped on.

    Reported by Dave Jones and Hannes Frederic Sowa, fixed by Eric
    Dumazet.

 2) AF_KEY notifications leak some kernel memory to userspace, fix from
    Mathias Krause.

 3) DLCI calls __dev_get_by_name() without proper locking, and dlci_del
    doesn't validate that the device being deleted is actually a DLCI
    one.  Fixes from Li Zefan.

 4) Length check on bluetooth l2cap information responses is wrong, each
    response type has a different lenth, so we should make sure it's in
    a given range rather than enforce one single valid length.  From
    Jaganath Kanakkassery.

 5) Receive FIFO overflow is really easy to trigger in stress scenerios
    in the sh_eth driver, but the event isn't being handled properly at
    all.  Specifically, the mask of error interrupts doesn't include the
    event so we never clear it, resulting in the driver becomming wedged
    processing an interrupt that never gets cleared.

    Fix from Sergei Shtylyov.

 6) qlcnic sleeps while holding a spinlock, use mdelay() instead of
    msleep().  From Shahed Shaikh.

 7) Missing curly braces causes SIP netfilter NAT module to always drop
    packets.  Fix from Balazs Peter Odor.

 8) ipt_ULOG in netfilter passes the wrong value to timer setup, causing
    the timer to dereference crap when it fires.  Fix from Gao Feng.

 9) Missing RCU protection around txq->axq_acq traversal in
    ath_txq_schedule().  Fix from Felix Fietkau.

10) Idle state transition test in ath9k_htc_config() is reversed, fix
    from Sujith Manoharan.

11) IPV6 forwarding handles unicast Router Alert packets incorrectly.
    It tests the wrong option state.  Previously opt->ra being non-zero
    indicated a router alert marking in the SKB, but now it's indicated
    by a bit in opt->flags.  Fix from YOSHIFUJI Hideaki.

12) SKB leak in GRE tunnel GSO handling, from Eric Dumazet.

13) get_user_pages_fast() error handling in TUN and MACVTAP use the same
    local variable for the base index and the loop iterator for page
    traversal, oops! Fix from Michael S Tsirkin.

14) ipv6_get_lladdr() can fail, and we must therefore check it's return
    value in inet6_set_iftoken().  For from Hannes Frederic Sowa.

15) If you change an interface name and meanwhile can sneak in something
    that looks up the name (like SO_BINDTODEVICE or SIOCGIFNAME) we can
    deadlock with CONFIG_PREEMPT=n.  Fix this by providing a helper
    function that properly uses raw_seqcount_begin().  From Nicolas
    Schichan.

16) Chain noise calibration test is inverted in iwlwifi, fix from
    Nikolay Martynov.

17) Properly set TX iwlwifi descriptor flags for back requests.  Fix
    from Emmanuel Grumbach.

18) We can't assume skb_transport_header() is set in xt_TCPOPTSTRAP
    module, fix from Pablo Neira Ayuso.

19) Some crummy APs don't provide the proper High Throughput info in
    association response frames.  Add a workaround by assume we'll use
    whatever is in the beacon/probe.  Fix from Johannes Berg.

20) mac80211 call to rate_idx_match_mask() swaps two arguments (mask and
    channel width).  Fix from Simon Wunderlich.

21) xt_TCPMSS (like xt_TCPOPTSTRAP) must not try to handle fragmented
    frames.  Fix from Phil Oester.

22) Fix rate control regression causing iwlwifi/iwlegacy chips to use
    1Mbit/s on pre-11n networks.  From Moshe Benji and Stanslaw Gruszka.

23) Disable brcmsmac power-save functions, they cause regressions.  From
    Arend van Spriel.

24) Enforce a sane minimum MTU in l2cap_build_cmd() otherwise we can
    easily crash.  Fix from Anderson Lizardo.

25) If a learning packet arrives during vxlan_stop() we crash, easily
    fixed by checking netif_running().  From Stephen Hemminger.

26) Static vxlan FDB entries should not be migrated, also from Stephen.

27) skb_clone() failures not handled in vxlan_xmit(), oops.  Also from
    Stephen.

28) Add minimal driver for AR816x/AR817x ethernet chips, from Johannes
    Berg.

29) Fix regression in userspace VLAN acceleration control, added by the
    802.1ad support changes.  Fix from Fernando Luis Vazquez Cao.

30) Interval selection for MLD queries in the bridging code was
    reversed.  Fix from Linus Lüssing.

31) ipv6's ndisc_send_redirect() erroneously writes to the packet we
    received not the packet we are building to send out.  Fix from
    Matthias Schiffer.

32) Don't free netdev before unregistering it, in usb_8dev can driver.
    From Marc Kleine-Budde.

33) Fix nl80211 attribute buffer races, from Johannes Berg.

34) Although netlink_diag.h is under uapi/ it isn't present in Kbuild.
    From Stephen Hemminger.

35) Wrong address and family passed to MD5 key lookups in TCP, from
    Aydin Arik.

36) phy_type attribute created by SFC driver should not be writable.
    From Ben Hutchings.

37) Receive/Transmit queue allocations in pxa168_eth and mv643xx_eth
    should use kzalloc().  Otherwise if setup fails half-way, we'll
    dereference garbage when trying to teardown the rings.  From Lubomir
    Rintel.

38) Fix double-allocation of dst (resulting in unfreeable net device) in
    ipv6's init_loopback().  From Gao Feng.

39) Fix fragmentation handling SKB leak in netfilter conntrack, we were
    freeing the wrong skb pointer.  From Phil Oester.

40) Don't report "-1" (SPEED_UNKNOWN) in bond_miimon_commit(), from
    Nikolay Aleksandrov.

41) davinci_cpdma doesn't check for DMA mapping errors, letting the
    device scribble to random addresses.  From Sebastian Siewior.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits)
  dlci: validate the net device in dlci_del()
  dlci: acquire rtnl_lock before calling __dev_get_by_name()
  af_key: fix info leaks in notify messages
  ipv6: ip6_sk_dst_check() must not assume ipv6 dst
  net: fix kernel deadlock with interface rename and netdev name retrieval.
  net/tg3: Avoid delay during MMIO access
  ipv6: check return value of ipv6_get_lladdr
  macvtap: fix recovery from gup errors
  tun: fix recovery from gup errors
  gre: fix a possible skb leak
  ipv6: Process unicast packet with Router Alert by checking flag in skb.
  ath9k_htc: Handle IDLE state transition properly
  ath9k: fix an RCU issue in calling ieee80211_get_tx_rates
  netfilter: ipt_ULOG: fix incorrect setting of ulog timer
  netfilter: ctnetlink: send event when conntrack label was modified
  netfilter: nf_nat_sip: fix mangling
  qlcnic: Do not sleep while holding spinlock
  drivers: net: cpsw: fix compilation error with cpsw driver
  tcp: doc : fix the syncookies default value
  sh_eth: fix misreporting of transmit abort
  ...
2013-06-26 19:24:37 -10:00
Linus Torvalds 1a506e4735 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull i915 drm fixes from Dave Airlie:
 "These should be the last two fixes for i915, one is for a fence leak
  killing X on some older GPUs, and one is a late regression partial
  revert for an swiotlb/xen/i915 interaction, Konrad has promised to
  figure out the proper answer, and this patch is the best thing to do
  at this stage to avoid regressing"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.
  drm/i915: Restore fences after resume and GPU resets
2013-06-26 19:23:15 -10:00
Zefan Li 578a1310f2 dlci: validate the net device in dlci_del()
We triggered an oops while running trinity with 3.4 kernel:

BUG: unable to handle kernel paging request at 0000000100000d07
IP: [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
PGD 640c0d067 PUD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 3
...
Pid: 7302, comm: trinity-child3 Not tainted 3.4.24.09+ 40 Huawei Technologies Co., Ltd. Tecal RH2285          /BC11BTSA
RIP: 0010:[<ffffffffa0109738>]  [<ffffffffa0109738>] dlci_ioctl+0xd8/0x2d4 [dlci]
...
Call Trace:
  [<ffffffff8137c5c3>] sock_ioctl+0x153/0x280
  [<ffffffff81195494>] do_vfs_ioctl+0xa4/0x5e0
  [<ffffffff8118354a>] ? fget_light+0x3ea/0x490
  [<ffffffff81195a1f>] sys_ioctl+0x4f/0x80
  [<ffffffff81478b69>] system_call_fastpath+0x16/0x1b
...

It's because the net device is not a dlci device.

Reported-by: Li Jinyue <lijinyue@huawei.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26 15:36:42 -07:00
Zefan Li 11eb2645cb dlci: acquire rtnl_lock before calling __dev_get_by_name()
Otherwise the net device returned can be freed at anytime.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26 15:36:42 -07:00
Mathias Krause a5cc68f3d6 af_key: fix info leaks in notify messages
key_notify_sa_flush() and key_notify_policy_flush() miss to initialize
the sadb_msg_reserved member of the broadcasted message and thereby
leak 2 bytes of heap memory to listeners. Fix that.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26 15:15:54 -07:00
Eric Dumazet a963a37d38 ipv6: ip6_sk_dst_check() must not assume ipv6 dst
It's possible to use AF_INET6 sockets and to connect to an IPv4
destination. After this, socket dst cache is a pointer to a rtable,
not rt6_info.

ip6_sk_dst_check() should check the socket dst cache is IPv6, or else
various corruptions/crashes can happen.

Dave Jones can reproduce immediate crash with
trinity -q -l off -n -c sendmsg -c connect

With help from Hannes Frederic Sowa

Reported-by: Dave Jones <davej@redhat.com>
Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26 15:13:47 -07:00
Jacob Shin 9608d33b82 x86, microcode, amd: Another early loading fixup
commit cd1c32ca96 is an early premature
rendition of the patch. Augment it with this delta patch to:
  * correctly mark offset and size of the matching bin file
  * use __pa instead of __pa_nodebug during AP load
  * check for !initrd_start before using it

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/20130620152414.GA6676@jshin-Toonie
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-06-26 14:55:37 -07:00
Nicolas Schichan 5dbe7c178d net: fix kernel deadlock with interface rename and netdev name retrieval.
When the kernel (compiled with CONFIG_PREEMPT=n) is performing the
rename of a network interface, it can end up waiting for a workqueue
to complete. If userland is able to invoke a SIOCGIFNAME ioctl or a
SO_BINDTODEVICE getsockopt in between, the kernel will deadlock due to
the fact that read_secklock_begin() will spin forever waiting for the
writer process (the one doing the interface rename) to update the
devnet_rename_seq sequence.

This patch fixes the problem by adding a helper (netdev_get_name())
and using it in the code handling the SIOCGIFNAME ioctl and
SO_BINDTODEVICE setsockopt.

The netdev_get_name() helper uses raw_seqcount_begin() to avoid
spinning forever, waiting for devnet_rename_seq->sequence to become
even. cond_resched() is used in the contended case, before retrying
the access to give the writer process a chance to finish.

The use of raw_seqcount_begin() will incur some unneeded work in the
reader process in the contended case, but this is better than
deadlocking the system.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26 13:42:54 -07:00
Stephane Eranian 983433b581 perf/x86: Disable PEBS-LL in intel_pmu_pebs_disable()
Make sure intel_pmu_pebs_disable() and intel_pmu_pebs_enable()
are symmetrical w.r.t. PEBS-LL and precise store.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371824448-7306-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 21:58:51 +02:00
Stephane Eranian 2f7f73a520 perf/x86: Fix shared register mutual exclusion enforcement
This patch fixes a problem with the shared registers mutual
exclusion code and incremental event scheduling by the
generic perf_event code.

There was a bug whereby the mutual exclusion on the shared
registers was not enforced because of incremental scheduling
abort due to event constraints. As an example on Intel
Nehalem, consider the following events:

group1= L1D_CACHE_LD:E_STATE,OFFCORE_RESPONSE_0:PF_RFO,L1D_CACHE_LD:I_STATE
group2= L1D_CACHE_LD:I_STATE

The L1D_CACHE_LD event can only be measured by 2 counters. Yet, there
are 3 instances here. The first group can be scheduled and is committed.
Then, the generic code tries to schedule group2 and this fails (because
there is no more counter to support the 3rd instance of L1D_CACHE_LD).
But in x86_schedule_events() error path, put_event_contraints() is invoked
on ALL the events and not just the ones that just failed. That causes the
"lock" on the shared offcore_response MSR to be released. Yet the first group
is actually scheduled and is exposed to reprogramming of that shared msr by
the sibling HT thread. In other words, there is no guarantee on what is
measured.

This patch fixes the problem by tagging committed events with the
PERF_X86_EVENT_COMMITTED tag. In the error path of x86_schedule_events(),
only the events NOT tagged have their constraint released. The tag
is eventually removed when the event in descheduled.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130620164254.GA3556@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 21:58:49 +02:00
Linus Torvalds 34a0868183 regulator: Fix module loading for tps6586x
A simple one liner fix to make module loading work for distros (product
 specific kernels tend to have things built in).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRywmMAAoJELSic+t+oim9gkgP/jcubLPg/SxW9Z3BOod7fFhm
 y0YjVKd1t36bwA8ZvyKQZTkvCHQHRFXmGtzINYzIsz+Hu1vmdIGi2GAsG8t+6ikY
 q56+f/Dvsy7GeGs03bYXrJZMoUP82IaVFV/X9qv0MPAlBPJiSvg/H1BU/pdhXXYJ
 fjHETay4XKXCUhe2l93yXyl5k+bDc/bey8k7eNcv8LxZKDwu6IUyZuHUzZOpXMhp
 4D9OWkHozX1mw/7dFr3ZFoEXHm2YM7BnrfAD7nu8JXoTmrIfBhItR1ksdxMT7Q98
 Q0hWMqR+wXGuw6wRvmM/1nfPvO+YXD2RqO2jmBLRqkiguwKfKn3FsZsFqgqIdZsA
 MpfS47zmr4r56yZBtMXWLe4nRiJ94C+EtePJWiSrnzYxn/10udwEJA8iT99mKCT2
 4wU3XqWfm+ve9+pZBcLDW4Kb/G/1clBVovrVYlemqefKjj2FE3PzImtWOUdLyWvG
 EgjsWQIYonJ6TmOvx8EC9tAcyiQE/tzf7Hp21bz7l9fcbpydfGRPqasChylcswta
 T75x0tlQg9Tm6YrvvDUwjMfkLZIQiXnV00Ts3rZrR6Hd2uqKx9LIY3+7I773WPyo
 igYZdt2pgVhH7AHOrj/Y66dNTicwMk8PR3UvJr1h7ac6H+nJE1ChHSpPB6vAhNWJ
 HPxWKF4mGGKxOVAav3ev
 =MFf4
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "Fix module loading for tps6586x.

  A simple one liner fix to make module loading work for distros
  (product specific kernels tend to have things built in)"

* tag 'regulator-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  mfd: tps6586x: correct device name of the regulator cell
2013-06-26 09:18:37 -10:00
Linus Torvalds 6b935ca295 Fix for omap1 GPIO breaking regression
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyrXkAAoJEEFnBt12D9kBcPsQAIeDYC7zC1bkNFlm7JyJon0c
 3vfHwBo0ioDw9Pqej8CLuKr/WgND5Gke4fEi5hj8SKdvw7NNSPgWSccDAIclWP40
 qGxGuhCpJ5+13L2ll0b7BcBmaInh/q2VmPGD3LfpG8W9nQl6oIEacJ81815dTTTc
 LOJz2p8tzzf49yj9pcZBKWMaqo+1nb4h8aEYi6vbkvSmWOmRrgO17JVluxpLe2Ij
 qG68OsXMZhIYDJ7TAnx4oBAcMyKnTEhyo9mr30FVytFsLcdbS6+Um9/xeVjQ+AjY
 bGrmg+XDdBXPEqzSKR3ZZKgBttYhvsGCOqXcqh582yk0bBMDkqGa5WqkeFddR5oe
 AZ+7cUlfcojs2z/Xo/Qbwj64VFh/dL8SIuX05GTWzy2F6OFTyx/i5Yfg1CK2z/fZ
 XVFxTMjVDfCsy1fz64Zhs3PsSPjXDzQ3NDEqTodiizUswcw1rvrAuuS7DD8WumwE
 eLRC6QHBylRsLPVShNmStIuXx3M4rpFKDlKMidb4TOYCxPAj8EWBt33PLrNkGAM7
 A7PS/Q/K2YvRp/hNxKgm2SWa15fA554fIbgqAU4EAQGDEfDNTO/stNl7tynVmBsh
 i7qwJIvh77158adyJMxTsDldmO2ONgA9snM1LM7rABo81sDt3y6FngnaujA2faje
 KnnXvAP9O7UzaGLF67+5
 =Z12u
 -----END PGP SIGNATURE-----

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux

Pull GPIO regression fix from Grant Likely:
 "It took a while to work out the correct solution to this regression.
  It is sorted now.  This branch was constructed and tested by Tony.
  I've verified that it builds and signed the tag"

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
  gpio/omap: don't use linear domain mapping for OMAP1
2013-06-26 09:08:58 -10:00
Linus Torvalds 687058aed4 Late power management and ACPI fixes for 3.10
- Fix for an ACPI dock regression introduced by the recent rework of
   the ACPI-based PCI hotplug code (acpiphp) that caused it to be
   initialized before the ACPI dock driver from Jiang Liu.
 
 - Fix for PCI resources allocation in the ACPI-based PCI hotplug code
   (acpiphp) that makes it use the same PCI resources assignment rules
   during runtime hotplug that are used during boot from Jiang Liu.
 
 - Fix for ordering and synchronization issues during hot-removal of
   PCI devices on docking stations from Rafael J Wysocki.
 
 - Fix for a regression that removed the code to register a hotplug
   notificaion handler for for ATA ports/devices inadvertently from
   Aaron Lu.
 
 - Fix for a recent cpufreq regression causing a NULL pointer
   dereference to trigger in od_set_powersave_bias() in some
   situations from Jacob Shin.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyuC3AAoJEKhOf7ml8uNsOFkP/ROHM2vtBf2PXIH5EQiTKwAz
 Vmy+sUuAeYBsExuObUtvn5KhCgCed8bJxPO2g4SdIC6XZPDIErN4QKJSoeeQFKb6
 4uxOJgZaP6bZ5cOdnTBvWdq679O7aKXUwZzzjzfOsC0d0APURLZhvHRZ31BaH4Yy
 GBZMq5EeY/w+N46h7y/mGDwzj4OcDbceYWGcaQLX0FtNftqnAXdcsDqCjC0UM32J
 2sTAbaTem0nEm2cuzQkIfhBO+ixa/4MTX6a/cWKOxSVM9BMIxvKdQs2WOuZVebRY
 CoOWvj820DpdG9lVs9g8+8LNFtBtiyJMJy6NR9Lwx0f5lLYHJbTp2V8htQDP6TR+
 3HWXzYnwSi0j2FszwXnBS9OUrnnQAywzl8GulCH8vsQKlS+HQCT1K6V6PKPmi4nW
 31DmV6iQPwLTlFhiUBhRov/fsTMT1Ao7iP/HgBYOIQH7zXYaJmIq2X9gdQtybkYS
 IUICjwlSyTcN2XXs6RXCSMJ4+bwLfX5NU3yVJYWu0whyXevpbpmM0A7VHm82njcX
 C4CNSDeGsTH4M36ANO9HJKgciMnJJFua68TomqQJ2FkDCeK1QNbrI+4W8dSs2WNj
 5YY7DFfuUEp8xDoHG3AjizCw0llVAbPmmBa9ox6BZ/jtH9cbdZ/A32K95ECh51oT
 G0QFX+FCN1pC9gb2uKdw
 =QGmL
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.10-late' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull late power management and ACPI fixes from Rafael Wysocki:
 "Sorry about the timing of this, but ACPI-based docking stations with
  PCI devices on them and ATA bays would be hardly usable with 3.10
  without it.  We've been working on these fixes for the last couple of
  weeks and everyone involved appears to be reasonably comfortable with
  them now.

  The PM part is one fix for a cpufreq regression introduced recently

   - Fix for an ACPI dock regression introduced by the recent rework of
     the ACPI-based PCI hotplug code (acpiphp) that caused it to be
     initialized before the ACPI dock driver, which is incorrect (ACPI
     dock has to be initialized before acpiphp so that acpiphp can
     register PCI devices on docking stations with it for PCI hotplug on
     re-dock to work).  From Jiang Liu.

   - Fix for PCI resources allocation in the ACPI-based PCI hotplug code
     (acpiphp) that makes it use the same PCI resources assignment rules
     during runtime hotplug that are used during boot (the BIOS' choices
     are now respected in both cases).  This prevents PCI resource
     allocation failures during hotplug from happening in some cases.
     From Jiang Liu.

   - Fix for ordering and synchronization issues during hot-removal of
     PCI devices on docking stations.  It makes the ACPI dock code carry
     out the PCI devices removal synchronously during undock instead of
     spawning a separate asynchronous work item to remove each of them
     without even bothering to wait for all those work items to
     complete.  The hot-addition part is changed analogously.

   - Fix for a regression (introduced a few releases ago) that removed
     the code to register a hotplug notificaion handler for for ATA
     ports/devices inadvertently which prevented ATA bays hotplug from
     working.  The missing code is added back with some improvements.
     From Aaron Lu.

   - Fix for a recent cpufreq regression causing a NULL pointer
     dereference to trigger in od_set_powersave_bias() in some
     situations from Jacob Shin"

* tag 'pm+acpi-3.10-late' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: fix NULL pointer deference at od_set_powersave_bias()
  libata-acpi: add back ACPI based hotplug functionality
  ACPI / dock / PCI: Synchronous handling of dock events for PCI devices
  PCI / ACPI: Use boot-time resource allocation rules during hotplug
  ACPI / dock: Initialize ACPI dock subsystem upfront
2013-06-26 08:55:03 -10:00
Linus Torvalds 54faf77d06 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "Three small fixlets"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()
  hw_breakpoint: Fix cpu check in task_bp_pinned(cpu)
  kprobes: Fix arch_prepare_kprobe to handle copy insn failures
2013-06-26 08:51:44 -10:00
Linus Torvalds e3ff91143e Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "Another round of ARM fixes.  Largest one is the second half of the
  PJ4B fix which was pushed in the previous -rc - this one was delayed
  because its original caused a build regression while trying to fix a
  regression!

  As ever, noMMU gets forgotten when fixing problems on MMU, so we have
  a noMMU fix for a previous fix included in this set.

  A couple of fixes from Lorenzo for problems with the ARM DT CPU code,
  and a one liner to remove the buggy 'wait for interrupt' with FA526
  cores"

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7773/1: PJ4B: Add support for errata 4742
  ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMU
  ARM: 7763/1: kernel: fix __cpu_logical_map default initialization
  ARM: 7762/1: kernel: fix arm_dt_init_cpu_maps() to skip non-cpu nodes
  ARM: 7760/1: cpu_fa526_do_idle: remove WFI
2013-06-26 08:50:39 -10:00
Linus Torvalds de6e1317f7 This patch fixes a critical bug that was introduced in 3.9
related to VLAN tagging FCoE frames.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyfSGAAoJEEajxTw9cn4HezEP/3wE3j+Ra+3OcH5hQhFdViLZ
 MWzxZ+p3R115OlkPMl2RAcvNfkaBywsfGoBIN2zJWCmlfYwFgHp6XXiLE3NBbRxb
 BZDNoiUO2Gr5fkWdS+IopAhyQaM1uaJFmDgoRATCe8+0m7i8yD7VI6lnKtnJ12RR
 dJUZbRChvzvWfNFNHx4fi+8qPupBj9ahHqtisbbyoP34ZuljTPzlcUrl5AldkHL1
 RsklezD9ENwSCDlP0OAoTXLf6RYfVhaNvUVWOFrCg+VXI+LFEi+Nl0WX271axH3T
 r7LqaDfX9TVRHZ1o37HwsZ/ic1eLQDaRIR1lmAB6ksF+WIohIcCic6SsNbmIux4D
 3TybtbTrqT9/3EOg4YQxwnx8ppaHXdWDCk6BAfg7pJsLmFAr+DwVfHifEypqYExU
 T+QPScCXqqXHp/ziAdVSx2ft8Pzm8BWzWEaNm0IN74nbjd+GpBbQ8Lq3yaoSOlij
 PxxSDzrSmFr7EImcwrqcaxru86rKTgvufjeakxTQ73GJKvYcXrGsnvT5K7iPlt06
 IZjIHpfa6U+OFL5Ah8k2QvQ7xcl7AzgmFIORMxXCtYmdweu/6Ite+3NffgcrapZo
 0sFHxE7vCrMk20Us05SSpOzML3TMYBptmU5MsnbhLl+gcMmSVLZA8lq2QUDTfSQO
 /ARHI2Gm7EYDjDU21mZk
 =Sbz8
 -----END PGP SIGNATURE-----

Merge tag 'critical_fix_for_3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe

Pull FCoE fix from Robert W Love:
 "This patch fixes a critical bug that was introduced in 3.9 related to
  VLAN tagging FCoE frames"

* tag 'critical_fix_for_3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rwlove/fcoe:
  fcoe: Use correct API to set vlan tag for FCoE Ethertype skbs
2013-06-26 08:48:53 -10:00
Linus Torvalds 78750f1908 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fix from Sage Weil:
 "This fixes another problem with using v2 images on 3.10 due to the
  order in which fields are read from the image header.

  Hopefully this is the last one"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: fetch object order before using it
2013-06-26 08:47:46 -10:00
Manjunathappa, Prakash 055cb2a9e0 ARM: davinci: da850: adopt to pinctrl-single change for configuring multiple pins
function-mask DT property is now a mask for a pin at each pin offset
inside a given pincontrol register. Fix DA850 DT data to reflect
this change.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
[nsekhar@ti.com: reword commit message for clarity]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-06-26 23:56:31 +05:30
Jingoo Han b342e64c67 ARM: dts: Add pcie controller node for exynos5440-ssdk5440
This patch adds pcie controller node for exynos5440-ssdk5440,
and also adds a phandle for pin controller node.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:16:31 +02:00
Jingoo Han 406a9324b4 ARM: dts: Add pcie controller node for Samsung EXYNOS5440 SoC
Exynos5440 has two PCIe controllers which can be used as root complex
for PCIe interface.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:16:25 +02:00
Jingoo Han 3f06d15782 ARM: EXYNOS: Enable PCIe support for Exynos5440
Enable PCIe support for Exynos5440 which has two PCIe controllers.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:15:51 +02:00
Jingoo Han 340cba6092 pci: Add PCIe driver for Samsung Exynos
Exynos5440 has a PCIe controller which can be used as Root Complex.
This driver supports a PCIe controller as Root Complex mode.

Signed-off-by: Surendranath Gurivireddy Balla <suren.reddy@samsung.com>
Signed-off-by: Siva Reddy Kallam <siva.kallam@samsung.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Pratyush Anand <pratyush.anand@st.com>
Cc: Mohit KUMAR <Mohit.KUMAR@st.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:14:59 +02:00
Greg Kroah-Hartman 380672698b Revert "char: misc: assign file->private_data in all cases"
This reverts commit 585d98e00b, as it
breaks the FUSE misc driver.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-26 10:12:48 -07:00
Bart Van Assche cfa805f6f1 dlm: Avoid LVB truncation
For lockspaces with an LVB length above 64 bytes, avoid truncating
the LVB while exchanging it with another node in the cluster.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: David Teigland <teigland@redhat.com>
2013-06-26 11:38:02 -05:00
Arnd Bergmann 9686bb66a4 - more SPI DT activation for rm9200
- SPI DMA for at91sam9n12/sama5d3
 And one little fix for SPI compatibility string
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRyqz5AAoJEAf03oE53VmQhbkH/jpF1jLBT6h0m29BQ4MIcpx5
 8TzF75XkB7HeQnZNRgfbfEhhhOqhKvEzp9imOqTUCXN0X7zUjsRWpKeUzYt52PnK
 3fjN+Hb8p1fWmGwD6VuxOp+TDy5LQ8wtl5bq6PDtWCHHB8cueEXv9EJATF4B8geX
 2RSfzorG5ntyxJQNv+/3xBhO02QSkCB2QxgnQUeLRHvI4sddl1qHebNECsvHn4eS
 TlsX1XZP8VjC56Iyx+D6tdqLAhtbA1McYH6cAYDuk6lmr2JRaSiWfTtmP/KIxdQi
 wdomUcngSsVfNVXSTv/dKZX4XeZ6tAul/4177jM6jFY3T2TQetfnLgMMxphHy1A=
 =YgfS
 -----END PGP SIGNATURE-----

Merge tag 'at91-dt' of git://github.com/at91linux/linux-at91 into next/dt

From Nicolas Ferre:

- more SPI DT activation for rm9200
- SPI DMA for at91sam9n12/sama5d3
And one little fix for SPI compatibility string

* tag 'at91-dt' of git://github.com/at91linux/linux-at91:
  ARM: at91: dt: rm9200ek: add spi support
  ARM: at91: dt: rm9200: add spi support
  ARM: at91/DT: at91sam9n12: add SPI DMA client infos
  ARM: at91/DT: sama5d3: add SPI DMA client infos
  ARM: at91/DT: fix SPI compatibility string

Conflicts:
	arch/arm/boot/dts/sama5d3.dtsi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 16:56:24 +02:00
Arnd Bergmann ece585df6e OMAP5: PM: fix boot by removing unneeded dummy voltage domain data
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyjKeAAoJEFk3GJrT+8Zlu50P/RGxbLxptFqmGuHeahIctkMX
 DU6qW5oCC8TAGeXMlHEYqS06xMM8gJYJ0PNDS1iFgXy9xqgvwpQR6XfPHrwZYbon
 cgV5WbynaLq+RvuC3B8D1Q/jQx+D3eH/OoTzjb8yiU8QAEVbn6lRgSMjKZrrlrSv
 hVejObFybfB5wDqApnHq/iV72oXUIoSuZvyOQMHoZD66GrUlIT55nb8rUZAgH9vA
 12t72wXIXeb7LVab/ckt+/boH4QJt/2/+HHYYAAP8CWEF+trQkuMFim565d0YbTi
 DZAD+wMC4/Isgry9pF2Hxg+u94vc598aNokCDWgVCMZJUXhSd+sIp/01gVKbqMIz
 JWy6fP9bA8b94VBSGedybVhuD9elCiJOVw0yGxKedHV5O/bFKHF9p/NIeEtYmtRN
 2V1D4LtZOyI0lEpdKZBf4EJ0bwPdNFMWDAc9Nk6hRhClt4LfxKKGQwKeaI6fkX8M
 6Q20QnJjEJdY5ZZl8Kij6GU/Q07cyf3jzfvajM6opVxqscXhlJ7vAGK4/dbzGWC9
 2PLSoKFsy/zGuSMae2J0La6KHlp9vU4QhhbDE8feFxiDGyVuHYufEb9A+FLRb9b7
 ZI1vWkQd1758xI8mN1GUf3S/V7wFZoEB3MTMr+u69cOiRPP9zBmeaLlN/wUJip+x
 kA1D/1JPb8P6mWV8S3nF
 =lY3O
 -----END PGP SIGNATURE-----

Merge tag 'omap-pm-v3.11/fixes/omap5-voltdm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into next/soc

From Kevin Hilman:

OMAP5: PM: fix boot by removing unneeded dummy voltage domain data

* tag 'omap-pm-v3.11/fixes/omap5-voltdm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm:
  ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 16:52:01 +02:00
Nicolas Ferre bd2da9ca13 ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
We are using this function, now that we have introduced
the support for UTMI clock for computing the USB host rate.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:24:11 +02:00
Nicolas Ferre d04e5b694e ARM: at91/PMC: fix at91sam9n12 USB FS init
at91sam9n12 has Full-speed only USB. So we should add
it to the list in at91_pllb_usbfs_clock_init() function.
Moreover, at91sam9n12 has an unusual PMC in the sense that it
has a PLLB but also has a USB clock register.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:23:18 +02:00
Nicolas Ferre 7319ee0495 ARM: at91/PMC: at91sam9n12 family has a PLLB
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:22:51 +02:00
Nicolas Ferre ed4a2af5fc ARM: at91/PMC: sama5d3 family doesn't have a PLLB
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
2013-06-26 15:22:15 +02:00
Ben Hutchings cb7b80237a x86/platform: Make X86_GOLDFISH depend on X86_EXTENDED_PLATFORM
All non-PC platforms are supposed to be dependent on this
option.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Jun Nakajima <jnakajim@gmail.com>
Link: http://lkml.kernel.org/n/tip-Bcihhqhstm67fchjnkxoiJbu@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 13:28:54 +02:00
Maarten Lankhorst 166989e366 locking-selftests: Handle unexpected failures more strictly
When CONFIG_PROVE_LOCKING is not enabled, more tests are
expected to pass unexpectedly, but there no tests that should
start to fail that pass with CONFIG_PROVE_LOCKING enabled.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 12:10:59 +02:00
Maarten Lankhorst f3cf139efa mutex: Add more w/w tests to test EDEADLK path handling
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113141.4001.54331.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 12:10:58 +02:00
Maarten Lankhorst 2fe3d4b149 mutex: Add more tests to lib/locking-selftest.c
None of the ww_mutex codepaths should be taken in the 'normal'
mutex calls. The easiest way to verify this is by using the
normal mutex calls, and making sure o.ctx is unmodified.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: robclark@gmail.com
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113130.4001.45423.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 12:10:57 +02:00
Maarten Lankhorst 1de994452f mutex: Add w/w tests to lib/locking-selftest.c
This stresses the lockdep code in some ways specifically useful
to ww_mutexes. It adds checks for most of the common locking
errors.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: robclark@gmail.com
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113124.4001.23186.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 12:10:57 +02:00
Daniel Vetter 2301002769 mutex: Add w/w mutex slowpath debugging
Injects EDEADLK conditions at pseudo-random interval, with
exponential backoff up to UINT_MAX (to ensure that every lock
operation still completes in a reasonable time).

This way we can test the wound slowpath even for ww mutex users
where contention is never expected, and the ww deadlock
avoidance algorithm is only needed for correctness against
malicious userspace. An example would be protecting kernel
modesetting properties, which thanks to single-threaded X isn't
really expected to contend, ever.

I've looked into using the CONFIG_FAULT_INJECTION
infrastructure, but decided against it for two reasons:

- EDEADLK handling is mandatory for ww mutex users and should
  never affect the outcome of a syscall. This is in contrast to -ENOMEM
  injection. So fine configurability isn't required.

- The fault injection framework only allows to set a simple
  probability for failure. Now the probability that a ww mutex acquire
  stage with N locks will never complete (due to too many injected
  EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
  operations for the completely uncontended case would be O(exp(N)).
  The per-acuiqire ctx exponential backoff solution choosen here only
  results in O(log N) overhead due to injection and so O(log N * N)
  lock operations. This way we can fail with high probability (and so
  have good test coverage even for fancy backoff and lock acquisition
  paths) without running into patalogical cases.

Note that EDEADLK will only ever be injected when we managed to
acquire the lock. This prevents any behaviour changes for users
which rely on the EALREADY semantics.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-26 12:10:56 +02:00