All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Anton Blanchard <anton@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [79/90] powerpc/pseries: Fix kexec on recent firmware versions
Date: Fri, 12 Aug 2011 14:05:04 -0700	[thread overview]
Message-ID: <20110812210559.045366181@clark.kroah.org> (raw)
In-Reply-To: <20110812210626.GA4725@kroah.com>

3.0-stable review patch.  If anyone has any objections, please let us know.

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

From: Anton Blanchard <anton@samba.org>

commit b1301797f30370c430244979671978fc232f4533 upstream.

Recent versions of firmware will fail to unmap the virtual processor
area if we have a dispatch trace log registered. This causes kexec
to fail.

If a trace log is registered this patch unregisters it before the
SLB shadow and virtual processor areas, fixing the problem.

The address argument is ignored by firmware on unregister so we
may as well remove it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/powerpc/platforms/pseries/dtl.c            |    2 +-
 arch/powerpc/platforms/pseries/kexec.c          |   11 +++++++++++
 arch/powerpc/platforms/pseries/plpar_wrappers.h |    4 ++--
 3 files changed, 14 insertions(+), 3 deletions(-)

--- a/arch/powerpc/platforms/pseries/dtl.c
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -181,7 +181,7 @@ static void dtl_stop(struct dtl *dtl)
 
 	lppaca_of(dtl->cpu).dtl_enable_mask = 0x0;
 
