From patchwork Thu Mar 21 08:26:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10863103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 312FE6C2 for ; Thu, 21 Mar 2019 08:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CF402A03E for ; Thu, 21 Mar 2019 08:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00F2C2A041; Thu, 21 Mar 2019 08:26:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 573D12A03E for ; Thu, 21 Mar 2019 08:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: Message-id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Owner; bh=z64fgas5i+65LNDEiOet5YO7vlL1pueQx1lD4+uAH4Q=; b=a3 DDTTs8UVE/Z3AveLFPCDl6PTod1ST4q4jwtAUk+MeUbbta6Wz69DJzWon2uUuBWvNeQfhlekNXxYn x70iST3Xk9nNoqN3SGozE+m+E/baBLcygAAbI4YzTwQJpBbGidlz6TKEFba+mRJ5nM6hg+X1GPCKl 6MbhjLsYYJaJ/c1Il1RltmBzq8UwgD7M+B1gWfobB3AnoIUSWThWkoKXsg0IP51pht1cCSoTgfo3B kZcuEcdgCvSSbQHrjQ1duj7kQXw70BfO1AFvM8ODpL3GiDIXVUWm9Eg4Sj0CKhzSWBG+M+/KKn825 9FnUiicn2lICMsfb30c84+N7xFN++5Ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6t1x-0004I0-Vz; Thu, 21 Mar 2019 08:26:29 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6t1t-0004Hf-3Q for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2019 08:26:27 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190321082622euoutp01658f2584e566d134acd619948b8c3815~N691gE2qL1264712647euoutp01X; Thu, 21 Mar 2019 08:26:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190321082622euoutp01658f2584e566d134acd619948b8c3815~N691gE2qL1264712647euoutp01X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553156782; bh=tK3dFDo394dHVOQMaheFxwPLAYuS6TqHsBB57CFPBpc=; h=From:To:Cc:Subject:Date:References:From; b=e0fbHj9mfYGWpV/ISk177qQy0xr+Xc5GWR6v7tJlzu1kjORbTxWH4NGKXFvTJbfh+ XnuRLWofAKhgP1EQhKHhTkbK4bNXOAVlLzaOKNdYfsXYpPvziVVBPsv3DphNc24cVr AaDpaRuICn5s3gBil3hbRN9pb7A4v7z/Sh8c3WT0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190321082622eucas1p161baac2343ba17b9289b63cc1384cc8a~N691J1qO22707227072eucas1p1E; Thu, 21 Mar 2019 08:26:22 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id A4.FD.04806.DAA439C5; Thu, 21 Mar 2019 08:26:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190321082621eucas1p16d48ef152cd76edb7d46e8c773fa000e~N690jtpUI2999929999eucas1p1C; Thu, 21 Mar 2019 08:26:21 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-9f-5c934aadb264 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 06.15.04284.DAA439C5; Thu, 21 Mar 2019 08:26:21 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POP00AZFJFSJP40@eusync4.samsung.com>; Thu, 21 Mar 2019 08:26:21 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] clocksource: exynos_mct: Increase priority over ARM arch timer Date: Thu, 21 Mar 2019 09:26:08 +0100 Message-id: <20190321082608.21366-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7djPc7prvSbHGKy4am6xccZ6VovrX56z Wsz7LGtx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbfYvGkqswOnx6ZVnWwed67tYfN4d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jFDrJOXWL3hAPMERq4FjAyrGEVSS4tz 03OLDfWKE3OLS/PS9ZLzczcxAsNk27Gfm3cwXtoYfIhRgINRiYd3gcmkGCHWxLLiytxDjBIc zEoivCa2k2OEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJxcEo1 MHYZW73Sz2Rn3nLnyPGDC2Lc7ljsXKy6yFj/tIHl9LfHVW0yq4vsnXbf5eHauzl+7ek+31l6 8mvvXbu7fMsNNwO5s2sjmp90SadpLIvNr/grz66xTlyl/Jb6yclrN+beP2ZzOKuTa09Z1fed amt5p595lNXy/Exsvt/hYveFr39dm3PRSOGPeLgSS3FGoqEWc1FxIgBUCV5+DwIAAA== X-CMS-MailID: 20190321082621eucas1p16d48ef152cd76edb7d46e8c773fa000e CMS-TYPE: 201P X-CMS-RootMailID: 20190321082621eucas1p16d48ef152cd76edb7d46e8c773fa000e References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_012625_445054_657CD9A4 X-CRM114-Status: GOOD ( 14.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Thomas Gleixner , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Exynos Multi-Core Timer driver (exynos_mct) must be started before ARM Architected Timers (arch_timer), because they both share some common hardware blocks (global system counter) and turning on MCT is needed to get ARM Architected Timer working properly. Increase MCT timer rating and hotplug priority over ARM Archictected timer driver to achieve that. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- v2: added comments about the relation to ARM arch timer rebased onto v5.1-rc1 v1: https://patchwork.kernel.org/patch/10814921/ --- drivers/clocksource/exynos_mct.c | 4 ++-- include/linux/cpuhotplug.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 34bd250d46c6..6aa10cbc1d59 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -209,7 +209,7 @@ static void exynos4_frc_resume(struct clocksource *cs) static struct clocksource mct_frc = { .name = "mct-frc", - .rating = 400, + .rating = 450, /* use value higher than ARM arch timer */ .read = exynos4_frc_read, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, @@ -464,7 +464,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu) evt->set_state_oneshot_stopped = set_state_shutdown; evt->tick_resume = set_state_shutdown; evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; - evt->rating = 450; + evt->rating = 500; /* use value higher than ARM arch timer */ exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET); diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index e78281d07b70..53fb48de9589 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -115,10 +115,10 @@ enum cpuhp_state { CPUHP_AP_PERF_ARM_ACPI_STARTING, CPUHP_AP_PERF_ARM_STARTING, CPUHP_AP_ARM_L2X0_STARTING, + CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING, CPUHP_AP_ARM_ARCH_TIMER_STARTING, CPUHP_AP_ARM_GLOBAL_TIMER_STARTING, CPUHP_AP_JCORE_TIMER_STARTING, - CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING, CPUHP_AP_ARM_TWD_STARTING, CPUHP_AP_QCOM_TIMER_STARTING, CPUHP_AP_TEGRA_TIMER_STARTING,