All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, poma <pomidorabelisima@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Olaf Hering <olaf@aepfle.de>, Dave Jones <davej@redhat.com>,
	"Justin M. Forbes" <jforbes@redhat.com>,
	Josh Boyer <jwboyer@redhat.com>
Subject: [PATCH 3.10 56/66] tick: Clear broadcast pending bit when switching to oneshot
Date: Thu, 20 Feb 2014 15:51:55 -0800	[thread overview]
Message-ID: <20140220234911.088010400@linuxfoundation.org> (raw)
In-Reply-To: <20140220234909.482516304@linuxfoundation.org>

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit dd5fd9b91a77b4c9c28b7ef9c181b1a875820d0a upstream.

AMD systems which use the C1E workaround in the amd_e400_idle routine
trigger the WARN_ON_ONCE in the broadcast code when onlining a CPU.

The reason is that the idle routine of those AMD systems switches the
cpu into forced broadcast mode early on before the newly brought up
CPU can switch over to high resolution / NOHZ mode. The timer related
CPU1 bringup looks like this:

  clockevent_register_device(local_apic);
  tick_setup(local_apic);
  ...
  idle()
	tick_broadcast_on_off(FORCE);
	tick_broadcast_oneshot_control(ENTER)
	  cpumask_set(cpu, broadcast_oneshot_mask);
	halt();

Now the broadcast interrupt on CPU0 sets CPU1 in the
broadcast_pending_mask and wakes CPU1. So CPU1 continues:

	local_apic_timer_interrupt()
	   tick_handle_periodic();
	   softirq()
	     tick_init_highres();
	       cpumask_clr(cpu, broadcast_oneshot_mask);

	tick_broadcast_oneshot_control(ENTER)
	   WARN_ON(cpumask_test(cpu, broadcast_pending_mask);

So while we remove CPU1 from the broadcast_oneshot_mask when we switch
over to highres mode, we do not clear the pending bit, which then
triggers the warning when we go back to idle.

The reason why this is only visible on C1E affected AMD systems is
that the other machines enter the deep sleep states via
acpi_idle/intel_idle and exit the broadcast mode before executing the
remote triggered local_apic_timer_interrupt. So the pending bit is
already cleared when the switch over to highres mode is clearing the
oneshot mask.

The solution is simple: Clear the pending bit together with the mask
bit when we switch over to highres mode.

Stanislaw came up independently with the same patch by enforcing the
C1E workaround and debugging the fallout. I picked mine, because mine
has a changelog :)

Reported-by: poma <pomidorabelisima@gmail.com>
Debugged-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: Dave Jones <davej@redhat.com>
Cc: Justin M. Forbes <jforbes@redhat.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1402111434180.21991@ionos.tec.linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/time/tick-broadcast.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -745,6 +745,7 @@ out:
 static void tick_broadcast_clear_oneshot(int cpu)
 {
 	cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);
