From patchwork Fri May 8 09:34:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Adrian X-Patchwork-Id: 469952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-x23a.google.com (mail-ob0-x23a.google.com [IPv6:2607:f8b0:4003:c01::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A67BD14012C for ; Fri, 8 May 2015 19:35:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=GHKlw0fB; dkim-atps=neutral Received: by obcwm4 with SMTP id wm4sf17451842obc.1 for ; Fri, 08 May 2015 02:35:32 -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:x-original-sender :x-original-authentication-results:reply-to:content-type:precedence :mailing-list:list-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=hFnKVUaOclUeQaNgTfgdY3prqdbrtEzobGF7PDm0EDs=; b=GHKlw0fB+UllbOkAL4mowttqfSL5rtIDkJFh8EqCNXEZrpMsWVFceASmoFb4wlts7c 4GtNpSQjYnfaVMUcsQyaK7tju7duhwMG+zdp4cI3gcvFPUabGfaoujNzNYd3/Gqn4pSK FjAGXu+aYzOv5wdg2MZervt/uuL+YOPCS4HvtpeSN7nmzjEEZdBCMNVnxW//YgOe+EQZ oFK8o4BjPuFT7MZZRQUBUZDvfhCoQyqPbNdHoisqHtVm9IG+V9hH4u+JxPFieuZnTFgj De3ryKLtc72PxtNo/wp2DFvo3a9F/Jv82w9JI0dlLOyaf8WV/d4+flsyC9/6UFD58+PK jHmg== X-Received: by 10.182.252.66 with SMTP id zq2mr20085obc.38.1431077732650; Fri, 08 May 2015 02:35:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.58.15 with SMTP id m15ls477903obq.71.gmail; Fri, 08 May 2015 02:35:32 -0700 (PDT) X-Received: by 10.182.142.37 with SMTP id rt5mr4506457obb.47.1431077732444; Fri, 08 May 2015 02:35:32 -0700 (PDT) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com. [2607:f8b0:400e:c02::235]) by gmr-mx.google.com with ESMTPS id k3si564668pdm.0.2015.05.08.02.35.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 May 2015 02:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of adrianhuang0701@gmail.com designates 2607:f8b0:400e:c02::235 as permitted sender) client-ip=2607:f8b0:400e:c02::235; Received: by mail-pd0-x235.google.com with SMTP id qa5so73145234pdb.1 for ; Fri, 08 May 2015 02:35:32 -0700 (PDT) X-Received: by 10.68.223.165 with SMTP id qv5mr5096111pbc.82.1431077687913; Fri, 08 May 2015 02:34:47 -0700 (PDT) Received: from localhost.localdomain (218-173-182-161.dynamic.hinet.net. [218.173.182.161]) by mx.google.com with ESMTPSA id qe9sm4581009pbc.62.2015.05.08.02.34.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 May 2015 02:34:46 -0700 (PDT) From: Adrian Huang To: Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com Cc: Brecht Machiels , Thomas Gleixner , John Stultz , Rabin Vincent , Borislav Petkov , Nagananda Chumbalkar , Adrian Huang , Adrian Huang Subject: [rtc-linux] [RFC PATCH 1/2] Revert "rtc-cmos: Add an alarm disable quirk" Date: Fri, 8 May 2015 17:34:25 +0800 Message-Id: <1431077665-3493-1-git-send-email-adrianhuang0701@gmail.com> X-Mailer: git-send-email 1.9.1 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::235 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-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 [2/2] of this patchset makes the kernel more robust: rtc: restore the RTC alarm time to the configured alarm time in BIOS Setup Signed-off-by: Adrian Huang Acked-by: Borislav Petkov Tested-by: Borislav Petkov Tested-by: too please? Tested-by: Egbert Eich --- drivers/rtc/rtc-cmos.c | 52 -------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index a82556a..9754564 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -29,8 +29,6 @@ * other drivers and utilities on correctly configured systems. */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ #include @@ -380,50 +377,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); @@ -432,9 +385,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) @@ -1243,8 +1193,6 @@ static int __init cmos_init(void) platform_driver_registered = true; } - dmi_check_system(rtc_quirks); - if (retval == 0) return 0;