Received: by 10.213.65.68 with SMTP id h4csp1801310imn; Sun, 1 Apr 2018 15:36:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx48wlYe1dPbJWWewWOdeIagNUI2rT8Cu/XFFhvqRXN46rm2YJZH+J4iK3vtZm4qNq+7RALpI X-Received: by 10.98.194.133 with SMTP id w5mr5630730pfk.6.1522622163849; Sun, 01 Apr 2018 15:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522622163; cv=none; d=google.com; s=arc-20160816; b=M1cF3YV4cAP3BZc2ck5HMeBh1HfG1Op1B8oDq2WgcKiSLPxJ6xefas0XAXRbd1TCvz lglyHWrhZeH/G6WzMC2z9d6eF9S80sR2KIyAOfBDDCsCWTma8j4a6gi3ZR3PdjgG9m6m 9XWlOAtc8a8SRXrhTBYh6HhT2zz8fDspb97DM83rMMBcNlkweXYi1Q5ol7L0WBtCk0fN 5jsO6+H8wfToS4IV0LXdbyNJsBYv2m/X0vF9VR74tmQcnkSVfi+x5ib2He3apREVu1lm TUo9uaBF+jNvLNql22Pii83vVEk1oZ9WiNJThyUTVVLiUIcFUwaTm9kuQ1B5Z+fMBxIz da5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0sMTslClH9b87czLeItFm3koawlp6CatJQoGFi4OI6g=; b=MpxLmVcu0DIyQfGTz1HUv3sAZHBhAzItValN6IdPFbcX30ePTcLYYjTrl3uVvZaxih N2vGnJc+eFpZvPKMLpxWdBflTXwj/few3tFWno8SeruBzHKiZZf8pmwpSdrlELp5I32D pvJvW/gxOiMd/GLSrtQESpvkQDVb/QE37oj35o0egjrgl8q4Lf7IVBibZAFUbimcK+OJ N4SalvHlJ5RmCES8Qg5MfZt+/OyQVYy2xN/0zHtGq+aoFhzbHsn9k9CvWfi0p5SMSRni em03h6Du2CALyX63GkrLn7YpgPgT9qBP/X70HaNn+FUTWhHDdmjzOYnyKjoNWXO/BUUy xXIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i4eAb+he; 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 d21si1108941pfn.222.2018.04.01.15.35.50; Sun, 01 Apr 2018 15:36:03 -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=i4eAb+he; 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 S1754037AbeDAWeg (ORCPT + 99 others); Sun, 1 Apr 2018 18:34:36 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:46030 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977AbeDAWed (ORCPT ); Sun, 1 Apr 2018 18:34:33 -0400 Received: by mail-pl0-f67.google.com with SMTP id v18-v6so1084580ply.12 for ; Sun, 01 Apr 2018 15:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0sMTslClH9b87czLeItFm3koawlp6CatJQoGFi4OI6g=; b=i4eAb+herL6wksHOjiTHgr2Zhh7aZHJV+4Mki2zsq3iize2d+ExIkrszn/iB/rhmnl m0wrUhW4lL9v+gEe1NZgI+2sO7zfK4ECUv17dzzX2hegaZ8D7hgCuI/jarFONGo2Fa7E vFZpMkMqzOcootzT/82bfSOgGwF5DFmdmMVCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0sMTslClH9b87czLeItFm3koawlp6CatJQoGFi4OI6g=; b=F1iiFZzKOGrUKlYwxanOMYlBUPrp7awFuzmA4dSfri/Sl8m0t1tWqYPu2ma5pW74/T y3gvKzpeXmIpDkHRpaYKJc8cYAzvWOQMRgea0a0pjXS56a+WXEV8jwHI13eOiL/twrXT sCruksde14XKOVJ6epM0iQhjKj923isptlxqYPxFDk23J9+oe5Z1M/A2vZv4VsgZWg80 u8W6NHm9Gdv7ixR1rHXFR507rcBdNo2bBx/geih3+TQNQ7hfIvsWpfBbRTD6eY5rUsiF vsHTi0H32A3xJ+lOWJcScKBtNGjM/0pqgmubdgzg9Qg+kJroKpj3DaTFcGKCsJdJe+Qe 3KAQ== X-Gm-Message-State: AElRT7GHj26alUxerUhS/Lx6wrSEeFMoyTks9BNOrikqiXtj306WoQFM tXdO6o61/VRvpW9fjTJH7t9v9w== X-Received: by 2002:a17:902:1c1:: with SMTP id b59-v6mr7490085plb.325.1522622072756; Sun, 01 Apr 2018 15:34:32 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 67sm27687073pfp.122.2018.04.01.15.34.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 15:34:32 -0700 (PDT) Date: Sun, 1 Apr 2018 15:34:56 -0700 From: Bjorn Andersson To: Ilia Lin Cc: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: Re: [PATCH v4 01/14] soc: qcom: Separate kryo l2 accessors from PMU driver Message-ID: <20180401223456.GG510@tuxbook-pro> References: <1522358807-10413-1-git-send-email-ilialin@codeaurora.org> <1522358807-10413-2-git-send-email-ilialin@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522358807-10413-2-git-send-email-ilialin@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 29 Mar 14:26 PDT 2018, Ilia Lin wrote: > diff --git a/drivers/soc/qcom/kryo-l2-accessors.c b/drivers/soc/qcom/kryo-l2-accessors.c > new file mode 100644 > index 0000000..b0356c2 > --- /dev/null > +++ b/drivers/soc/qcom/kryo-l2-accessors.c > @@ -0,0 +1,66 @@ > +/* > + * Copyright (c) 2014-2015, 2018, The Linux Foundation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 and > + * only version 2 as published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ The copyright header in the C file should be: // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2014-2015, 2018, The Linux Foundation. All rights reserved. */ > + > +#include > +#include > +#include > + > +#define L2CPUSRSELR_EL1 sys_reg(3, 3, 15, 0, 6) > +#define L2CPUSRDR_EL1 sys_reg(3, 3, 15, 0, 7) > + > +static DEFINE_RAW_SPINLOCK(l2_access_lock); > + > +/** > + * set_l2_indirect_reg: write value to an L2 register * set_l2_indirect_reg() - write value to an L2 register > + * @reg: Address of L2 register. > + * @value: Value to be written to register. > + * > + * Use architecturally required barriers for ordering between system register > + * accesses, and system registers with respect to device memory > + */ > +void set_l2_indirect_reg(u64 reg, u64 val) As these are now kernel-global functions I recommend that you give them a slightly more specific name; e.g. kryo_l2_set_indirect_reg() and kryo_l2_get_indirect_reg(). [..] > diff --git a/include/soc/qcom/kryo-l2-accessors.h b/include/soc/qcom/kryo-l2-accessors.h > new file mode 100644 > index 0000000..3c796cf > --- /dev/null > +++ b/include/soc/qcom/kryo-l2-accessors.h > @@ -0,0 +1,20 @@ > +/* > + * Copyright (c) 2018, The Linux Foundation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 and > + * only version 2 as published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ And in the header file it should be: /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2014-2015, 2018, The Linux Foundation. All rights reserved. */ > + > +#ifndef __SOC_ARCH_QCOM_KRYO_L2_ACCESSORS_H > +#define __SOC_ARCH_QCOM_KRYO_L2_ACCESSORS_H > + > +void set_l2_indirect_reg(u64 reg_addr, u64 val); > +u64 get_l2_indirect_reg(u64 reg_addr); Rename "reg_addr" to "reg" to match the implementation. Regards, Bjorn