Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3489051imu; Sun, 11 Nov 2018 16:15:00 -0800 (PST) X-Google-Smtp-Source: AJdET5edOAvMDfuoAyaCUgcVGqIUhCkM/ObCylEpmUzRC8/6bOJ6+QJkI7KTLOgOIZp6tQaOHVG3 X-Received: by 2002:a62:8d51:: with SMTP id z78-v6mr14195514pfd.234.1541981700033; Sun, 11 Nov 2018 16:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981699; cv=none; d=google.com; s=arc-20160816; b=zLCHjEaDxSAMIlE5X/NMbEiSaItVYc49wAYh0c3wAbE+Jax9dbqQ+IyucgrO2pw24D 3UqbBwC1xqdj/pcaiqyojsTrqJfPqPgHvTzGSEyyEKu+pFa+1qgfpZwRa9e1uo2dwNUa L209FKUnYoNfPVsSMJnwqSyzFtt3zhY+z4BXBs+uIJ17cifx9O+J/VxB/1BBiMQtgq+q yJwMqWoH5bAniH6lfUqjXNlrQEJSzY/U/A790mEgPLrYRGCDKGH925AEH+dq7elmJ7EL lKut0c9yTryJVdD4d/EnoGWMiZ6TsYsBbsMV/Z2B6znc2IVXgBAo5U733gG1gGwyYYVY 2ajw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QVQw9y0dXaXkY2TcfVVwbaf6M7mopxFa3sCZ5OcUK24=; b=fKZls61dx0MLKv0wGOoomiH8oMKUZYKreNSMw5Flpy8VisSUzqhu1S0FsAfioTE/xH jpe5xsPS86I4dcFAUe6IHz5rIxTRD6L/hPjaIi024czWRfDdXHMiRLnrObYL+n+3LaFS yWo5MLtGl9BVnCo6CetFqlfucP5j5C8j+Z/PL66D0vH9o//Bc4Cfsg0FxefovkUB0Msl WrbhmJtpRFawPWWw3u8QF2By7PAkqVFMRQO976eMhgoU5lj3E1VM3XL2ZbLzfjY/8eLI HFUzFsZjDxJ/QqKYqkUx5qECLWENZLiGn87sq6bOnEK+/UaR3NPuLMGYcsOigYCN/eLM 3hbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fddty5mh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si4851750pgi.314.2018.11.11.16.14.45; Sun, 11 Nov 2018 16:14:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fddty5mh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730927AbeKLKEj (ORCPT + 99 others); Mon, 12 Nov 2018 05:04:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:59922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730391AbeKLIRN (ORCPT ); Mon, 12 Nov 2018 03:17:13 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AA0E21104; Sun, 11 Nov 2018 22:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975238; bh=j/hWwhhyH2Z9zJpkBCj2Xpx5+JvkpnjsHUgD+1YfDJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fddty5mhOiPneVNYmnIg/nIUHEBKEHDqGNmRdoLQAy5LOUdaSqalQ0oXyML0u9WBF 0z6k7dDkVi/RGshHKfdHK3sVqVDMYQgNN/VD+prYnNZdnz46oG67+eSeO2SuhoXPB9 EslnbL+85JEgl59KS2vbkBc4q2xTPGIC2/e4XI1I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lubomir Rintel , Borislav Petkov , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , x86-ml , Sasha Levin Subject: [PATCH 4.19 076/361] x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC Date: Sun, 11 Nov 2018 14:17:03 -0800 Message-Id: <20181111221630.678530776@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lubomir Rintel [ Upstream commit d92116b800fb79a72ad26121f5011f6aa3ad94c2 ] On OLPC XO-1, the RTC is discovered via device tree from the arch initcall. Don't let the PC platform register another one from its device initcall, it's not going to work: sysfs: cannot create duplicate filename '/devices/platform/rtc_cmos' CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc6 #12 Hardware name: OLPC XO/XO, BIOS OLPC Ver 1.00.01 06/11/2014 Call Trace: dump_stack+0x16/0x18 sysfs_warn_dup+0x46/0x58 sysfs_create_dir_ns+0x76/0x9b kobject_add_internal+0xed/0x209 ? __schedule+0x3fa/0x447 kobject_add+0x5b/0x66 device_add+0x298/0x535 ? insert_resource_conflict+0x2a/0x3e platform_device_add+0x14d/0x192 ? io_delay_init+0x19/0x19 platform_device_register+0x1c/0x1f add_rtc_cmos+0x16/0x31 do_one_initcall+0x78/0x14a ? do_early_param+0x75/0x75 kernel_init_freeable+0x152/0x1e0 ? rest_init+0xa2/0xa2 kernel_init+0x8/0xd5 ret_from_fork+0x2e/0x38 kobject_add_internal failed for rtc_cmos with -EEXIST, don't try to register things with the same name in the same directory. platform rtc_cmos: registered platform RTC device (no PNP device found) Signed-off-by: Lubomir Rintel Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner CC: "H. Peter Anvin" CC: Ingo Molnar CC: x86-ml Link: http://lkml.kernel.org/r/20181004160808.307738-1-lkundrak@v3.sk Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/platform/olpc/olpc-xo1-rtc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/platform/olpc/olpc-xo1-rtc.c +++ b/arch/x86/platform/olpc/olpc-xo1-rtc.c @@ -16,6 +16,7 @@ #include #include +#include static void rtc_wake_on(struct device *dev) { @@ -75,6 +76,8 @@ static int __init xo1_rtc_init(void) if (r) return r; + x86_platform.legacy.rtc = 0; + device_init_wakeup(&xo1_rtc_device.dev, 1); return 0; }