+	cpumask_clear_cpu(cpu, tick_broadcast_pending_mask);
 }
 
 static void tick_broadcast_init_next_event(struct cpumask *mask,



  parent reply	other threads:[~2014-02-20 23:51 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 23:50 [PATCH 3.10 00/66] 3.10.32-stable review Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 01/66] xen-blkfront: handle backend CLOSED without CLOSING Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 02/66] xen/p2m: check MFN is in range before using the m2p table Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 03/66] xen: Fix possible user space selector corruption Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 04/66] fs/file.c:fdtable: avoid triggering OOMs from alloc_fdmem Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 05/66] mm/memory-failure.c: move refcount only in !MF_COUNT_INCREASED Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 06/66] CIFS: Fix SMB2 mounts so they dont try to set or get xattrs via cifs Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 07/66] Add protocol specific operation for CIFS xattrs Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 08/66] retrieving CIFS ACLs when mounted with SMB2 fails dropping session Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 09/66] mac80211: move roc cookie assignment earlier Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 10/66] mac80211: release the channel in error path in start_ap Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 11/66] mac80211: fix fragmentation code, particularly for encryption Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 12/66] ath9k_htc: make ->sta_rc_update atomic for most calls Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 13/66] ar5523: fix usb id for Gigaset Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 14/66] s390/dump: Fix dump memory detection Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 15/66] s390: fix kernel crash due to linkage stack instructions Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 16/66] spi: Fix crash with double message finalisation on error handling Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 17/66] iwlwifi: mvm: dont allow A band if SKU forbids it Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 18/66] iwlwifi: mvm: print the version of the firmware when it asserts Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 19/66] iwlwifi: mvm: BT Coex - disable BT when TXing probe request in scan Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 20/66] of: fix PCI bus match for PCIe slots Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 21/66] raw: test against runtime value of max_raw_minors Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 22/66] hwmon: (ntc_thermistor) Avoid math overflow Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 23/66] lockd: send correct lock when granting a delayed lock Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 24/66] tty: n_gsm: Fix for modems with brk in modem status control Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 25/66] tty: Set correct tty name in active sysfs attribute Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 26/66] drm/radeon: fix UVD IRQ support on 7xx Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 30/66] staging: comedi: adv_pci1710: fix analog output readback value Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 31/66] staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requested Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 32/66] iio: max1363: Use devm_regulator_get_optional for optional regulator Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 33/66] iio: adis16400: Set timestamp as the last element in chan_spec Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 34/66] x86, smap: Dont enable SMAP if CONFIG_X86_SMAP is disabled Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 35/66] x86, smap: smap_violation() is bogus if CONFIG_X86_SMAP is off Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 36/66] ftrace/x86: Use breakpoints for converting function graph caller Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 37/66] ALSA: hda - Fix mic capture on Sony VAIO Pro 11 Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 38/66] mei: clear write cb from waiting list on reset Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 39/66] mei: dont unset read cb ptr " Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 40/66] VME: Correct read/write alignment algorithm Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 41/66] Drivers: hv: vmbus: Dont timeout during the initial connection with host Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 43/66] USB: ftdi_sio: add Tagsys RFID Reader IDs Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 44/66] usb-storage: add unusual-devs entry for BlackBerry 9000 Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 45/66] usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 46/66] usb-storage: enable multi-LUN scanning when needed Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 47/66] usb: option: blacklist ZTE MF667 net interface Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 48/66] Revert "usbcore: set lpm_capable field for LPM capable root hubs" Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 49/66] Modpost: fixed USB alias generation for ranges including 0x9 and 0xA Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 50/66] block: __elv_next_request() shouldnt call into the elevator if bypassing Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 51/66] block: Fix nr_vecs for inline integrity vectors Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 52/66] block: add cond_resched() to potentially long running ioctl discard loop Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 53/66] compiler/gcc4: Make quirk for asm_volatile_goto() unconditional Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 54/66] IB/qib: Add missing serdes init sequence Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 55/66] KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio() Greg Kroah-Hartman
2014-02-20 23:51 ` Greg Kroah-Hartman [this message]
2014-02-20 23:51 ` [PATCH 3.10 57/66] md/raid1: restore ability for check and repair to fix read errors Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 58/66] md/raid5: Fix CPU hotplug callback registration Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 59/66] time: Fix overflow when HZ is smaller than 60 Greg Kroah-Hartman
2014-02-20 23:51 ` [PATCH 3.10 60/66] power: max17040: Fix NULL pointer dereference when there is no platform_data Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 61/66] ring-buffer: Fix first commit on sub-buffer having non-zero delta Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 62/66] genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 63/66] EDAC: Replace strict_strtol() with kstrtol() Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 64/66] drivers/edac/edac_mc_sysfs.c: poll timeout cannot be zero Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 65/66] EDAC: Poll timeout cannot be zero, p2 Greg Kroah-Hartman
2014-02-20 23:52 ` [PATCH 3.10 66/66] EDAC: Correct workqueue setup path Greg Kroah-Hartman
2014-02-21  3:56 ` [PATCH 3.10 00/66] 3.10.32-stable review Guenter Roeck
2014-02-21  5:09 ` Guenter Roeck
2014-02-21 19:01   ` Greg Kroah-Hartman
2014-02-21 23:17     ` Guenter Roeck
2014-02-21 23:38 ` Shuah Khan

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=20140220234911.088010400@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davej@redhat.com \
    --cc=jforbes@redhat.com \
    --cc=jwboyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=pomidorabelisima@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.