-	unregister_dtl(hwcpu, __pa(dtl->buf));
+	unregister_dtl(hwcpu);
 }
 
 static u64 dtl_current_index(struct dtl *dtl)
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -26,6 +26,17 @@ static void pseries_kexec_cpu_down(int c
 	/* Don't risk a hypervisor call if we're crashing */
 	if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
 		unsigned long addr;
+		int ret;
+
+		if (get_lppaca()->dtl_enable_mask) {
+			ret = unregister_dtl(hard_smp_processor_id());
+			if (ret) {
+				pr_err("WARNING: DTL deregistration for cpu "
+				       "%d (hw %d) failed with %d\n",
+				       smp_processor_id(),
+				       hard_smp_processor_id(), ret);
+			}
+		}
 
 		addr = __pa(get_slb_shadow());
 		if (unregister_slb_shadow(hard_smp_processor_id(), addr))
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -73,9 +73,9 @@ static inline long register_slb_shadow(u
 	return vpa_call(0x3, cpu, vpa);
 }
 
-static inline long unregister_dtl(unsigned long cpu, unsigned long vpa)
+static inline long unregister_dtl(unsigned long cpu)
 {
-	return vpa_call(0x6, cpu, vpa);
+	return vpa_call(0x6, cpu, 0);
 }
 
 static inline long register_dtl(unsigned long cpu, unsigned long vpa)



  parent reply	other threads:[~2011-08-14 16:10 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 21:06 [00/90] 3.0.2-stable review Greg KH
2011-08-12 21:03 ` [01/90] cris: fix a build error in kernel/fork.c Greg KH
2011-08-12 21:03 ` [02/90] cris: fix a build error in sync_serial_open() Greg KH
2011-08-12 21:03 ` [03/90] cris: fix the prototype of sync_serial_ioctl() Greg KH
2011-08-12 21:03 ` [04/90] cris: add missing declaration of kgdb_init() and breakpoint() Greg KH
2011-08-12 21:03 ` [05/90] futex: Fix regression with read only mappings Greg KH
2011-08-12 21:03 ` [06/90] [PARISC] wire up sendmmsg syscall Greg KH
2011-08-12 21:03 ` [07/90] [PARISC] Fix futex support Greg KH
2011-08-12 21:03 ` [08/90] [PARISC] fix return type of __atomic64_add_return Greg KH
2011-08-12 21:03 ` [09/90] rt2x00: rt2800: fix zeroing skb structure Greg KH
2011-08-12 21:03 ` [10/90] rt2x00: fix usage of NULL queue Greg KH
2011-08-12 21:03 ` [11/90] rtlwifi: Fix kernel oops on ARM SOC Greg KH
2011-08-12 21:03 ` [12/90] iwlegacy: set tx power after rxon_assoc Greg KH
2011-08-12 21:03 ` [13/90] ath9k: initialize tx chainmask before testing channel tx power values Greg KH
2011-08-12 21:03 ` [14/90] ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabled Greg KH
2011-08-12 21:04 ` [15/90] net: sendmmsg should only return an error if no messages were sent Greg KH
2011-08-12 21:04 ` [16/90] net: Cap number of elements for sendmmsg Greg KH
2011-08-12 21:04 ` [17/90] net: Fix security_socket_sendmsg() bypass problem Greg KH
2011-08-12 21:04 ` [18/90] xen: allow enable use of VGA console on dom0 Greg KH
2011-08-12 21:04 ` [19/90] drm: Separate EDID Header Check from EDID Block Check Greg KH
2011-08-12 21:04 ` [20/90] drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI) Greg KH
2011-08-12 21:04 ` [21/90] drm/radeon: Extended DDC Probing for ECS A740GM-M DVI-D Connector Greg KH
2011-08-12 21:04 ` [22/90] drm/radeon: Log Subsystem Vendor and Device Information Greg KH
2011-08-12 21:04 ` [23/90] drm/i915/pch: Fix integer math bugs in panel fitting Greg KH
2011-08-12 21:04 ` [24/90] drm/i915: load the LUT before pipe enable on ILK+ Greg KH
2011-08-12 21:04 ` [25/90] drm/i915: Fix typo in DRM_I915_OVERLAY_PUT_IMAGE ioctl define Greg KH
2011-08-12 21:04 ` [26/90] drm/i915: Initialize RCS ring status page address in intel_render_ring_init_dri Greg KH
2011-08-12 21:04 ` [27/90] drm/i915: Hold mode_config->mutex during hotplug processing Greg KH
2011-08-12 21:04 ` [28/90] drm/i915: Fixup for Hold mode_config->mutex during hotplug Greg KH
2011-08-12 21:04 ` [29/90] crypto: Move md5_transform to lib/md5.c Greg KH
2011-08-12 21:04 ` [30/90] net: Compute protocol sequence numbers and fragment IDs using MD5 Greg KH
2011-08-12 21:04 ` [31/90] asus-wmi: fix hwmon/pwm1 Greg KH
2011-08-12 21:04 ` [32/90] asus-wmi: return proper value in store_cpufv() Greg KH
2011-08-12 21:04 ` [33/90] CIFS: Fix missing a decrement of inFlight value Greg KH
2011-08-12 21:04 ` [34/90] cifs: cope with negative dentries in cifs_get_root Greg KH
2011-08-12 21:04 ` [35/90] cifs: convert prefixpath delimiters in Greg KH
2011-08-12 21:04 ` [36/90] ASoC: sgtl5000: fix cache handling Greg KH
2011-08-12 21:04 ` [37/90] ALSA: timer - Fix Oops at closing slave timer Greg KH
2011-08-12 21:04 ` [38/90] ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3 Greg KH
2011-08-12 21:04 ` [39/90] ALSA: snd-usb: avoid dividing by zero on invalid input Greg KH
2011-08-12 21:04 ` [40/90] ALSA: snd-usb: operate on given mixer interface only Greg KH
2011-08-12 21:04 ` [41/90] ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with Greg KH
2011-08-12 21:04 ` [42/90] ipv6: make fragment identifications less predictable Greg KH
2011-08-12 21:04 ` [43/90] icmp: Fix regression in nexthop resolution during replies Greg KH
2011-08-12 21:04 ` [44/90] ipv4: Constrain UFO fragment sizes to multiples of 8 bytes Greg KH
2011-08-12 21:04 ` [45/90] ipv4: fix the reusing of routing cache entries Greg KH
2011-08-12 21:04 ` [46/90] IPVS: Free resources on module removal Greg KH
2011-08-12 21:04 ` [47/90] net: adjust array index Greg KH
2011-08-12 21:04 ` [48/90] drivers/net/niu.c: " Greg KH
2011-08-12 21:04 ` [49/90] sch_sfq: fix sfq_enqueue() Greg KH
2011-08-12 21:04 ` [50/90] IPv4: Send gratuitous ARP for secondary IP addresses also Greg KH
2011-08-12 21:04 ` [51/90] net: add IFF_SKB_TX_SHARED flag to priv_flags Greg KH
2011-08-12 21:04 ` [52/90] net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared Greg KH
2011-08-12 21:04 ` [53/90] bonding: fix string comparison errors Greg KH
2011-08-12 21:04 ` [54/90] Fix cdc-phonet build Greg KH
2011-08-12 21:04 ` [55/90] xfrm: Fix key lengths for rfc3686(ctr(aes)) Greg KH
2011-08-12 21:04 ` [56/90] sis190: Rx filter init is needed for MAC address change Greg KH
2011-08-12 21:04 ` [57/90] r8169: Add support for D-Link 530T rev C1 (Kernel Bug 38862) Greg KH
2011-08-12 21:04 ` [58/90] net: allow netif_carrier to be called safely from IRQ Greg KH
2011-08-12 21:04 ` [59/90] ipv4: use RT_TOS after some rt_tos conversions Greg KH
2011-08-12 21:04 ` [60/90] gre: fix improper error handling Greg KH
2011-08-12 21:04 ` [61/90] iwlagn: 5000 do not support idle mode Greg KH
2011-08-12 21:04 ` [62/90] [SCSI] mpt2sas: Fixed Big Indian Issues on 32 bit PPC Greg KH
2011-08-12 21:04 ` [63/90] sparc: Dont leave sparc_pmu_type NULL on sun4v Greg KH
2011-08-12 21:04 ` [64/90] sparc: Add T3 sun4v cpu type and hypervisor group defines Greg KH
2011-08-12 21:04 ` [65/90] sparc: Dont do expensive hypervisor PCR write unless necessary Greg KH
2011-08-12 21:04 ` [66/90] sparc: Detect and handle UltraSPARC-T3 cpu types Greg KH
2011-08-12 21:04 ` [67/90] sparc: Sanitize cpu feature detection and reporting Greg KH
2011-08-12 21:04 ` [68/90] sparc: Minor tweaks to Niagara page copy/clear Greg KH
2011-08-12 21:04 ` [69/90] sparc: Use popc if possible for hweight routines Greg KH
2011-08-12 21:04 ` [70/90] sparc: Use hweight64() in popc emulation Greg KH
2011-08-12 21:04 ` [71/90] sparc: Add some missing hypervisor API groups Greg KH
2011-08-12 21:04 ` [72/90] sparc: Set reboot-cmd using reboot data hypervisor call if available Greg KH
2011-08-12 21:04 ` [73/90] sparc: Use popc when possible for ffs/__ffs/ffz Greg KH
2011-08-12 21:04 ` [74/90] sparc: Access kernel TSB using physical addressing when possible Greg KH
2011-08-12 21:05 ` [75/90] sparc: Size mondo queues more sanely Greg KH
2011-08-12 21:05 ` [76/90] sparc: Fix build with DEBUG_PAGEALLOC enabled Greg KH
2011-08-12 21:05 ` [77/90] Ecryptfs: Add mount option to check uid of device being Greg KH
2011-08-12 21:05 ` [78/90] eCryptfs: Return error when lower file pointer is NULL Greg KH
2011-08-12 21:05 ` Greg KH [this message]
2011-08-12 21:05 ` [80/90] powerpc: Fix device tree claim code Greg KH
2011-08-12 21:05 ` [81/90] powerpc: pseries: Fix kexec on machines with more than 4TB of RAM Greg KH
2011-08-12 21:05 ` [82/90] ext3: Properly count journal credits for long symlinks Greg KH
2011-08-12 21:05 ` [83/90] ext4: " Greg KH
2011-08-12 21:05 ` [84/90] e1000e: alternate MAC address does not work on device id 0x1060 Greg KH
2011-08-12 21:05 ` [85/90] gianfar: fix fiper alignment after resetting the time Greg KH
2011-08-12 21:05 ` [86/90] dp83640: increase receive time stamp buffer size Greg KH
2011-08-12 21:05 ` [87/90] ath9k_hw: Fix incorrect Tx control power in AR9003 template Greg KH
2011-08-12 21:05 ` [88/90] ath9k: fix a misprint which leads to incorrect calibration Greg KH
2011-08-12 21:05 ` [89/90] sparc: Dont do hypervisor calls on non-sun4v in DS driver Greg KH
2011-08-12 21:05 ` [90/90] mm: Fix fixup_user_fault() for MMU=n Greg KH
2011-08-14 10:31 ` [00/90] 3.0.2-stable review Jiri Slaby
2011-08-14 16:18   ` Greg KH
2011-08-15 20:56     ` Dave Jones
2011-08-16  1:24       ` Greg KH
2011-08-16 17:46 ` Arnaud Lacombe
2011-08-16 17:59   ` Greg KH
2011-08-16 18:10     ` Linus Torvalds
2011-08-16 21:11       ` H. Peter Anvin

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=20110812210559.045366181@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.