From patchwork Fri Aug 23 19:45:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2849029 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57B64BF546 for ; Fri, 23 Aug 2013 19:45:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 828742015E for ; Fri, 23 Aug 2013 19:45:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C59C20142 for ; Fri, 23 Aug 2013 19:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756364Ab3HWTpS (ORCPT ); Fri, 23 Aug 2013 15:45:18 -0400 Received: from mail-yh0-f74.google.com ([209.85.213.74]:53711 "EHLO mail-yh0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756349Ab3HWTpQ (ORCPT ); Fri, 23 Aug 2013 15:45:16 -0400 Received: by mail-yh0-f74.google.com with SMTP id c41so102862yho.1 for ; Fri, 23 Aug 2013 12:45:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9pgCWtj77Wx1LRWJiYbOa2NLHrfCFo85tcExkChUe44=; b=FLXvF2nkvnh6IGv1AiDCLmnw6xancgBJM+qaLoD3t8vIpfaHqfVKVXvkq3zilPKeMm IBkdGBrC5egvFQ4ULT1lqS/qr/Y3sY9F8x7pW6CYbTF7s8trxhXLlP2I2lE1lfVe4GA4 XeLX4XLI75D3g0zeaefLaqB3p9EVkFGMqvtUTyWcS4LpjGlATOdpvZfQfVP3SSF4wUiI jBroId29AdI+pBe4hSWlvBH0B9AU26pvB+Zh5QsVpy5WQqtlSSGBDOs0jnf4LV1Vdxz+ u8Eu2kGo4gWEsTxDV79E2h3OzX0NnJXslNv0VgiFJB7KpHaiHmMWWeDiypz5OujotWKM Tbuw== X-Gm-Message-State: ALoCoQkRaO74goVSNmolOPkHLeuBK90EAi8/1e0gAVXTw2+1G7TlcFGRKsQCWGqfaFhu3TG3dC1/gAbxFNODqB7tOV3jEb0GZEvFkA4VLMz4t89yG0I/hGpBxnkxBrxdCiiGyZLTLTFNq/TpCia/8rf56ju39Oug9xKx9Degikr0Yd/r84K5bW1zBMVleMUkQzgZFmrRWZ8qvdTwpFzSsGl+dhlu3EvQEQ== X-Received: by 10.236.108.233 with SMTP id q69mr457427yhg.11.1377287115739; Fri, 23 Aug 2013 12:45:15 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id k45si95474yhn.4.1969.12.31.16.00.00 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 23 Aug 2013 12:45:15 -0700 (PDT) Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.120.100]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 92E0A5A41C2; Fri, 23 Aug 2013 12:45:15 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id 09155160C88; Fri, 23 Aug 2013 12:45:14 -0700 (PDT) From: Colin Cross To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Neil Zhang , Joseph Lo , linux-tegra@vger.kernel.org, Colin Cross , stable@vger.kernel.org, "Rafael J. Wysocki" , Daniel Lezcano Subject: [PATCH 1/3] cpuidle: coupled: disable interrupts after entering safe state Date: Fri, 23 Aug 2013 12:45:10 -0700 Message-Id: <1377287112-12018-1-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.8.3 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Calling cpuidle_enter_state is expected to return with interrupts enabled, but interrupts must be disabled before starting the ready loop synchronization stage. Call local_irq_disable after each call to cpuidle_enter_state for the safe state. CC: stable@vger.kernel.org Signed-off-by: Colin Cross Tested-by: Stephen Warren --- drivers/cpuidle/coupled.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 2a297f8..db92bcb 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -460,6 +460,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev, } entered_state = cpuidle_enter_state(dev, drv, dev->safe_state_index); + local_irq_disable(); } /* Read barrier ensures online_count is read after prevent is cleared */ @@ -485,6 +486,7 @@ retry: entered_state = cpuidle_enter_state(dev, drv, dev->safe_state_index); + local_irq_disable(); } if (cpuidle_coupled_clear_pokes(dev->cpu)) {