From patchwork Fri Feb 15 12:52:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 158518 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669062jaa; Fri, 15 Feb 2019 04:52:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IZM5V/3D/l8JHKPBaqM3y87xSjECwcKAaQBYBg0rLUqYuwbby6YiKxUjUJLaMQUAEwcY3+n X-Received: by 2002:a63:6881:: with SMTP id d123mr5218429pgc.10.1550235163443; Fri, 15 Feb 2019 04:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235163; cv=none; d=google.com; s=arc-20160816; b=bJH9w2RciAqj1EHH8FG8mqNtVD5lsvefnsKu9AZYLgLLm2gKOuaY/zvAQdP4sXUZFM VOnI3qgf4b0yt6uEF3BNZSy1IxlgOYM7yIDWDB4QDSncfxGQzhIGB8jCefMhiqD+zJJN j35b9t1Nks8WEvzrkD4B/RcOZGl7VvYAcduCHaKoZs0cJQR1PRKfByeqnI8et/0r6Ehf HPkM4YXfll63glLelNhiGy53eWxSzicSRZlIjeOB5UaZIvvWt2uvNGTagXgK36rltisV Yoo0kVzq5wFMapdZyROdJ6ImkyG6TrVUtQBiTKiS58yc4e2GZlPmeqhFON/2PEghj6Fq mHAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=S3nzVWc9y2XxWLwNUeI00lq0MvjHBGxxHnEHRZdYmK4=; b=LsZpeQ6ArDSWmIceb6gWm2r8qCCkKOHrH8Dj+cEB77NH/F1Vn98UZ431RQJ1ZT61i5 lmZRFpjiuaj7zA/jnFDQXI+HKvtSwgPh4pin6TuhtmlPYgCb4alhl0k6jlKtGVyxmsLF M2eqTZKxbUs7ssvqj5cAFyGQwqO8nK5Jl3ghwFfSBSzW8XW+rREibnPoWnSFQa5Ks99x KSRi7jFLa75oY6GgRn7EPAI8+icNRqpCOQ7d7uo4h0rISIAWDHf6ix6xYUGeA2AXodeC zzkA8wH+DEcZ93MCD2pafyRD2kDujiFVIEtTeFQmB/tO9KUvxZXuVlzBD01wfHeYq4HD X1HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hqgVt0yG; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si5357287pfi.192.2019.02.15.04.52.43; Fri, 15 Feb 2019 04:52:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=hqgVt0yG; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394733AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48466 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394724AbfBOMwm (ORCPT ); Fri, 15 Feb 2019 07:52:42 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125240euoutp02d1a5efa36947d21e2ce06a387213e33d~DiqpWbX8W0825108251euoutp022; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125240euoutp02d1a5efa36947d21e2ce06a387213e33d~DiqpWbX8W0825108251euoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235160; bh=S3nzVWc9y2XxWLwNUeI00lq0MvjHBGxxHnEHRZdYmK4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=hqgVt0yGgPw+g4Q4+rFIjWKkkdgG+uDPwZSntVkn54fzU8/53FZ8Ah7h1WW8SG6iL MW2g1IZ2Vy8Kj2AdTd8y3qf7rdxVF+9DUHwLx9GtqqRwpbyGRnKQZOcWL1eaUuc6Vo p29gMOYd3h/l7j4FJmUcmq5i9Fi4b5n2JjnuShlc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190215125240eucas1p1753129627de7da88667853b51eed2acd~Diqo-40Zo1088510885eucas1p11; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 53.AB.04294.816B66C5; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2~DiqoSl1Fg2398823988eucas1p2s; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-de-5c66b61851c7 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B4.C7.04128.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz Subject: [PATCH 3/5] clocksource: exynos_mct: Increase priority over ARM arch timer Date: Fri, 15 Feb 2019 13:52:27 +0100 Message-id: <20190215125229.30180-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsWy7djP87oS29JiDM6u4rfYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBnP9/WzFXzjr3jVcI6pgfEcbxcjJ4eEgInEkc4m FhBbSGAFo8SU72ZdjFxA9mdGie6ZXWwwRTen3WGGSCxjlDi95RSU08AksWLXO3aQKjYBQ4mu txAdIgLeEpPP/GUHKWIW6GKSuL3wAFiRsECoxJ2bm5lBbBYBVYknWxtYQWxeAVuJY3O2MEOs k5dYveEAmM0pYCexZk0PVHwCm8Tep5UQtotE17MVTBC2jMTlyd0sIMskBJoZJdpnzGKHcHoY JbbO2QH1hLXE4eMXwbYxC/BJTNo2HWgqB1CcV6KjTQiixEPi5ePzjBCvTWSUODttDcsERokF jAyrGMVTS4tz01OLjfJSy/WKE3OLS/PS9ZLzczcxAmPv9L/jX3Yw7vqTdIhRgINRiYd3RUZq jBBrYllxZe4hRgkOZiURXs41aTFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeasZHkQLCaQnlqRm p6YWpBbBZJk4OKUaGAsZJSWErtZNWfJmbaiEy29v/fPJ4hZvVzvt8gtelpcSnqTbbbqrO9kq KdPebBfnscMus6zyqgzC95ha+rF84HE4XFQ8ZeJG3rCLS87vOTona+/6hmULlwdZqH+7cGrR T13B722XmhTaJP5GHHb2kDhw7vaBuxnpn+Us1wfOu7DAOvPL+19iWUosxRmJhlrMRcWJAH+D w0u5AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprALMWRmVeSWpSXmKPExsVy+t/xa7ri29JiDLZ90rfYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBnP9/WzFXzjr3jVcI6pgfEcbxcjJ4eEgInEzWl3 mLsYuTiEBJYwSlw5No8Fwmlikpj1uYEJpIpNwFCi620XG4gtIuAtMfnMX3aQImaBHiaJ9qu/ 2UESwgKhEhvezwRrYBFQlXiytYEVxOYVsJU4NmcLM8Q6eYnVGw6A2ZwCdhJr1vSA2UJANZdX PWCcwMizgJFhFaNIamlxbnpusZFecWJucWleul5yfu4mRmA4bTv2c8sOxq53wYcYBTgYlXh4 V2SkxgixJpYVV+YeYpTgYFYS4eVckxYjxJuSWFmVWpQfX1Sak1p8iFGag0VJnPe8QWWUkEB6 YklqdmpqQWoRTJaJg1OqgZGV6TE3bzGD39k9KxNWzMkPXxaj6logn73MWXbphBlt16a9Zzmm 3nM6r22C+qmu+oNF0l+tKp69vKOfG+8U+fa0p88jQ63yD3OufVjyO070P8/eCVbJ6intfZm+ f+q03LWOppUvkDMU06gMPdprt8VCXy3uRnKE17yyy74KD99ue7C+e++nk0osxRmJhlrMRcWJ ACekzJMjAgAA X-CMS-MailID: 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2 CMS-TYPE: 201P X-CMS-RootMailID: 20190215125239eucas1p2d9167af42f2d04e462c56a070c3371c2 References: <20190215125229.30180-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 --- drivers/clocksource/exynos_mct.c | 4 ++-- include/linux/cpuhotplug.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 49413900b24c..58090f57ada3 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -211,7 +211,7 @@ static void exynos4_frc_resume(struct clocksource *cs) static struct clocksource mct_frc = { .name = "mct-frc", - .rating = 400, + .rating = 450, .read = exynos4_frc_read, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, @@ -465,7 +465,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; 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 fd586d0301e7..bdd544f21102 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_ARMADA_TIMER_STARTING,