All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Joseph Lo <josephl@nvidia.com>,
	linux-tegra@vger.kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 10/14] memory: tegra: Add EMC scaling sequence code for Tegra210
Date: Tue, 14 Apr 2020 22:03:11 +0200	[thread overview]
Message-ID: <20200414200311.GD15932@ulmo> (raw)
In-Reply-To: <e050baee-89cb-dba1-544e-77b1662ac6b7@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

On Tue, Apr 14, 2020 at 07:27:43PM +0300, Dmitry Osipenko wrote:
> 14.04.2020 18:45, Thierry Reding пишет:
> ...
> >> What about to try to replace this massive egyptian construction with a
> >> single "u32 val;" ?
> > 
> > I actually tried that after condensing what this used to look like into
> > the above. The result was a huge failure because some of these temporary
> > values end up being reused, so I ended up writing bogus values into some
> > of these registers.
> 
> It should be fine to keep those variables that are getting re-used. It
> looks like there are much more variables that are never re-used, and
> thus, they could be replaced.

Okay, I made another pass over it and it looks slightly better now. I've
kept a couple of the "option"-type variables that are constant but in my
opinion make the code more readable compared to hard-coding them. In the
cases where I kept them, I declared them constants, so the compiler will
hopefully be able to optimize the code and their purpose should also be
clearer.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Stephen Boyd <sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v6 10/14] memory: tegra: Add EMC scaling sequence code for Tegra210
Date: Tue, 14 Apr 2020 22:03:11 +0200	[thread overview]
Message-ID: <20200414200311.GD15932@ulmo> (raw)
In-Reply-To: <e050baee-89cb-dba1-544e-77b1662ac6b7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

On Tue, Apr 14, 2020 at 07:27:43PM +0300, Dmitry Osipenko wrote:
> 14.04.2020 18:45, Thierry Reding пишет:
> ...
> >> What about to try to replace this massive egyptian construction with a
> >> single "u32 val;" ?
> > 
> > I actually tried that after condensing what this used to look like into
> > the above. The result was a huge failure because some of these temporary
> > values end up being reused, so I ended up writing bogus values into some
> > of these registers.
> 
> It should be fine to keep those variables that are getting re-used. It
> looks like there are much more variables that are never re-used, and
> thus, they could be replaced.

Okay, I made another pass over it and it looks slightly better now. I've
kept a couple of the "option"-type variables that are constant but in my
opinion make the code more readable compared to hard-coding them. In the
cases where I kept them, I declared them constants, so the compiler will
hopefully be able to optimize the code and their purpose should also be
clearer.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: devicetree@vger.kernel.org, Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Rob Herring <robh+dt@kernel.org>, Joseph Lo <josephl@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 10/14] memory: tegra: Add EMC scaling sequence code for Tegra210
Date: Tue, 14 Apr 2020 22:03:11 +0200	[thread overview]
Message-ID: <20200414200311.GD15932@ulmo> (raw)
In-Reply-To: <e050baee-89cb-dba1-544e-77b1662ac6b7@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1063 bytes --]

On Tue, Apr 14, 2020 at 07:27:43PM +0300, Dmitry Osipenko wrote:
> 14.04.2020 18:45, Thierry Reding пишет:
> ...
> >> What about to try to replace this massive egyptian construction with a
> >> single "u32 val;" ?
> > 
> > I actually tried that after condensing what this used to look like into
> > the above. The result was a huge failure because some of these temporary
> > values end up being reused, so I ended up writing bogus values into some
> > of these registers.
> 
> It should be fine to keep those variables that are getting re-used. It
> looks like there are much more variables that are never re-used, and
> thus, they could be replaced.

Okay, I made another pass over it and it looks slightly better now. I've
kept a couple of the "option"-type variables that are constant but in my
opinion make the code more readable compared to hard-coding them. In the
cases where I kept them, I declared them constants, so the compiler will
hopefully be able to optimize the code and their purpose should also be
clearer.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-14 20:03 UTC|newest]

