Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3271869imm; Tue, 17 Jul 2018 01:50:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf5dTRAIcBlRxpXHcr4RInJQSgNv2W75arHj0yDcsUNqIH49U5Y3FHQ20TdUP1e2PXHJZHG X-Received: by 2002:a62:6a01:: with SMTP id f1-v6mr788681pfc.156.1531817411414; Tue, 17 Jul 2018 01:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531817411; cv=none; d=google.com; s=arc-20160816; b=hGQS5L2E5WM+YvZpBmGvV3SGDaEKcjCAzK54bCynL76hhXev5/bNosqevdLREZv7FX E1XK5UB+4sonHxJyNzAsWKfe5Lsch63bgS9/F96RUwmK49hkPyIQyU/QNIHj67/udZnY wEohbvpwtgLkzvpILOtqsafCMS4nUnhE/zc2BtQGLc7zGDGgWgqWjWrcii5A97Fq8g1y tsXsmEl6S8s0j6KomTfCfHDUP1q/iKM0ycxa9lVH3b8PaVCfAuf/6v/SDWqYWz3huOUe cHemghxHXZlv9UdyQ4KZsxQPKK/1vdJC+gvuj+nOFBHKs36xoZYtns7LULcgq3ewfSMa YgYg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=YsUBJbK6QfW3n/j1Hb4Fk31inSrLXIeIFA4IppZCSFc=; b=GOZPB2hh/NzUqBwDnITG5XMfT5ectcfI4p3yuijJ+9A+r05BuAQmOT0WL5zArxX++x uunoUdar2eJ50iK+zLDSbBWnmHnLZKU7CX1yrIFZZ/cShauX5MutAKfwtwxoRfNeexGN dLKUuSdTWQ9sWPegV04+oMrFacCJWAri2O2IR8Pxkdrfs86D/6EsNrd7xdoHkn1aRFjg qvcR0TLaTZ+T9Bk1M45UB8rUdcggQdf/SxlG3NcolfRXTjZDcbBtP74/eADaOhCLAmeV qpf87hCLSO8ftvD2ZIw8v1/HbKncxj9FV23YtbD51qvHCPqJMUdvguBc3EjGicdKruGG ywOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XJ7CvU2w; 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 139-v6si429757pgg.408.2018.07.17.01.49.55; Tue, 17 Jul 2018 01:50:11 -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=@linaro.org header.s=google header.b=XJ7CvU2w; 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 S1729659AbeGQJUI (ORCPT + 99 others); Tue, 17 Jul 2018 05:20:08 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35412 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728624AbeGQJUI (ORCPT ); Tue, 17 Jul 2018 05:20:08 -0400 Received: by mail-wm0-f68.google.com with SMTP id y22-v6so655066wma.0 for ; Tue, 17 Jul 2018 01:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YsUBJbK6QfW3n/j1Hb4Fk31inSrLXIeIFA4IppZCSFc=; b=XJ7CvU2wqUhxagL51ier5M3VPk7nBdy5k6k1hGv57Tl6pVyabWgH1/7zHAqjqj49ti qEsXltsL2rkn/um6Sz3f8JhzH4tFs9L7ObKqXdAks30whcmfCNl/hNIgiup69+q/XTig m68Auuvs22IalKto1n38WlR/MouQTLxkU8Jmw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YsUBJbK6QfW3n/j1Hb4Fk31inSrLXIeIFA4IppZCSFc=; b=Vm/VXeDUOvy6XwhyCNzfEOJWo5LLRYtJK5BH4oqiE0tIEmK8z8vGRld3ZKg2rJBFpn QHgasjCD6YwWGygQYCcFMVFkzDpAGr0YU2DyMMkZkmZjusn4Ipi9KbSbtKp7V2ZoAm+z c8gDr2RtBi7zHZ3smGNfz8JwAj6aMUe6IJMYA2PEA0OKIpigxf39NYa80QD69pVapL0S /LN26NmOtYZvXcVCtat2IGF9cZ9nzETdqA0xFG2j66FOWiXYQvjLkBYI+Z6pSeu3NLad zDp7TfFXUAxUAuNF2i9bHBrJryGTdZwFScfiXS9zDc7S42EzKVL/0HlTmc025Qzrd8ma Fx0g== X-Gm-Message-State: AOUpUlFoBR39s+ZuzCzOgZ2gAKA5JI3/cyBOg2Ak2vwq4UC4wua2/WEK GuInyFj1k6evqzjokELPL3SnEQF0aDM= X-Received: by 2002:a1c:20cb:: with SMTP id g194-v6mr752789wmg.102.1531817315171; Tue, 17 Jul 2018 01:48:35 -0700 (PDT) Received: from [192.168.8.101] ([37.168.37.237]) by smtp.googlemail.com with ESMTPSA id r1-v6sm362780wrs.39.2018.07.17.01.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 01:48:34 -0700 (PDT) Subject: Re: [PATCH 1/2] time: Introduce one suspend clocksource to compensate the suspend time To: Baolin Wang , tglx@linutronix.de, john.stultz@linaro.org, sboyd@kernel.org, arnd@arndb.de, broonie@kernel.org Cc: linux-kernel@vger.kernel.org References: From: Daniel Lezcano Message-ID: <9efe5275-e429-76c7-7746-7750c8fd4203@linaro.org> Date: Tue, 17 Jul 2018 10:48:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/07/2018 09:55, Baolin Wang wrote: > On some hardware with multiple clocksources, we have coarse grained > clocksources that support the CLOCK_SOURCE_SUSPEND_NONSTOP flag, but > which are less than ideal for timekeeping whereas other clocksources > can be better candidates but halt on suspend. > > Currently, the timekeeping core only supports timing suspend using > CLOCK_SOURCE_SUSPEND_NONSTOP clocksources if that clocksource is the > current clocksource for timekeeping. > > As a result, some architectures try to implement read_persistent_clock64() > using those non-stop clocksources, but isn't really ideal, which will > introduce more duplicate code. To fix this, provide logic to allow a > registered SUSPEND_NONSTOP clocksource, which isn't the current > clocksource, to be used to calculate the suspend time. > > Suggested-by: Thomas Gleixner > Signed-off-by: Baolin Wang > --- Reviewed-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog