Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3820642ybi; Mon, 29 Jul 2019 13:16:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbZ5xa0pC302K8yMYF/YS5R6sZPdaduE6app91xr9LIHw3i3SGyU1Zgc5gOWPc+RnZ/9fx X-Received: by 2002:a63:5b52:: with SMTP id l18mr106111531pgm.21.1564431370117; Mon, 29 Jul 2019 13:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431370; cv=none; d=google.com; s=arc-20160816; b=U51zrkDLsK2pBv+bI5te8Gl1zp+a71BtAU7vw8wPZBktITSFRFQaWNacldvc67Xf4N L6Fdd8atubBb15NxLLh8ywSSx83Qm53hocpCmnBTXJ56LRc1GgROhv4kxUjrg4vr/c9F IdXU8bWUVhOT7KPDFfb2PJtpXK0nlRg0iymPBAg2olg5hrAwqLdMmClg09Gg6F+LeDiP xPObfzHtAQUEwVKimcAFRIsZXhaJgoXNilR2ui9qhLogs5j5cH6sDz8dQVXvTohDW3LZ Ln2GOYlFj3WAagHQDbX/5LVmiXzekxBDsIOgt0D33zuBEtvQVXci4ItqFCJP3voxAWpf l9hQ== 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=Gw4oD/kautcgPTLcXdMRAHXaIMVLyuWs8/txLPsbKBE=; b=N+16RcDhxhwfEJD3mv7hSlFBrtCArkKWn/xk8fPN9kaJWrAWhyu/r7xerckXKN6AaR fbJuTMVTgmQ/NymLsoD4QZ1QMjrOSeBB5PAO/+bVbiEW05WqSkos9f6DWGGESdnp1PaD 04yifOwenTUgVOs7Aq83Vm0u+MgVKLrwy0VGK4FPmnVqPji0aZ5bczfc5RxfOVyOgwhZ RxSFKWvecrgLZalwFvtUxhb6/5Pc1VY0EvWeBOKFROkutTHqKXzCDvcZF4OQxAxUD0uW vrmh9/OXsVlVCmpWh4qkj23pSznzjuLR1XsZG1xe5+HAuSHfDvZH2bhpeBIuLsdlo3pj xlKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yHyEiIl8; 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 ck13si24499866pjb.47.2019.07.29.13.15.54; Mon, 29 Jul 2019 13:16:10 -0700 (PDT) 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=yHyEiIl8; 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 S1730351AbfG2UOq (ORCPT + 99 others); Mon, 29 Jul 2019 16:14:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:40178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbfG2T1e (ORCPT ); Mon, 29 Jul 2019 15:27:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 26B0B2070B; Mon, 29 Jul 2019 19:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428453; bh=ShgKpm0eZJ7Plq1nkdU7/k8Ezm6faceNi+rb9OH4lOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yHyEiIl8kaUgbgk8yEm8BW97w59GKsDg8BQ3R6j6W+Lha+6qFAn2C3xDmR4uX8Mqt GLxxAgf8hx1MWDRj37j1dLv3F0HjK1/sqHJc5pmwmd9ldEBAumT49AZVKkdq3wi04l ZfOYXeQyTzXG8ZKKkPxSXEk1Jdu9aBFZ3oGdoumA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Chanwoo Choi , Daniel Lezcano , Sasha Levin Subject: [PATCH 4.14 081/293] clocksource/drivers/exynos_mct: Increase priority over ARM arch timer Date: Mon, 29 Jul 2019 21:19:32 +0200 Message-Id: <20190729190830.826229620@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit 6282edb72bed5324352522d732080d4c1b9dfed6 ] Exynos SoCs based on CA7/CA15 have 2 timer interfaces: custom Exynos MCT (Multi Core Timer) and standard ARM Architected Timers. There are use cases, where both timer interfaces are used simultanously. One of such examples is using Exynos MCT for the main system timer and ARM Architected Timers for the KVM and virtualized guests (KVM requires arch timers). Exynos Multi-Core Timer driver (exynos_mct) must be however 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. To ensure selecting Exynos MCT as the main system timer, increase MCT timer rating. To ensure proper starting order of both timers during suspend/resume cycle, increase MCT hotplug priority over ARM Archictected Timers. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Daniel Lezcano Signed-off-by: Sasha Levin --- 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 d55c30f6981d..aaf5bfa9bd9c 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, /* use value higher than ARM arch timer */ .read = exynos4_frc_read, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, @@ -466,7 +466,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 0c78ad0cc515..0834eb5ea9e6 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_METAG_TIMER_STARTING, CPUHP_AP_QCOM_TIMER_STARTING, -- 2.20.1