Thread overview: 163+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 17:52 [PATCH v6 00/14] Add EMC scaling support for Tegra210 Thierry Reding
2020-04-09 17:52 ` Thierry Reding
2020-04-09 17:52 ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 01/14] dt-bindings: reserved-memory: Introduce memory-region-names Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-15 16:23   ` Rob Herring
2020-04-15 16:23     ` Rob Herring
2020-04-15 16:23     ` Rob Herring
2020-04-09 17:52 ` [PATCH v6 02/14] of: reserved-memory: Support lookup of regions by name Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-15 16:24   ` Rob Herring
2020-04-15 16:24     ` Rob Herring
2020-04-15 16:24     ` Rob Herring
2020-04-15 23:35     ` Thierry Reding
2020-04-15 23:35       ` Thierry Reding
2020-04-16  0:58       ` Rob Herring
2020-04-16  0:58         ` Rob Herring
2020-04-16  0:58         ` Rob Herring
2020-04-09 17:52 ` [PATCH v6 03/14] of: reserved-memory: Support multiple regions per device Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-15 16:25   ` Rob Herring
2020-04-15 16:25     ` Rob Herring
2020-04-15 16:25     ` Rob Herring
2020-04-09 17:52 ` [PATCH v6 04/14] clk: tegra: Rename Tegra124 EMC clock source file Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-14 16:48   ` Dmitry Osipenko
2020-04-14 16:48     ` Dmitry Osipenko
2020-04-14 16:48     ` Dmitry Osipenko
2020-04-14 17:14     ` Thierry Reding
2020-04-14 17:14       ` Thierry Reding
2020-04-14 17:14       ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 05/14] clk: tegra: Add PLLP_UD and PLLMB_UD for Tegra210 Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 06/14] clk: tegra: Export functions for EMC clock scaling Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 07/14] clk: tegra: Implement Tegra210 EMC clock Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 18:24   ` Dmitry Osipenko
2020-04-09 18:24     ` Dmitry Osipenko
2020-04-09 18:24     ` Dmitry Osipenko
2020-04-14 14:34     ` Thierry Reding
2020-04-14 14:34       ` Thierry Reding
2020-04-14 14:34       ` Thierry Reding
2020-04-14 15:18       ` Dmitry Osipenko
2020-04-14 15:18         ` Dmitry Osipenko
2020-04-14 15:18         ` Dmitry Osipenko
2020-04-14 17:10         ` Thierry Reding
2020-04-14 17:10           ` Thierry Reding
2020-04-14 17:10           ` Thierry Reding
2020-04-14 20:22           ` Dmitry Osipenko
2020-04-14 20:22             ` Dmitry Osipenko
2020-04-14 20:22             ` Dmitry Osipenko
2020-04-10 20:49   ` Dmitry Osipenko
2020-04-10 20:49     ` Dmitry Osipenko
2020-04-10 20:49     ` Dmitry Osipenko
2020-04-14 14:36     ` Thierry Reding
2020-04-14 14:36       ` Thierry Reding
2020-04-14 14:36       ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 08/14] dt-bindings: memory: tegra: Add external memory controller binding for Tegra210 Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-15 16:27   ` Rob Herring
2020-04-15 16:27     ` Rob Herring
2020-04-15 16:27     ` Rob Herring
2020-04-09 17:52 ` [PATCH v6 09/14] memory: tegra: Add EMC scaling support code " Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 19:00   ` Dmitry Osipenko
2020-04-09 19:00     ` Dmitry Osipenko
2020-04-14 14:45     ` Thierry Reding
2020-04-14 14:45       ` Thierry Reding
2020-04-14 14:45       ` Thierry Reding
2020-04-09 19:16   ` Dmitry Osipenko
2020-04-09 19:16     ` Dmitry Osipenko
2020-04-09 19:16     ` Dmitry Osipenko
2020-04-14 14:54     ` Thierry Reding
2020-04-14 14:54       ` Thierry Reding
2020-04-14 14:54       ` Thierry Reding
2020-04-14 20:50       ` Dmitry Osipenko
2020-04-14 20:50         ` Dmitry Osipenko
2020-04-14 20:50         ` Dmitry Osipenko
2020-04-09 23:56   ` Dmitry Osipenko
2020-04-09 23:56     ` Dmitry Osipenko
2020-04-09 23:56     ` Dmitry Osipenko
2020-04-11 20:39     ` Dmitry Osipenko
2020-04-11 20:39       ` Dmitry Osipenko
2020-04-11 20:39       ` Dmitry Osipenko
2020-04-14 15:05       ` Thierry Reding
2020-04-14 15:05         ` Thierry Reding
2020-04-14 15:32         ` Dmitry Osipenko
2020-04-14 15:32           ` Dmitry Osipenko
2020-04-14 15:02     ` Thierry Reding
2020-04-14 15:02       ` Thierry Reding
2020-04-14 15:02       ` Thierry Reding
2020-04-10 14:25   ` Dmitry Osipenko
2020-04-10 14:25     ` Dmitry Osipenko
2020-04-10 14:25     ` Dmitry Osipenko
2020-04-14 15:08     ` Thierry Reding
2020-04-14 15:08       ` Thierry Reding
2020-04-10 14:26   ` Dmitry Osipenko
2020-04-10 14:26     ` Dmitry Osipenko
2020-04-10 14:26     ` Dmitry Osipenko
2020-04-14 15:39     ` Thierry Reding
2020-04-14 15:39       ` Thierry Reding
2020-04-14 15:39       ` Thierry Reding
2020-04-10 20:46   ` Dmitry Osipenko
2020-04-10 20:46     ` Dmitry Osipenko
2020-04-10 20:46     ` Dmitry Osipenko
2020-04-14 15:41     ` Thierry Reding
2020-04-14 15:41       ` Thierry Reding
2020-04-14 15:41       ` Thierry Reding
2020-04-14 20:39   ` Dmitry Osipenko
2020-04-14 20:39     ` Dmitry Osipenko
2020-04-14 20:39     ` Dmitry Osipenko
2020-04-14 20:46   ` Dmitry Osipenko
2020-04-14 20:46     ` Dmitry Osipenko
2020-04-14 20:46     ` Dmitry Osipenko
2020-04-14 20:56     ` Dmitry Osipenko
2020-04-14 20:56       ` Dmitry Osipenko
2020-04-09 17:52 ` [PATCH v6 10/14] memory: tegra: Add EMC scaling sequence " Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-10 14:18   ` Dmitry Osipenko
2020-04-10 14:18     ` Dmitry Osipenko
2020-04-10 14:18     ` Dmitry Osipenko
2020-04-14 15:45     ` Thierry Reding
2020-04-14 15:45       ` Thierry Reding
2020-04-14 16:27       ` Dmitry Osipenko
2020-04-14 16:27         ` Dmitry Osipenko
2020-04-14 16:27         ` Dmitry Osipenko
2020-04-14 20:03         ` Thierry Reding [this message]
2020-04-14 20:03           ` Thierry Reding
2020-04-14 20:03           ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 11/14] memory: tegra: Support derated timings on Tegra210 Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 23:44   ` Dmitry Osipenko
2020-04-09 23:44     ` Dmitry Osipenko
2020-04-09 23:44     ` Dmitry Osipenko
2020-04-14 15:47     ` Thierry Reding
2020-04-14 15:47       ` Thierry Reding
2020-04-14 16:25       ` Dmitry Osipenko
2020-04-14 16:25         ` Dmitry Osipenko
2020-04-14 16:25         ` Dmitry Osipenko
2020-04-10 14:28   ` Dmitry Osipenko
2020-04-10 14:28     ` Dmitry Osipenko
2020-04-10 14:28     ` Dmitry Osipenko
2020-04-14 16:29     ` Thierry Reding
2020-04-14 16:29       ` Thierry Reding
2020-04-14 16:29       ` Thierry Reding
2020-04-14 16:40   ` Dmitry Osipenko
2020-04-14 16:40     ` Dmitry Osipenko
2020-04-14 16:48     ` Thierry Reding
2020-04-14 16:48       ` Thierry Reding
2020-04-14 16:48       ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 12/14] arm64: tegra: Add external memory controller node for Tegra210 Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 13/14] arm64: tegra: Hook up EMC cooling device Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52   ` Thierry Reding
2020-04-09 17:52 ` [PATCH v6 14/14] clk: tegra: Remove the old emc_mux clock for Tegra210 Thierry Reding
2020-04-09 17:52   ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200414200311.GD15932@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=josephl@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.