From patchwork Tue Jun 9 10:23:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Adrian X-Patchwork-Id: 482171 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qg0-x238.google.com (mail-qg0-x238.google.com [IPv6:2607:f8b0:400d:c04::238]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BA3D4140338 for ; Tue, 9 Jun 2015 20:23:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=Eh6lu9e4; dkim-atps=neutral Received: by qgdz60 with SMTP id z60sf3383161qgd.1 for ; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:content-type:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=mYAKVCCpaWe9Cn7U5xIg2ILuE5VjwOoh5RK7Hw1bLSo=; b=Eh6lu9e4CtTXgUbxQRGdTmIZiEueRs6h/MzDIPDYmWJhN8gAWOKzwsBN+Je3sEwSXz Kiv0dPryM2+ywRJWu6rOKSb4BAAar/yRGXbvuGDihzI/kymvusO51rZEDWnEqbkviDe8 eUVK/Ar+ZtD17EXLu09+Ya1wpqgtbXs5zIDnkeYKGk51We82xKMUPJiabJ+rBfRaF3VA BwokbyVN1358SU4NojPx3hNGtVhFrH1OYupqSzsf10/60f5yxi4Almwy2QGCMqM2SStG eplL/+nXxRcj5XD2TB3kOTe9+ZDbjEsvN6Rrw7YjtHFAa8Yrqk2dWfYbiWFhizB/fZMg 3Kzg== X-Received: by 10.182.28.6 with SMTP id x6mr111224obg.37.1433845431635; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.200.169 with SMTP id jt9ls72859obc.80.gmail; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) X-Received: by 10.182.246.134 with SMTP id xw6mr30645522obc.38.1433845431428; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) Received: from mail-pd0-x22e.google.com (mail-pd0-x22e.google.com. [2607:f8b0:400e:c02::22e]) by gmr-mx.google.com with ESMTPS id 5si611262pdt.0.2015.06.09.03.23.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 03:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of adrianhuang0701@gmail.com designates 2607:f8b0:400e:c02::22e as permitted sender) client-ip=2607:f8b0:400e:c02::22e; Received: by mail-pd0-x22e.google.com with SMTP id ki1so11983999pdb.1 for ; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) X-Received: by 10.70.109.131 with SMTP id hs3mr37905213pdb.40.1433845431309; Tue, 09 Jun 2015 03:23:51 -0700 (PDT) Received: from localhost.localdomain ([140.116.247.231]) by mx.google.com with ESMTPSA id i1sm5184179pdm.19.2015.06.09.03.23.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 03:23:50 -0700 (PDT) From: Adrian Huang To: Alexandre Belloni , Alessandro Zummo , rtc-linux@googlegroups.com Cc: Borislav Petkov , Thomas Gleixner , John Stultz , Diego Ercolani , Egbert Eich , Max Asbock , Nagananda Chumbalkar , Adrian Huang , Adrian Huang Subject: [rtc-linux] [RFC PATCH v2 2/2] rtc-cmos: Revert "rtc-cmos: Add an alarm disable quirk" Date: Tue, 9 Jun 2015 18:23:33 +0800 Message-Id: <1433845413-13960-3-git-send-email-adrianhuang0701@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433845413-13960-1-git-send-email-adrianhuang0701@gmail.com> References: <1433845413-13960-1-git-send-email-adrianhuang0701@gmail.com> X-Original-Sender: AdrianHuang0701@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adrianhuang0701@gmail.com designates 2607:f8b0:400e:c02::22e as permitted sender) smtp.mail=adrianhuang0701@gmail.com; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.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-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Commit d5a1c7e3fc38 ("rtc-cmos: Add an alarm disable quirk") that added a special quirk is not needed because [PATCH 1/2] of this patchset makes the kernel more robust: rtc-cmos: Clear interrupt flag if alarm time is less equal to now+1 seconds. Signed-off-by: Adrian Huang --- drivers/rtc/rtc-cmos.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 4e60ac8..6064f29 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -41,7 +41,6 @@ #include #include #include -#include /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ #include @@ -383,50 +382,6 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) return 0; } -/* - * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. - */ -static bool alarm_disable_quirk; - -static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -{ - alarm_disable_quirk = true; - pr_info("BIOS has alarm-disable quirk - RTC alarms disabled\n"); - return 0; -} - -static const struct dmi_system_id rtc_quirks[] __initconst = { - /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ - { - .callback = set_alarm_disable_quirk, - .ident = "IBM Truman", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), - }, - }, - /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ - { - .callback = set_alarm_disable_quirk, - .ident = "Gigabyte GA-990XA-UD3", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, - "Gigabyte Technology Co., Ltd."), - DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), - }, - }, - /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ - { - .callback = set_alarm_disable_quirk, - .ident = "Toshiba Satellite L300", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), - }, - }, - {} -}; - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) { struct cmos_rtc *cmos = dev_get_drvdata(dev); @@ -435,9 +390,6 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) if (!is_valid_irq(cmos->irq)) return -EINVAL; - if (alarm_disable_quirk) - return 0; - spin_lock_irqsave(&rtc_lock, flags); if (enabled) @@ -1298,8 +1250,6 @@ static int __init cmos_init(void) platform_driver_registered = true; } - dmi_check_system(rtc_quirks); - if (retval == 0) return 0;