Received: by 10.192.165.156 with SMTP id m28csp935953imm; Fri, 13 Apr 2018 10:19:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Mrgwr3T54HK8I4JcBpBHtKhHwGrFo7DiXOaUG7NckUuxyVoHU6yNnVJX22uwTAnxgyCV/ X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12-v6mr5820595plb.380.1523639984980; Fri, 13 Apr 2018 10:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523639984; cv=none; d=google.com; s=arc-20160816; b=POh1pc+PsleZw1zYcWgCGglMZmSEMoE1XN18yenfpuzsKIPFsRyVw26aOIOKoz0lad dxHE13T94cFfL1FrjIJF7UFhO4jicd7EHZYCUsWUWfhJhA0OQd2DC73Z8KwE88jXE9U5 lSX5P1UVIrZqqAf4s92OlPDpj6CKyzalrXd9ulnXnA6yBIsC8+IpppjVlRdN2kseXizd tyVRyw0erxkwisczSX9NbZSrtRTmzdmG0M/e13UeIoIH4X/ZtnlRhkHsnjCu7bnUfKfs guBNk1E72Y/7DR84+LhEE6uUIdzZdTW+TX99IpyORKHB3pVzFygDy4rh/tJBouAnWZPZ DKCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=VS534z1mtb2ALST4HeJW2sLWMX9ypDf5Ny45UODTmuM=; b=ANVESrg1RSupU+AE9Yi0qlCslhoiR0kmQrGGtyVozJf0AUsei5BGc6zHxnCTAQNX9L zG/kqDpIPpSMrplq5K6kThHyIvg5tdJUDWrXCfebyGrJqkDp6Z6uQedW4iBzJ6A9ZoV8 ug13lPmiQXy1Cx6zcAEsxrz+OUIKkJEske15y7zbb1Vu55FN5UpWhMc1nodxGHUOg4I2 XXYRHXz262XwXlSluNchYMJI2kRYJK20pOz8CSR4VkvBaVNB5p3n4GulaG/3o3lUv/Kc FI0VKPweB8RHKmMSphAtFQ4YXRLU/gwG5N3SdAVP7Stz82xBTAT+ifOJcEXt3zo1t2qf n4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BcMPBooq; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si4396607pgf.678.2018.04.13.10.19.30; Fri, 13 Apr 2018 10:19:44 -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=@chromium.org header.s=google header.b=BcMPBooq; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751071AbeDMRSO (ORCPT + 99 others); Fri, 13 Apr 2018 13:18:14 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37456 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeDMRSL (ORCPT ); Fri, 13 Apr 2018 13:18:11 -0400 Received: by mail-pl0-f66.google.com with SMTP id v5-v6so6443937plo.4 for ; Fri, 13 Apr 2018 10:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=VS534z1mtb2ALST4HeJW2sLWMX9ypDf5Ny45UODTmuM=; b=BcMPBooq7XqaUP1a722LTdi3dEcVvAFe8E4PJe1vwgwuskRj3i8yzFuhSAzc/AfEEs be7xDzWVsfM2c71Bl4rkJn+yaDyS2efDuc1FZX54M1Y7Q4f1yUqzi3fcn3vLfFoUt4y0 t1c7NgNnHaHfWM6Zycy5aM7vpFBq5F2yXUUhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=VS534z1mtb2ALST4HeJW2sLWMX9ypDf5Ny45UODTmuM=; b=YYTwMVv44s9RnLTNzR7Q8VroEr35Up/XOWsZG74yF32olEF2PShoCeVeZyplVavfld qpOC/aw2/i36PMXDVcHO/MaR28nit7W/sOV2kF/kTYtgM34yY2Q68fBoaJK9He4Nwfaj GVKKCwyhDtfqV9Yy1sL6HG24AkjygibQxH5NkExGJkWYdf3ypmT18/rsxBRHcTXl7tPu 6TEyVRKdwEwB2wduxG7Ht/d6fLPeldh81XjkvbwU/XIvot8cPoW652NTmiSpVjvF9tH3 vx9bGMd+irscS7zSD553DWXHueYGCXeNYNcbMuHkM8Y1M6TCljqd8iKnJW81m2J8F6U1 NE4Q== X-Gm-Message-State: ALQs6tCkCbQztCL9Mv5OrlZhUIak4VBkybH6K30sDDQLcqyzMJpLmKC0 YvNPZCAnGKd2V5DSHg8CsvQXYA== X-Received: by 2002:a17:902:6e01:: with SMTP id u1-v6mr5924522plk.96.1523639891355; Fri, 13 Apr 2018 10:18:11 -0700 (PDT) Received: from localhost ([2620:0:1000:1511:d30e:62c6:f82c:ff40]) by smtp.gmail.com with ESMTPSA id r14sm13832102pfa.163.2018.04.13.10.18.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Apr 2018 10:18:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Bjorn Andersson , Lina Iyer From: Stephen Boyd In-Reply-To: <20180411000120.GD6727@builder> Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, dianders@chromium.org References: <20180405161834.3850-1-ilina@codeaurora.org> <20180405161834.3850-5-ilina@codeaurora.org> <20180411000120.GD6727@builder> Message-ID: <152363988938.51482.11232650494199609730@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v5 04/10] drivers: qcom: rpmh: add RPMH helper functions Date: Fri, 13 Apr 2018 10:18:09 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Bjorn Andersson (2018-04-10 17:01:20) > On Thu 05 Apr 09:18 PDT 2018, Lina Iyer wrote: > = > > = > > diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c > > new file mode 100644 > > index 000000000000..e3c7491e7baf > > --- /dev/null > > +++ b/drivers/soc/qcom/rpmh.c > > @@ -0,0 +1,253 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > + > > +#include "rpmh-internal.h" > > + > > +#define RPMH_MAX_MBOXES 2 > > +#define RPMH_TIMEOUT_MS 10000 > = > Just define this in jiffies and you don't need to do msecs_to_jiffies() > every time you use it. > = Put the msecs_to_jiffies() here if you want. The compiler will constant fold it to the final value, and then we get the same time in seconds no matter what the jiffies frequency is configured for.