From patchwork Wed Apr 10 00:36:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "dbasehore ." X-Patchwork-Id: 235273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gg0-x23e.google.com (mail-gg0-x23e.google.com [IPv6:2607:f8b0:4002:c02::23e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 93E432C00AB for ; Wed, 10 Apr 2013 10:36:32 +1000 (EST) Received: by mail-gg0-f190.google.com with SMTP id h4sf2500027ggn.17 for ; Tue, 09 Apr 2013 17:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:from:to:cc:subject:date:message-id:x-mailer :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=Zz0r6UDu7KRDkM0AuL9HdGX6a1zwrfN2aV/OQjrDU9w=; b=HkoHzUvbcM3XwgPjHr83KDVtaCXvPPIX8TMP501N3TAzWIggc2TNuS4UriwznxT+QK Dif+jdTZ7kNepIlVFoqHZdAW+L+aLDPpvfD5J/PJKqGwc50BICJY7d8KjQ9s8MOQXeYs g5fZTTb1mfwDpn0yVt/+Xl/0qPALi6w0tWZfFErVgFOFs1H0tszsrR6+BpZYVAOuWEYa jwGrFWWPX5hO46CdN+fZ3NHYEokpLVXhC1YnKYBy3fVbkM1ZTs0BciL0F613gluOMvHo 9mwJwgGhipBlG4PnFc0uwbaLP8GaxZOjo9hMDAD3Ce9D7YGM7q/yfakSMZRa+0Zhcyrf 6nFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:from:to:cc:subject:date:message-id:x-mailer :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=Zz0r6UDu7KRDkM0AuL9HdGX6a1zwrfN2aV/OQjrDU9w=; b=DtEjoaWAIebOLVOwf3mWGGqOMFNRCPypweJUO/tPo5fblvfWnKz8HJJxlA7j5G0TqW qVWgu3xiOoSaTXznpKctM3U2ABKIpBGpjGLOprQPvVtevJiJjLj5puNRjr5FnlSS56pi NCU1hCPDQgCvdRp9M97IeBUd9W7HbaIOcNqeI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=Zz0r6UDu7KRDkM0AuL9HdGX6a1zwrfN2aV/OQjrDU9w=; b=bS5FxyZYg3Q2vfjdLBuxcJcqUf+1Ju+JykrZxDyB31K8tCHiBAjY4cza53hGf915lZ rDLt4fEPFb+x8KOhwFifuZPJNu7TbbkQX+NlE2FBlQLSPWL4KstIr950hqb1N6ko+lQC g6s10P3/wwptHIdZNriH5z3y5UDV7xFQAl5f1bgelZMCvKLHV2zCB2XMEGuYDp4yd87v GdP9cCL2T6Qs+PoNSgvtKKcoYp0Lz/JKMLjU3+7+l16vTGe94VdCSlmCroK2NhSXK5tV JwT/Z3JOfA4cmx9zl4xLMHCgmv4D5q40G5/1JLEpqPBHxL/XCGesHoQ172tsV/4DPel9 GPXg== X-Received: by 10.50.53.232 with SMTP id e8mr2193279igp.14.1365554187823; Tue, 09 Apr 2013 17:36:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.7.38 with SMTP id g6ls3394375iga.26.canary; Tue, 09 Apr 2013 17:36:27 -0700 (PDT) X-Received: by 10.42.22.75 with SMTP id n11mr21135242icb.19.1365554186967; Tue, 09 Apr 2013 17:36:26 -0700 (PDT) Received: from mail-oa0-f73.google.com (mail-oa0-f73.google.com [209.85.219.73]) by gmr-mx.google.com with ESMTPS id r9si3019385igl.1.2013.04.09.17.36.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 17:36:26 -0700 (PDT) Received-SPF: pass (google.com: domain of dbasehore@google.com designates 209.85.219.73 as permitted sender) client-ip=209.85.219.73; Received: by mail-oa0-f73.google.com with SMTP id o6so1918563oag.4 for ; Tue, 09 Apr 2013 17:36:26 -0700 (PDT) X-Received: by 10.50.82.74 with SMTP id g10mr13997958igy.7.1365554186590; Tue, 09 Apr 2013 17:36:26 -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 o6si2386259igh.2.2013.04.09.17.36.26 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 09 Apr 2013 17:36:26 -0700 (PDT) Received: from ketosis.mtv.corp.google.com (ketosis.mtv.corp.google.com [172.22.73.143]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id F07645A404E; Tue, 9 Apr 2013 17:36:25 -0700 (PDT) Received: by ketosis.mtv.corp.google.com (Postfix, from userid 171518) id 75002804DB; Tue, 9 Apr 2013 17:36:25 -0700 (PDT) From: Derek Basehore To: rtc-linux@googlegroups.com Cc: Alessandro Zummo , linux-kernel@vger.kernel.org, Derek Basehore Subject: [rtc-linux] [PATCH] Don't disable hpet emulation on suspend Date: Tue, 9 Apr 2013 17:36:13 -0700 Message-Id: <1365554173-24475-1-git-send-email-dbasehore@chromium.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQmGv00pGY8XvgsfdFVqNh4oNnVo4FI3aKM31my/Iel0qrc1AtzZdgzFtwwwgWyDlYvXxDj5ScalTqteUb9zDe+FooPvJrqWCY0zFhnZ5SNK1V5mjLqzjGveoGOStmhuelmeodJpAJUvWV+Zy0CCkov9MfFXt5jPVZ8zUhVa97asmhVxKLgKKVr7Utd0U0P+qY9VnJKguxlRgAy7KN1Wp+eMioS3Rw== X-Original-Sender: dbasehore@chromium.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dbasehore@google.com designates 209.85.219.73 as permitted sender) smtp.mail=dbasehore@google.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , There's a bug where rtc alarms are ignored after the rtc cmos suspends but before the system finishes suspend. Since hpet emulation is disabled and it still handles the interrupts, a wake event is never registered which is done from the rtc layer. This reverts an earlier commit which disables hpet emulation. To fix the problem mentioned in that commit, the hpet_rtc_timer_init function is called directly on resume. This reverts commit d1b2efa83fbf7b33919238fa29ef6ab935820103. Signed-off-by: Derek Basehore --- drivers/rtc/rtc-cmos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index af97c94..cc5bea9 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -804,9 +804,8 @@ static int cmos_suspend(struct device *dev) mask = RTC_IRQMASK; tmp &= ~mask; CMOS_WRITE(tmp, RTC_CONTROL); + hpet_mask_rtc_irq_bit(mask); - /* shut down hpet emulation - we don't need it for alarm */ - hpet_mask_rtc_irq_bit(RTC_PIE|RTC_AIE|RTC_UIE); cmos_checkintr(cmos, tmp); } spin_unlock_irq(&rtc_lock); @@ -870,6 +869,7 @@ static int cmos_resume(struct device *dev) rtc_update_irq(cmos->rtc, 1, mask); tmp &= ~RTC_AIE; hpet_mask_rtc_irq_bit(RTC_AIE); + hpet_rtc_timer_init(); } while (mask & RTC_AIE); spin_unlock_irq(&rtc_lock); }