Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1985621imm; Wed, 16 May 2018 06:14:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqoffoZ+A4zvZymmPFiQWwNAQUR9Lg0r4XiANB+4Xf1SGiNY7e/sl2ksMq0fGnxeJDoaWWt X-Received: by 2002:a62:9696:: with SMTP id s22-v6mr904273pfk.191.1526476468726; Wed, 16 May 2018 06:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526476468; cv=none; d=google.com; s=arc-20160816; b=axHf0Lc+mMMpS1WcB/nhkn8ZsGIEcscpdLJA1VRhWnUaxjuLmkwRkzjEVYFMz3izNM IChEQM6gP7G5MYrS+lKIdu3Z6d5eVuAzzpickTGjVk1YFjV9UXn7MqpcnPqI8sDiQhK7 3Tp73I6g+0YGGIVd9kCVR+P06j96t4pmIBHskqpIiDX6xYcF0PlQzH7WKakAsASm8GMg YjHFWceHGcE7AY4/d2F4b3ZbOx1aP799ZW+X2Zx9Pg1C+HrQZiFwQGbsGQwA66Jt7nEx 1s4x0psTwqSZ5TZhRykkKHH05Bi0iSXidRsuTy/nIn2tgTrHxxy7JmFaKnEGhxh3hjsv U/cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=wtnXByRhM2+MQkAwRSnvQ97y4pesaa6zHn9NmXPEZ7g=; b=WcwW/u9aKQ5zDmte3cvelKWtP+92IVdw2hpn0TJ2RvBOKUo818X5D1TOl9Vq/U2AOH +XOE4X7hKYRfGiGRTOTNoONiI53SjJ3PPshTMs8iaw/HhA1S28Ad7/NyF+TNsfd0OVQs c0lHMV5hydGvJ2rG3tHP1gAyFPFiBHff4j6AZl5clf6iMxPVXlvIhJWZhEC7WlLxU3zy Ufbr5nq76Am++3o7rLCbJnkh+IPYn3HgSP/MnHjPmwXE7GUp3JIEBMrjjriNcuK+0x9x LJO9A/oGd84KiEwCFBU2oKgIRMq+Bma+bC91OjsZ/Gc253wtjfVWZLRmWq6RmRvuMjg+ rX9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=UAl0y2Tl; dkim=fail header.i=@linaro.org header.s=google header.b=UMY8sCHw; 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=fail (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 32-v6si2605900pls.157.2018.05.16.06.14.14; Wed, 16 May 2018 06:14:28 -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=fail header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=UAl0y2Tl; dkim=fail header.i=@linaro.org header.s=google header.b=UMY8sCHw; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbeEPNMT (ORCPT + 99 others); Wed, 16 May 2018 09:12:19 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:38096 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbeEPNMP (ORCPT ); Wed, 16 May 2018 09:12:15 -0400 Received: by mail-ot0-f196.google.com with SMTP id n3-v6so816156ota.5 for ; Wed, 16 May 2018 06:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=wtnXByRhM2+MQkAwRSnvQ97y4pesaa6zHn9NmXPEZ7g=; b=UAl0y2TlIG9C4+OenNaanX2k1YAVUkzCCOr4BW0qj+58yoxYRyCD1FY+1nGZJtJI8S DRIMC1gQ7QqlGk6z4hwh+IBfWzQGhFYtVXh/aWflVZkOTaVrxg1/D9mYiKvCgwJlz8BG DomST4WuE8/QYGrQhBUQFJT4ckyWhN6gD4dXXT5AIDzxwnIyLD8w7AH34MPMzSYN/SvI YWndDZJ6OiLQevcBwTWPqKgxdKYjKmNx1DpEFBpZ0YG5ReLdLPwg25a8zT4pUnx/pzY6 dX57neRbPTTtGQSAPGaElHXhzg5AK5WNK2mr04F8as+bl4pBwSu6SK1zsunj01Z4eH+9 hw3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=wtnXByRhM2+MQkAwRSnvQ97y4pesaa6zHn9NmXPEZ7g=; b=UMY8sCHww0Zebf0+4NXdCIux0H09OjWYotjCrAXYg0e1DPK6YWZjPjrKOjOZxoFIUH LoTnLzJuAXJNDLQHuVfIZld1fNS88TrxNLVg8YRyFZbI2183oMpkg6pijgMyfsC1c4SU GM1GusYCJ/p5BeEYkCalSP8uPqGn69RLt6Suk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=wtnXByRhM2+MQkAwRSnvQ97y4pesaa6zHn9NmXPEZ7g=; b=f83kZSXg05NMz8Mtoi5Aa66n+6IEMgkIDNACUGSCREy5oDgAcstNyAVDjudVY7vpup /a91UOTnWUZ1UMkpOpy8gNCLWfzT8yH3rQwd2jssJJGiL2HwyeTpMP/C1tblwR+kIQNq TeHmPny2MOVtLcOi/DTOCQqce/Bse779v2khvC0imj2auCwyFCxf+CKx4o6PfZbwBTxY 23a20gwrhYBalUr/IEnZN70KPTDKvCNR4ogr21m8WCEEZj5lmWBRzJWI0IpH3CLWjaYp y6LrKb9TkJSJpuVZAIlBp1Yl5u32/O95V3ZcFehzrLAfV1vVCZVQrD3rOPOxhTPfKAC8 x1xg== X-Gm-Message-State: ALKqPwdJ8/a1jBsW81Lc76QwQazdRmqPCe01lE9m5v4cJSITQ+HPErmk K6PIAy4Mt5SAIxPu/BGP0zJWjGtXMtl7P7+6zQCtVw== X-Received: by 2002:a9d:52a4:: with SMTP id f36-v6mr638941oth.0.1526476334609; Wed, 16 May 2018 06:12:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.196.133 with HTTP; Wed, 16 May 2018 06:12:13 -0700 (PDT) In-Reply-To: <1526375616-16904-2-git-send-email-ilialin@codeaurora.org> References: <1526375616-16904-1-git-send-email-ilialin@codeaurora.org> <1526375616-16904-2-git-send-email-ilialin@codeaurora.org> From: Amit Kucheria Date: Wed, 16 May 2018 16:12:13 +0300 X-Google-Sender-Auth: 9VOxVVVsmrwMp_12bPwWJcn4OCE Message-ID: Subject: Re: [PATCH v7 01/14] soc: qcom: Separate kryo l2 accessors from PMU driver To: Ilia Lin Cc: Michael Turquette , sboyd@kernel.org, Rob Herring , Mark Rutland , Viresh Kumar , nm@ti.com, lgirdwood@gmail.com, broonie@kernel.org, Andy Gross , David Brown , catalin.marinas@arm.com, will.deacon@arm.com, "Rafael J. Wysocki" , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, LKML , Linux PM list , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, lakml , Rajendra Nayak , nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > The driver provides kernel level API for other drivers > to access the MSM8996 L2 cache registers. > Separating the L2 access code from the PMU driver and > making it public to allow other drivers use it. > The accesses must be separated with a single spinlock, > maintained in this driver. > > Signed-off-by: Ilia Lin > --- > drivers/perf/Kconfig | 1 + > drivers/perf/qcom_l2_pmu.c | 90 ++++++++++-------------------------- > drivers/soc/qcom/Kconfig | 3 ++ > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/kryo-l2-accessors.c | 65 ++++++++++++++++++++++++++ > include/soc/qcom/kryo-l2-accessors.h | 21 +++++++++ > 6 files changed, 115 insertions(+), 66 deletions(-) > create mode 100644 drivers/soc/qcom/kryo-l2-accessors.c > create mode 100644 include/soc/qcom/kryo-l2-accessors.h > > diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig > index 28bb5a0..561252a 100644 > --- a/drivers/perf/Kconfig > +++ b/drivers/perf/Kconfig > @@ -69,6 +69,7 @@ config HISI_PMU > config QCOM_L2_PMU > bool "Qualcomm Technologies L2-cache PMU" > depends on ARCH_QCOM && ARM64 && ACPI > + select QCOM_KRYO_L2_ACCESSORS > help > Provides support for the L2 cache performance monitor unit (PMU) > in Qualcomm Technologies processors. > diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c > index 842135c..cc31f51 100644 > --- a/drivers/perf/qcom_l2_pmu.c > +++ b/drivers/perf/qcom_l2_pmu.c > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > > #define MAX_L2_CTRS 9 > > @@ -87,8 +88,6 @@ > #define L2_COUNTER_RELOAD BIT_ULL(31) > #define L2_CYCLE_COUNTER_RELOAD BIT_ULL(63) > > -#define L2CPUSRSELR_EL1 sys_reg(3, 3, 15, 0, 6) > -#define L2CPUSRDR_EL1 sys_reg(3, 3, 15, 0, 7) > > #define reg_idx(reg, i) (((i) * IA_L2_REG_OFFSET) + reg##_BASE) > > @@ -107,48 +106,7 @@ > #define L2_EVENT_STREX 0x421 > #define L2_EVENT_CLREX 0x422 > > -static DEFINE_RAW_SPINLOCK(l2_access_lock); > > -/** > - * 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 > - */ > -static void set_l2_indirect_reg(u64 reg, u64 val) > -{ > - unsigned long flags; > - > - raw_spin_lock_irqsave(&l2_access_lock, flags); > - write_sysreg_s(reg, L2CPUSRSELR_EL1); > - isb(); > - write_sysreg_s(val, L2CPUSRDR_EL1); > - isb(); > - raw_spin_unlock_irqrestore(&l2_access_lock, flags); > -} > - > -/** > - * get_l2_indirect_reg: read an L2 register value > - * @reg: Address of L2 register. > - * > - * Use architecturally required barriers for ordering between system register > - * accesses > - */ > -static u64 get_l2_indirect_reg(u64 reg) > -{ > - u64 val; > - unsigned long flags; > - > - raw_spin_lock_irqsave(&l2_access_lock, flags); > - write_sysreg_s(reg, L2CPUSRSELR_EL1); > - isb(); > - val = read_sysreg_s(L2CPUSRDR_EL1); > - raw_spin_unlock_irqrestore(&l2_access_lock, flags); > - > - return val; > -} > > struct cluster_pmu; > > @@ -219,28 +177,28 @@ static inline struct cluster_pmu *get_cluster_pmu( > static void cluster_pmu_reset(void) > { > /* Reset all counters */ > - set_l2_indirect_reg(L2PMCR, L2PMCR_RESET_ALL); > - set_l2_indirect_reg(L2PMCNTENCLR, l2_counter_present_mask); > - set_l2_indirect_reg(L2PMINTENCLR, l2_counter_present_mask); > - set_l2_indirect_reg(L2PMOVSCLR, l2_counter_present_mask); > + kryo_l2_set_indirect_reg(L2PMCR, L2PMCR_RESET_ALL); > + kryo_l2_set_indirect_reg(L2PMCNTENCLR, l2_counter_present_mask); > + kryo_l2_set_indirect_reg(L2PMINTENCLR, l2_counter_present_mask); > + kryo_l2_set_indirect_reg(L2PMOVSCLR, l2_counter_present_mask); > } > > static inline void cluster_pmu_enable(void) > { > - set_l2_indirect_reg(L2PMCR, L2PMCR_COUNTERS_ENABLE); > + kryo_l2_set_indirect_reg(L2PMCR, L2PMCR_COUNTERS_ENABLE); > } > > static inline void cluster_pmu_disable(void) > { > - set_l2_indirect_reg(L2PMCR, L2PMCR_COUNTERS_DISABLE); > + kryo_l2_set_indirect_reg(L2PMCR, L2PMCR_COUNTERS_DISABLE); > } > > static inline void cluster_pmu_counter_set_value(u32 idx, u64 value) > { > if (idx == l2_cycle_ctr_idx) > - set_l2_indirect_reg(L2PMCCNTR, value); > + kryo_l2_set_indirect_reg(L2PMCCNTR, value); > else > - set_l2_indirect_reg(reg_idx(IA_L2PMXEVCNTR, idx), value); > + kryo_l2_set_indirect_reg(reg_idx(IA_L2PMXEVCNTR, idx), value); > } > > static inline u64 cluster_pmu_counter_get_value(u32 idx) > @@ -248,46 +206,46 @@ static inline u64 cluster_pmu_counter_get_value(u32 idx) > u64 value; > > if (idx == l2_cycle_ctr_idx) > - value = get_l2_indirect_reg(L2PMCCNTR); > + value = kryo_l2_get_indirect_reg(L2PMCCNTR); > else > - value = get_l2_indirect_reg(reg_idx(IA_L2PMXEVCNTR, idx)); > + value = kryo_l2_get_indirect_reg(reg_idx(IA_L2PMXEVCNTR, idx)); > > return value; > } > > static inline void cluster_pmu_counter_enable(u32 idx) > { > - set_l2_indirect_reg(L2PMCNTENSET, idx_to_reg_bit(idx)); > + kryo_l2_set_indirect_reg(L2PMCNTENSET, idx_to_reg_bit(idx)); > } > > static inline void cluster_pmu_counter_disable(u32 idx) > { > - set_l2_indirect_reg(L2PMCNTENCLR, idx_to_reg_bit(idx)); > + kryo_l2_set_indirect_reg(L2PMCNTENCLR, idx_to_reg_bit(idx)); > } > > static inline void cluster_pmu_counter_enable_interrupt(u32 idx) > { > - set_l2_indirect_reg(L2PMINTENSET, idx_to_reg_bit(idx)); > + kryo_l2_set_indirect_reg(L2PMINTENSET, idx_to_reg_bit(idx)); > } > > static inline void cluster_pmu_counter_disable_interrupt(u32 idx) > { > - set_l2_indirect_reg(L2PMINTENCLR, idx_to_reg_bit(idx)); > + kryo_l2_set_indirect_reg(L2PMINTENCLR, idx_to_reg_bit(idx)); > } > > static inline void cluster_pmu_set_evccntcr(u32 val) > { > - set_l2_indirect_reg(L2PMCCNTCR, val); > + kryo_l2_set_indirect_reg(L2PMCCNTCR, val); > } > > static inline void cluster_pmu_set_evcntcr(u32 ctr, u32 val) > { > - set_l2_indirect_reg(reg_idx(IA_L2PMXEVCNTCR, ctr), val); > + kryo_l2_set_indirect_reg(reg_idx(IA_L2PMXEVCNTCR, ctr), val); > } > > static inline void cluster_pmu_set_evtyper(u32 ctr, u32 val) > { > - set_l2_indirect_reg(reg_idx(IA_L2PMXEVTYPER, ctr), val); > + kryo_l2_set_indirect_reg(reg_idx(IA_L2PMXEVTYPER, ctr), val); > } > > static void cluster_pmu_set_resr(struct cluster_pmu *cluster, > @@ -303,11 +261,11 @@ static void cluster_pmu_set_resr(struct cluster_pmu *cluster, > > spin_lock_irqsave(&cluster->pmu_lock, flags); > > - resr_val = get_l2_indirect_reg(L2PMRESR); > + resr_val = kryo_l2_get_indirect_reg(L2PMRESR); > resr_val &= ~(L2PMRESR_GROUP_MASK << shift); > resr_val |= field; > resr_val |= L2PMRESR_EN; > - set_l2_indirect_reg(L2PMRESR, resr_val); > + kryo_l2_set_indirect_reg(L2PMRESR, resr_val); > > spin_unlock_irqrestore(&cluster->pmu_lock, flags); > } > @@ -323,14 +281,14 @@ static inline void cluster_pmu_set_evfilter_sys_mode(u32 ctr) > L2PMXEVFILTER_ORGFILTER_IDINDEP | > L2PMXEVFILTER_ORGFILTER_ALL; > > - set_l2_indirect_reg(reg_idx(IA_L2PMXEVFILTER, ctr), val); > + kryo_l2_set_indirect_reg(reg_idx(IA_L2PMXEVFILTER, ctr), val); > } > > static inline u32 cluster_pmu_getreset_ovsr(void) > { > - u32 result = get_l2_indirect_reg(L2PMOVSSET); > + u32 result = kryo_l2_get_indirect_reg(L2PMOVSSET); > > - set_l2_indirect_reg(L2PMOVSCLR, result); > + kryo_l2_set_indirect_reg(L2PMOVSCLR, result); > return result; > } > > @@ -783,7 +741,7 @@ static int get_num_counters(void) > { > int val; > > - val = get_l2_indirect_reg(L2PMCR); > + val = kryo_l2_get_indirect_reg(L2PMCR); > > /* > * Read number of counters from L2PMCR and add 1 > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > index 7093fe7..0567dff 100644 > --- a/drivers/soc/qcom/Kconfig > +++ b/drivers/soc/qcom/Kconfig > @@ -39,6 +39,9 @@ config QCOM_GSBI > functions for connecting the underlying serial UART, SPI, and I2C > devices to the output pins. > > +config QCOM_KRYO_L2_ACCESSORS > + bool > + > config QCOM_MDT_LOADER > tristate > select QCOM_SCM > diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile > index cbf414c..e4d3f5a 100644 > --- a/drivers/soc/qcom/Makefile > +++ b/drivers/soc/qcom/Makefile > @@ -14,3 +14,4 @@ obj-$(CONFIG_QCOM_SMEM_STATE) += smem_state.o > obj-$(CONFIG_QCOM_SMP2P) += smp2p.o > obj-$(CONFIG_QCOM_SMSM) += smsm.o > obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o > +obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) += kryo-l2-accessors.o > diff --git a/drivers/soc/qcom/kryo-l2-accessors.c b/drivers/soc/qcom/kryo-l2-accessors.c > new file mode 100644 > index 0000000..d35a860 > --- /dev/null > +++ b/drivers/soc/qcom/kryo-l2-accessors.c > @@ -0,0 +1,65 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * 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. > + */ > + Get rid of the GPL boilerplate i.e. everything after the Copyright line. You only need the SPDX line at the top. > +#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); > + > +/** > + * kryo_l2_set_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 kryo_l2_set_indirect_reg(u64 reg, u64 val) > +{ > + unsigned long flags; > + > + raw_spin_lock_irqsave(&l2_access_lock, flags); > + write_sysreg_s(reg, L2CPUSRSELR_EL1); > + isb(); > + write_sysreg_s(val, L2CPUSRDR_EL1); > + isb(); > + raw_spin_unlock_irqrestore(&l2_access_lock, flags); > +} > +EXPORT_SYMBOL(kryo_l2_set_indirect_reg); > + > +/** > + * kryo_l2_get_indirect_reg() - read an L2 register value > + * @reg: Address of L2 register. > + * > + * Use architecturally required barriers for ordering between system register > + * accesses, and system registers with respect to device memory > + */ > +u64 kryo_l2_get_indirect_reg(u64 reg) > +{ > + u64 val; > + unsigned long flags; > + > + raw_spin_lock_irqsave(&l2_access_lock, flags); > + write_sysreg_s(reg, L2CPUSRSELR_EL1); > + isb(); > + val = read_sysreg_s(L2CPUSRDR_EL1); > + raw_spin_unlock_irqrestore(&l2_access_lock, flags); > + > + return val; > +} > +EXPORT_SYMBOL(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..0840e87 > --- /dev/null > +++ b/include/soc/qcom/kryo-l2-accessors.h > @@ -0,0 +1,21 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * 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. > + */ Get rid of the GPL boilerplate i.e. everything after the Copyright line. You only need the SPDX line at the top. > +#ifndef __SOC_ARCH_QCOM_KRYO_L2_ACCESSORS_H > +#define __SOC_ARCH_QCOM_KRYO_L2_ACCESSORS_H > + > +void kryo_l2_set_indirect_reg(u64 reg, u64 val); > +u64 kryo_l2_get_indirect_reg(u64 reg); > + > +#endif > -- > 1.9.1 >