Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3438687imu; Sun, 11 Nov 2018 15:06:39 -0800 (PST) X-Google-Smtp-Source: AJdET5cWkIrrer2T87dYrqVWAb0Vp1zXNLLOKsV98eYvpnpp9u/II0Z37GOE1MNrDi82mdUY0igg X-Received: by 2002:a63:d52:: with SMTP id 18-v6mr15569531pgn.107.1541977599215; Sun, 11 Nov 2018 15:06:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977599; cv=none; d=google.com; s=arc-20160816; b=WJ1slrAoo0SfsAHj4lLvKF+8UInYcsQ3NbSKehojVPjLH2dOfUK/iQWeYrp/6S8/Vf rtq4HzSyzVds3r9/KyFqCfYf4cjn/k5qjPi/7oecTGRK1czdZ9S6025+wOud/635XZzQ Tb10K67sD3STfFZbM5ctWtJdMX6q2/F9ExnvGYPMebGXjRnZ82H08BzbQ3kLDDbVYIKo 4Ili0gkCtLrm713rwPnyWD9McpYsQpY/r7AaG7BaXUCEH3qwPqQnY6QYFvhL8bJ+2Uwm tnwkiwPsbTNotUoBQkD3/s65saKzLIhzKsLd5tn0+2qUYrez0I3/VkBLiXvCytCaiJhg bhqw== 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=tFJL7sDcmtOPQnL5taa+5LmTNBvLDENZ0RXkqmCEdd0=; b=UOXC1l9DM7CuG3yuaSXDjOJiOg8tzfdafhcSTp57Y+EhhywibzPOeHCgMc+0x1sSB/ nLg/Com5myJ3t0BMsPYQs0xdBB5X66x1sIEcED3kUym/KIx6bpjzUPGAYu53rbDpS5oD i+TizKq1bG/oaU2n9/S3Hei0uvDwbrP1c9Ka0JdKUy6opZEZf+79Eenbd5OzuVb4Bmmx YchrUHc/hcMqAJsGZQX6Uhwbo3GZmqTCFpeu0/5CsaoO6i1r3E6GF2XRcKnabzD2DBek 3AbbTSAFz86EnZupn4KLrQCbvnOvsZ2oz9ir5ZP4/WeGCX4iWDC6YIQDbZ3Q9/1h9bmO OpFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MC5BHG5A; 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 p189-v6si15887879pfg.235.2018.11.11.15.06.24; Sun, 11 Nov 2018 15:06:39 -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=MC5BHG5A; 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 S2390547AbeKLI4L (ORCPT + 99 others); Mon, 12 Nov 2018 03:56:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:51232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390366AbeKLIWO (ORCPT ); Mon, 12 Nov 2018 03:22:14 -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 3D225223DD; Sun, 11 Nov 2018 22:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975537; bh=mWG9hM93qRF8aK2BLXI/blEZinTIShYehTwYpLGa8CY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MC5BHG5ArMt754gkKXGdWCevj9615YYg0NmooWFTPX/W3HNtnlp8kAdwkbj4Fx/Fn 7Z8Y4nBKpI9UhQ8wkzrwtuKEX5lsw93fWZsKsKr2AvaGkb6yHPXhilfKdqFL3VuvUq 8uYgY0m9nuYsBSH8xTu2wWKhI9/HQa0iaIGfXLew= 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.14 055/222] x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC Date: Sun, 11 Nov 2018 14:22:32 -0800 Message-Id: <20181111221652.983927073@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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; }