mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: "David S. Miller" <davem@davemloft.net>,
	Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 3.11 43/46] sparc64: Make sure %pil interrupts are enabled during hypervisor yield.
Date: Wed, 16 Apr 2014 11:31:59 +0100	[thread overview]
Message-ID: <1397644322-13905-44-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1397644322-13905-1-git-send-email-luis.henriques@canonical.com>

3.11.10.8 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: "David S. Miller" <davem@davemloft.net>

commit cb3042d609e30e6144024801c89be3925106752b upstream.

In arch_cpu_idle() we must enable %pil based interrupts before
potentially invoking the hypervisor cpu yield call.

As per the Hypervisor API documentation for cpu_yield:

	Interrupts which are blocked by some mechanism other that
	pstate.ie (for example %pil) are not guaranteed to cause
	a return from this service.

It seems that only first generation Niagara chips are hit by this
bug.  My best guess is that later chips implement this in hardware
and wake up anyways from %pil events, whereas in first generation
chips the yield is implemented completely in hypervisor code and
requires %pil to be enabled in order to wake properly from this
call.

Fixes: 87fa05aeb3a5 ("sparc: Use generic idle loop")
Reported-by: Fabio M. Di Nitto <fabbione@fabbione.net>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Tested-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 arch/sparc/kernel/process_64.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index baebab2..b9cc976 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -57,9 +57,12 @@ void arch_cpu_idle(void)
 {
 	if (tlb_type != hypervisor) {
 		touch_nmi_watchdog();
+		local_irq_enable();
 	} else {
 		unsigned long pstate;
 
+		local_irq_enable();
+
                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
                  * the cpu sleep hypervisor call.
                  */
@@ -81,7 +84,6 @@ void arch_cpu_idle(void)
 			: "=&r" (pstate)
 			: "i" (PSTATE_IE));
 	}
-	local_irq_enable();
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-- 
1.9.1


  parent reply	other threads:[~2014-04-16 10:34 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 10:31 [3.11.y.z extended stable] Linux 3.11.10.8 stable review Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 01/46] Input: cypress_ps2 - don't report as a button pads Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 02/46] netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 03/46] cpufreq: Fix timer/workqueue corruption due to double queueing Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 04/46] futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 05/46] m68k: Skip " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 06/46] powernow-k6: disable cache when changing frequency Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 07/46] powernow-k6: correctly initialize default parameters Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 08/46] powernow-k6: reorder frequencies Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 09/46] selinux: correctly label /proc inodes in use before the policy is loaded Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 10/46] net: fix for a race condition in the inet frag code Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 11/46] net: sctp: fix skb leakage in COOKIE ECHO path of chunk->auth_chunk Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 12/46] bridge: multicast: add sanity check for query source addresses Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 13/46] inet: frag: make sure forced eviction removes all frags Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 14/46] net: unix: non blocking recvmsg() should not return -EINTR Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 15/46] ipv6: Fix exthdrs offload registration Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 16/46] ipv6: don't set DST_NOCOUNT for remotely added routes Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 17/46] vlan: Set correct source MAC address with TX VLAN offload enabled Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 18/46] tcp: tcp_release_cb() should release socket ownership Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 19/46] net: socket: error on a negative msg_namelen Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 20/46] ipv6: Avoid unnecessary temporary addresses being generated Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 21/46] ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 22/46] vxlan: fix potential NULL dereference in arp_reduce() Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 23/46] rtnetlink: fix fdb notification flags Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 24/46] ipmr: fix mfc " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 25/46] ip6mr: " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 26/46] netpoll: fix the skb check in pkt_is_ns Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 27/46] tg3: Do not include vlan acceleration features in vlan_features Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 28/46] usbnet: include wait queue head in device structure Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 29/46] vlan: Set hard_header_len according to available acceleration Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 30/46] vhost: fix total length when packets are too short Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 31/46] vhost: validate vhost_get_vq_desc return value Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 32/46] xen-netback: remove pointless clause from if statement Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 33/46] ipv6: some ipv6 statistic counters failed to disable bh Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 34/46] netlink: don't compare the nul-termination in nla_strcmp Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 35/46] isdnloop: Validate NUL-terminated strings from user Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 36/46] isdnloop: several buffer overflows Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 37/46] rds: prevent dereference of a NULL device in rds_iw_laddr_check Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 38/46] cpuidle: Check the result of cpuidle_get_driver() against NULL Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 39/46] sparc: PCI: Fix incorrect address calculation of PCI Bridge windows on Simba-bridges Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 40/46] Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines." Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 41/46] sparc32: fix build failure for arch_jump_label_transform Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 42/46] sparc64: don't treat 64-bit syscall return codes as 32-bit Luis Henriques
2014-04-16 10:31 ` Luis Henriques [this message]
2014-04-16 10:32 ` [PATCH 3.11 44/46] netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len Luis Henriques
2014-04-16 10:32 ` [PATCH 3.11 45/46] netfilter: Can't fail and free after table replacement Luis Henriques
2014-04-16 10:32 ` [PATCH 3.11 46/46] crypto: ghash-clmulni-intel - use C implementation for setkey() Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397644322-13905-44-git-send-email-luis.henriques@canonical.com \
    --to=luis.henriques@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®