From patchwork Wed Jan 17 06:01:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 124779 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1268118lje; Tue, 16 Jan 2018 22:03:23 -0800 (PST) X-Google-Smtp-Source: ACJfBoulEGzgKbt9AEm1+IBKPkt6/ZaBh79uqm8g06iYIRh88EAYZGGTi7bdmMr7sOD3OV7JYwsY X-Received: by 10.98.103.83 with SMTP id b80mr27610808pfc.223.1516169003769; Tue, 16 Jan 2018 22:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516169003; cv=none; d=google.com; s=arc-20160816; b=VSsUXALlr0IOAAZSz2ElXIR7zQ84r4rZ2KFghfRyKVsq9A0s+Bsl9UnR2xkdYQ7O// xjAvPjFcdg3w3tITrpcMZQi3gEQJDYx1+G7MWXz/J/IlknOQu46LAjSAMmWXDuksF19b 5scPybk1v4EUcODloiE4aOyHq9njMq1WKFqT4RK0vDF+m75ZQyQRdTpkMh5dGEe/nXzp dNepSFmfXuJU6KY6F5qpTrqspJgxrSuZZlQZoBtGnTaelno6rOIiBQ4Apb0uEgtHC/3z AYiwuDyngsJXwoDJ+ogioScOlQhIx1vZwG97nVYr4q3+lB8wd822YesPNTvFak33HXv2 T8WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=vbvDOgGhg5rLg9YU57Czp6AVkkQiMHqma7Y1G6xTlmg=; b=RxgD+RujKErEJQvt7i4zcaK9keIT+IcwVAa7udkhwbtygugmqD4PzTk73jo8cSbaoi xz9A7z568xY9aPQVgi9Cdn4TSoe0hUdBY/gBEI9mIWGB82AmHsKT9bmDNxF9FpPZEPZ2 LZrlcvqsljFOxk6HxPpSXHfke7BxX17zvR9oGAXt5ueJ6uv6HhR6fBxIWEeMlW03ttjz LyXiAsq5pfMb+rYr+YRc3Mn1PtGnhf+pFSgxP1ZbYmcTGnaFc7kweKW3Ost5ZZiTaLx1 EeNQXqqLtum8dcBrJ5m4t8kfaDHdlD6DwS5gW4gYz0I3YWqPUNf0P/69EGUQf3qLN0w3 zzmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lbwz50Ku; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si11513pgp.680.2018.01.16.22.03.23; Tue, 16 Jan 2018 22:03:23 -0800 (PST) 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=@linaro.org header.s=google header.b=Lbwz50Ku; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752164AbeAQGDV (ORCPT + 28 others); Wed, 17 Jan 2018 01:03:21 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:41424 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbeAQGDU (ORCPT ); Wed, 17 Jan 2018 01:03:20 -0500 Received: by mail-pg0-f65.google.com with SMTP id 136so10188599pgd.8 for ; Tue, 16 Jan 2018 22:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=vbvDOgGhg5rLg9YU57Czp6AVkkQiMHqma7Y1G6xTlmg=; b=Lbwz50KuJPMFfyJYAew2PbNTpdD1YXqr+ZDZexAg5nOaKiyB5x4AVuET9JG7GJ+JON 5I7Up2UW6fajkEqfFWAk8yfLAbjBBk60n7QTBhKMrhIWn8Xj6FLocPj/xdAITMQGTLuM qiXEoLGpf6WBQXi2GhFx8K5/cjVqLIFM56IUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vbvDOgGhg5rLg9YU57Czp6AVkkQiMHqma7Y1G6xTlmg=; b=IjfMLsP7/pSs0y9ALSVS05u/4vJqQIve3R47hiV1q+P80FV/yDAVPvWIQvx4b6KUlb EvuwERNiZyUB0XCdQLeUvxk+yZXPBIUYtMrTGrtfxAxdkJPGvjzzP0NJM8Wlrt+rplVx U2Yvkm7wj22MQk8CXpVPcqjZAsycNVJ1EoxVmFE2KlFFijEr4dzk/iNBgj+efbv8hh/E qC+pVwH7/xgvV3YZEeqlzpI8+p5qvGBxNbI0O0vGyrWRC3o9he3Lf/j5Ho+4uTsX/MAr /GOvKR05t6m2jwP8nKRocFCXQps3SUCNOBAhzCQ+DrVKQv2H1RnrV//h/vxY91p9D6ob z4DQ== X-Gm-Message-State: AKwxytctTn39QVUVS9safg4hJ2ddC8Vpt/HoI35t75WRXkL7/WQ5Ig/j SQ+MJfMT2Y+/+4xWnk6jMP61sQ== X-Received: by 10.98.189.10 with SMTP id a10mr15825809pff.125.1516169000147; Tue, 16 Jan 2018 22:03:20 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id n66sm5987418pfn.64.2018.01.16.22.02.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 22:03:19 -0800 (PST) From: Baolin Wang To: john.stultz@linaro.org, tglx@linutronix.de, sboyd@codeaurora.org Cc: broonie@kernel.org, arnd@arndb.de, baolin.wang@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] clocksource: Skip to check the override clocksource if override name is empty Date: Wed, 17 Jan 2018 14:01:28 +0800 Message-Id: <069ce2a605546bcad6552968cff755f0a03f9f10.1516167691.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some platforms will not set the override clocksource name to select, so we can skip to check the override clocksource when selecting one clocksource. Signed-off-by: Baolin Wang --- kernel/time/clocksource.c | 4 ++++ 1 file changed, 4 insertions(+) -- 1.7.9.5 diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 65f9e3f..c5fdcb1 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -594,6 +594,9 @@ static void __clocksource_select(bool skipcur) if (!best) return; + if (!strlen(override_name)) + goto found; + /* Check for the override clocksource. */ list_for_each_entry(cs, &clocksource_list, list) { if (skipcur && cs == curr_clocksource) @@ -625,6 +628,7 @@ static void __clocksource_select(bool skipcur) break; } +found: if (curr_clocksource != best && !timekeeping_notify(best)) { pr_info("Switched to clocksource %s\n", best->name); curr_clocksource = best;