Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1125708ybi; Fri, 2 Aug 2019 09:42:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6AHUqfXz9GhlWaQAYmrWdnPfXuqHuQZO1ngvCOyJNyo//O/8PD+bnI63ChXEAhPpd8JqO X-Received: by 2002:a63:ff20:: with SMTP id k32mr125455042pgi.445.1564764122291; Fri, 02 Aug 2019 09:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564764122; cv=none; d=google.com; s=arc-20160816; b=r1XjYvKV2SFNnnqBSyvSXVpFJz9QOpdu6yof036raYN3FwCv+BK+rU625wCrFrtxkN JP1B45pGlY9a1PZXN1RZVDI3W3+55/eRc3u/49LCziJFiW1DNEPTAg8yRNAqE1IjCey5 dPfO95htOpCThnOMF3DoawAmunAgXqO62yMWmiR1UvXJ9Sdm+TB0QX1K4WA3N2khFqH3 cp3MY5zvM0q8weVbvwbptbJkv3NPN769DLz4qrjlHdkrVfQHqoWUXzCxdhdCo8pEejL4 ZFZ5Gkh37ESsatWoc9hOmCgY8HHY6Vkg2VsG6YS0jqYCp578Q8JXWB7yk+46/P0r6O+p T/Zw== 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=Bf8YsnMLL5HD4XBPlygWZL4NTeKvzteaO83BiCLd39w=; b=V+n6urYnAUpGIBoRXt+JNxi6QrdAWReg+qZNjQbNjoDm6TbZzr8wGqnyyNIJD2f9ZX KWdBNimwW0ZqT4ra8HA05IYi+QC3ekF6p+FPKwj4dDOeyGYABXzs3ZlVvKetcy8cpWOx jAsQnD3rLeezOOYgT+MQDeP1Ce5+HnvjbahJYjozNumJdzIhZdtW9RvarG6lugh7DjWQ gkMBFWQd3Tfq44gwqtPC2kd+Q0uoUE25ZtPLz/EdhVDT0tQD0lbcansuaFgiVDHqHVlG XyNKenEkilgxUdcI8pNqZQqbV3QcsEkTXVBrqaq8HOotFfSd990jHhw5NMSsgjj9xSf8 Dr/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oErQg+bU; 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 136si9388393pgg.354.2019.08.02.09.41.43; Fri, 02 Aug 2019 09:42:02 -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=oErQg+bU; 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 S2391885AbfHBJme (ORCPT + 99 others); Fri, 2 Aug 2019 05:42:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:44882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391873AbfHBJm3 (ORCPT ); Fri, 2 Aug 2019 05:42:29 -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 6AA5320679; Fri, 2 Aug 2019 09:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738948; bh=pK8Ll2I860qnniAXBoQKiXnsTkp7K/gvNEbcsFcB7bw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oErQg+bU3ImB4LYd8yAC6k4vAe1rjIYf5J4GT+JvRq8w9j8xsanJAOvvMp6IfM44m BaaZDIWjNBaDitvPHXackVQbJ1fIckUZ/FUSoMQ2ycyRynRGLL9BeCa6bnijLwZ9Sb Oh95hOsSsoNCRz+WruwYeu9lC1QVP9kLSg3LFzrE= 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.9 058/223] clocksource/drivers/exynos_mct: Increase priority over ARM arch timer Date: Fri, 2 Aug 2019 11:34:43 +0200 Message-Id: <20190802092242.625984965@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@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 fb0cf8b74516..d32248e2ceab 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 c9447a689522..1ab0273560ae 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -77,10 +77,10 @@ enum cpuhp_state { CPUHP_AP_PERF_ARM_HW_BREAKPOINT_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