From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D140C433E2 for ; Fri, 17 Jul 2020 05:21:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E40D206BE for ; Fri, 17 Jul 2020 05:21:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cnZO8/X9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="Um6lylkn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E40D206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1H7UBDUu9VaFZ9wx19oC5msRjWXCFJS5vMIyDarZTLE=; b=cnZO8/X9BtaV7kpYJSG+tjZ4J YIOyMSBR2TmowdKmYJvNyN3beJkyBFDNUDEZKCG/tzWnYWOFV64OKDf/aH16Q+CkRM9VdSrI39zpf KPVdhQECjZ85oHWo/WfA8kyy5LYYlE/qtzYZ5WEO9Y2vu5UTaI4omSF4j9ZDrSHazi76v4e4U6KLb LzsL7Rf2k5+3ri9H7O72f1DfYhopuW2oBD1tbd7VwKFO0GrzKrAzFIMvDGbnYJ1WcJPBJRjakNyOA zx56xSOi9XEIctCesy3eb1+KNAiQ0+da1daJkoQCkdyPhEs0UpEfwwZXmIDwRITYpNF3W+FzdoGuq 2NJYALs9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwIoJ-0005CL-5o; Fri, 17 Jul 2020 05:21:27 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwIoF-0005Bo-VE for linux-riscv@lists.infradead.org; Fri, 17 Jul 2020 05:21:25 +0000 Received: by mail-wr1-x443.google.com with SMTP id s10so9617164wrw.12 for ; Thu, 16 Jul 2020 22:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Txl23SYhqU4CFJgNmtRHcmqgdOnnkrGVMry+7+SHVI0=; b=Um6lylknChyL1OR7eW5Cr5ane6YZUWnV0SXE4vqFXu/ELh4Z7b3fyrNThjGCL0nlwl kuu20mdky7crrzFpwpWiAqj1XCA4BueQSsqfbqaOGn6E1cJ+NDYeJaz3cE8w6cv+w9qE s8R8niwltE0xyz8reBTW1YRDB2reXu4Et0CIoT+qEli3AyaKlvNV6qXSIHkhUtsasM2x s5myGeDLhawzzEWwHoi/dG/4JO5qSc/sC58gphwGEJ8vK3JfZDPIwUAeFzRIb3JdL+nP XQVaf743301pUga7sYiWzothWYzJVdoiGHWfhKXYlWGALc0XzrtvAewI4sSBjE2JkKeX lfyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Txl23SYhqU4CFJgNmtRHcmqgdOnnkrGVMry+7+SHVI0=; b=BHQ8yvt24xyR9y2a6meN4gmWd8Dqi5jhHI0HqZoSHHYZ8mber55wkiRn22jjAfQ4vL ahdCDJQ+ot4Y+CtqxNuTZRiCUKZS9tFvlWdSgsPcDFJCbgy5FegTNvWJ0RYItQ7dFMHM reP1WDji+qamuJqgW5szUVj3tjMwQVKUBFGonTNtkwtrYbflF8qfhMkltsar8Jor7kW7 /24Q8tjr1V6rgGGjagGoEwpMgchOsQdVuYEzfBht9Cy70iC64kmHHvrWvfxmRCGhbsXu r9AJEgXPlDSMcuo8xVyDA6AHcDhHMPRPQ152cpgg7xV+HZGb90ACLqGir3rM+9SWUIB6 WQYw== X-Gm-Message-State: AOAM531hOPDalPPWBZR20OOy3cRWEFNcSFsgNFs+9dHMCPc4934UJFcb w7zticdRzn3lFulTR7utLnSBWLQM+UMquETnlwNQeg== X-Google-Smtp-Source: ABdhPJybDCXcZ50/toMOuo5zRNW4SflJKE6iLzPyyHW1LE2nGkJvcPBvXVKS3c2n0ukmR1x5G6LOQdUVlYPD8+EA3S4= X-Received: by 2002:adf:b190:: with SMTP id q16mr8608059wra.356.1594963282019; Thu, 16 Jul 2020 22:21:22 -0700 (PDT) MIME-Version: 1.0 References: <20200715071506.10994-1-anup.patel@wdc.com> <20200715071506.10994-3-anup.patel@wdc.com> <9a36824c-ef23-de47-b52c-bf680067be6c@linaro.org> In-Reply-To: <9a36824c-ef23-de47-b52c-bf680067be6c@linaro.org> From: Anup Patel Date: Fri, 17 Jul 2020 10:51:10 +0530 Message-ID: Subject: Re: [PATCH v3 2/4] clocksource/drivers: Add CLINT timer driver To: Daniel Lezcano X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_012124_147259_6D70669A X-CRM114-Status: GOOD ( 37.48 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Damien Le Moal , Albert Ou , Anup Patel , "linux-kernel@vger.kernel.org List" , Atish Patra , Rob Herring , Palmer Dabbelt , Paul Walmsley , Alistair Francis , Thomas Gleixner , linux-riscv Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org T24gRnJpLCBKdWwgMTcsIDIwMjAgYXQgMjo1NyBBTSBEYW5pZWwgTGV6Y2Fubwo8ZGFuaWVsLmxl emNhbm9AbGluYXJvLm9yZz4gd3JvdGU6Cj4KPgo+IEhpIEFudXAsCj4KPgo+IE9uIDE1LzA3LzIw MjAgMDk6MTUsIEFudXAgUGF0ZWwgd3JvdGU6Cj4gPiBUaGUgVElNRSBDU1IgYW5kIFNCSSBjYWxs cyBhcmUgbm90IGF2YWlsYWJsZSBpbiBSSVNDLVYgTS1tb2RlIHNvIHdlCj4gPiBzZXBhcmF0ZSBh ZGQgQ0xJTlQgZHJpdmVyIGZvciBMaW51eCBSSVNDLVYgTS1tb2RlIChpLmUuIFJJU0MtViBOb01N VQo+ID4ga2VybmVsKS4KPgo+IFRoZSBkZXNjcmlwdGlvbiBpcyBjb25mdXNpbmcsIHBsZWFzZSBy ZXdvcmQgaXQgYW5kIGdpdmUgYSBiaXQgbW9yZQo+IG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ICAgICAgICBw cl9lcnIoIiVwT0ZQOiBmYWlsZWQgdG8gcGFyc2UgaXJxICVkLlxuIiwgbnAsIGkpOwo+ID4gKyAg ICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwo+ID4gKyAgICAgICAgICAgICB9Cj4gPiArCj4g PiArICAgICAgICAgICAgIGlmICgob2lycS5hcmdzX2NvdW50ICE9IDEpIHx8Cj4gPiArICAgICAg ICAgICAgICAgICAob2lycS5hcmdzWzBdICE9IFJWX0lSUV9USU1FUiAmJgo+ID4gKyAgICAgICAg ICAgICAgICAgIG9pcnEuYXJnc1swXSAhPSBSVl9JUlFfU09GVCkpIHsKPiA+ICsgICAgICAgICAg ICAgICAgICAgICBwcl9lcnIoIiVwT0ZQOiBpbnZhbGlkIGlycSAlZCAoaHdpcnEgJWQpXG4iLAo+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBucCwgaSwgb2lycS5hcmdzWzBdKTsKPiA+ ICsgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT0RFVjsKPiA+ICsgICAgICAgICAgICAg fQo+ID4gKwo+ID4gKyAgICAgICAgICAgICAvKiBGaW5kIHBhcmVudCBpcnEgZG9tYWluIGFuZCBt YXAgdGltZXIgaXJxICovCj4gPiArICAgICAgICAgICAgIGlmICghY2xpbnRfdGltZXJfaXJxICYm Cj4gPiArICAgICAgICAgICAgICAgICBvaXJxLmFyZ3NbMF0gPT0gUlZfSVJRX1RJTUVSICYmCj4g PiArICAgICAgICAgICAgICAgICBpcnFfZmluZF9ob3N0KG9pcnEubnApKQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgIGNsaW50X3RpbWVyX2lycSA9IGlycV9vZl9wYXJzZV9hbmRfbWFwKG5wLCBp KTsKPiA+ICsgICAgIH0KPiA+ICsKPiA+ICsgICAgIC8qIElmIENMSU5UIHRpbWVyIGlycSBub3Qg Zm91bmQgdGhlbiBmYWlsICovCj4gPiArICAgICBpZiAoIWNsaW50X3RpbWVyX2lyc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