lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <949da0fec08f09bd6b70b14f3361f4a4584b42c3.camel@linaro.org>
Date: Mon, 06 Oct 2025 07:52:40 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Sam Protsenko <semen.protsenko@...aro.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, Alim Akhtar
 <alim.akhtar@...sung.com>,  Peter Griffin <peter.griffin@...aro.org>, Tudor
 Ambarus <tudor.ambarus@...aro.org>, Will McVicker	
 <willmcvicker@...gle.com>, kernel-team@...roid.com, 
	linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] soc: samsung: exynos-pmu: move some gs101 related
 code into new file

Hi Sam,

On Fri, 2025-10-03 at 12:55 -0500, Sam Protsenko wrote:
> On Thu, Oct 2, 2025 at 5:33 AM André Draszik <andre.draszik@...aro.org> wrote:
> > 
> > To avoid cluttering common code, move most of the gs101 code into a new
> > file, gs101-pmu.c
> > 
> > More code is going to be added for gs101 - having it all in one file
> > helps keeping the common code (file) more readable.
> > 
> 
> Maybe add "no functional change" note for refactoring/cleanup patches like this.

Sure


[...]

> > 
> > diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h
> > index 113149ed32c88a09b075be82050c26970e4c0620..fe11adc4f6ac8fc8bce228d5852deaff7c438221 100644
> > --- a/drivers/soc/samsung/exynos-pmu.h
> > +++ b/drivers/soc/samsung/exynos-pmu.h
> > @@ -44,7 +44,14 @@ extern const struct exynos_pmu_data exynos4412_pmu_data;
> >  extern const struct exynos_pmu_data exynos5250_pmu_data;
> >  extern const struct exynos_pmu_data exynos5420_pmu_data;
> >  #endif
> > +extern const struct exynos_pmu_data gs101_pmu_data;
> > 
> >  extern void pmu_raw_writel(u32 val, u32 offset);
> >  extern u32 pmu_raw_readl(u32 offset);
> > +
> > +int tensor_sec_reg_write(void *context, unsigned int reg, unsigned int val);
> > +int tensor_sec_reg_read(void *context, unsigned int reg, unsigned int *val);
> > +int tensor_sec_update_bits(void *ctx, unsigned int reg, unsigned int mask,
> > +                          unsigned int val);
> 
> Nitpick: just noticed the inconsistency between context/ctx wording
> usage in above function arguments.

Interesting... I'll fix it as part of the move.

> 
> > +
> >  #endif /* __EXYNOS_PMU_H */
> > diff --git a/drivers/soc/samsung/gs101-pmu.c b/drivers/soc/samsung/gs101-pmu.c
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..b5a535822ec830b751e36a33121e2a03ef2ebcb2
> > --- /dev/null
> > +++ b/drivers/soc/samsung/gs101-pmu.c
> > @@ -0,0 +1,141 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +//
> > +// Copyright 2025 Linaro Ltd.
> > +//
> > +// GS101 PMU (Power Management Unit) support
> > +
> 
> AFAIR headers like these should be made using multi-line comments (not
> talking about SPDX part). Or is it the latest fashion trends in
> kernel?

Depends on subsystem, but multi-line for most. Here I went with existing style for
the PMU-related files, though.

Cheers,
Andre'

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