/[packages]/cauldron/kernel/current/PATCHES/patches/0030-x86-olpc-Indicate-that-legacy-PC-XO-1-platform-shoul.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0030-x86-olpc-Indicate-that-legacy-PC-XO-1-platform-shoul.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 9 months ago) by tmb
File size: 2417 byte(s)
add fixes from sashas autosel queue
1 From e69b8621304040d1be3125ba1b9ccce8b40d7028 Mon Sep 17 00:00:00 2001
2 From: Lubomir Rintel <lkundrak@v3.sk>
3 Date: Thu, 4 Oct 2018 18:08:08 +0200
4 Subject: [PATCH 030/145] x86/olpc: Indicate that legacy PC XO-1 platform
5 should not register RTC
6
7 [ Upstream commit d92116b800fb79a72ad26121f5011f6aa3ad94c2 ]
8
9 On OLPC XO-1, the RTC is discovered via device tree from the arch
10 initcall. Don't let the PC platform register another one from its device
11 initcall, it's not going to work:
12
13 sysfs: cannot create duplicate filename '/devices/platform/rtc_cmos'
14 CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc6 #12
15 Hardware name: OLPC XO/XO, BIOS OLPC Ver 1.00.01 06/11/2014
16 Call Trace:
17 dump_stack+0x16/0x18
18 sysfs_warn_dup+0x46/0x58
19 sysfs_create_dir_ns+0x76/0x9b
20 kobject_add_internal+0xed/0x209
21 ? __schedule+0x3fa/0x447
22 kobject_add+0x5b/0x66
23 device_add+0x298/0x535
24 ? insert_resource_conflict+0x2a/0x3e
25 platform_device_add+0x14d/0x192
26 ? io_delay_init+0x19/0x19
27 platform_device_register+0x1c/0x1f
28 add_rtc_cmos+0x16/0x31
29 do_one_initcall+0x78/0x14a
30 ? do_early_param+0x75/0x75
31 kernel_init_freeable+0x152/0x1e0
32 ? rest_init+0xa2/0xa2
33 kernel_init+0x8/0xd5
34 ret_from_fork+0x2e/0x38
35 kobject_add_internal failed for rtc_cmos with -EEXIST, don't try to
36 register things with the same name in the same directory.
37 platform rtc_cmos: registered platform RTC device (no PNP device found)
38
39 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
40 Signed-off-by: Borislav Petkov <bp@suse.de>
41 Acked-by: Thomas Gleixner <tglx@linutronix.de>
42 CC: "H. Peter Anvin" <hpa@zytor.com>
43 CC: Ingo Molnar <mingo@redhat.com>
44 CC: x86-ml <x86@kernel.org>
45 Link: http://lkml.kernel.org/r/20181004160808.307738-1-lkundrak@v3.sk
46 Signed-off-by: Sasha Levin <sashal@kernel.org>
47 ---
48 arch/x86/platform/olpc/olpc-xo1-rtc.c | 3 +++
49 1 file changed, 3 insertions(+)
50
51 diff --git a/arch/x86/platform/olpc/olpc-xo1-rtc.c b/arch/x86/platform/olpc/olpc-xo1-rtc.c
52 index a2b4efddd61a..8e7ddd7e313a 100644
53 --- a/arch/x86/platform/olpc/olpc-xo1-rtc.c
54 +++ b/arch/x86/platform/olpc/olpc-xo1-rtc.c
55 @@ -16,6 +16,7 @@
56
57 #include <asm/msr.h>
58 #include <asm/olpc.h>
59 +#include <asm/x86_init.h>
60
61 static void rtc_wake_on(struct device *dev)
62 {
63 @@ -75,6 +76,8 @@ static int __init xo1_rtc_init(void)
64 if (r)
65 return r;
66
67 + x86_platform.legacy.rtc = 0;
68 +
69 device_init_wakeup(&xo1_rtc_device.dev, 1);
70 return 0;
71 }
72 --
73 2.19.1
74

  ViewVC Help
Powered by ViewVC 1.1.30