linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	Tony Lindgren <tony@atomide.com>, Sekhar Nori <nsekhar@ti.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Santosh <ssantosh@kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH V2 2/2] ARM: l2c: AM437x: Introduce support for cache filter programming
Date: Sat, 03 Jan 2015 10:45:58 -0600	[thread overview]
Message-ID: <54A81CC6.2010007@ti.com> (raw)
In-Reply-To: <CA+Ln22Ejvwd9J=jnWAUeb=nn-cvWiptqOydax+z4BeMrww_xqg@mail.gmail.com>

On 01/03/2015 10:16 AM, Tomasz Figa wrote:
> 2015-01-04 0:34 GMT+09:00 Nishanth Menon <nm@ti.com>:
>> On 15:40-20150103, Tomasz Figa wrote:
>>> Hi Nishanth,
>>>
>>> 2015-01-03 2:43 GMT+09:00 Nishanth Menon <nm@ti.com>:
>>>> AM437x generation of processors support programming the PL310 L2Cache
>>>> controller's address filter start and end registers using a secure
>>>> montior service.
>>>
>>> typo: s/montior/monitor/
>>>
>>> [snip]
>>
>> Uggh.. yes indeed. I will post a v3 updating the comments. If the
>> following is ok.
>>>
>>>> +               base = omap4_get_l2cache_base();
>>>> +               filter_start = (reg == L310_ADDR_FILTER_START) ? val :
>>>> +                              readl_relaxed(base + L310_ADDR_FILTER_START);
>>>> +               filter_end = (reg == L310_ADDR_FILTER_END) ? val :
>>>> +                              readl_relaxed(base + L310_ADDR_FILTER_END);
>>>> +               omap_smc1_2(AM43X_MON_L2X0_SETFILTER_INDEX, filter_start,
>>>> +                           filter_end);
>>>> +               return;
>>>
>>> I don't have any significant comments about this patch in particular,
>>> but just noticed that you need to do read-backs here (and the typo
>>> thanks to the spell checker of my mailing app). Maybe you should
>>> consider switching to the .configure() API I introduced in my series?
>>> This would let you get rid of the hardcoded static mapping.
>>
>> Yeah, I have two choices there.. Either I provide the fundamental
>> write function for the generic l2c code to use OR I provide a
>> duplicate of resultant l2c_configure(aux write) + l2c310_configure.
>>
>> To allow for reuse of improvements or anything like errata
>> implementations in the future, OMAP L2C implementation has chosen to provide the
>> low level code and allow the higherlevel configure/write/whatever of the
>> future to stay in arch/arm/mm/cache-l2x0.c. The write_sec operation is
>> not too complicated enough to warrant a replication of l2c310_configure.
>>
>> So, I prefer the current implementation than providing a .configure
>> handler for outer_cache.configure from SoC level.
>>
>> Let me know if anyone has a strong objection to this.
>
> Well, what l2c310_configure() does after my series is just writing the
> registers. If they cannot be written normally (without some tricks
> such as reading back other registers) then IMHO a separate function
> should be provided.
>
> This is becomes possible after patch 3/8 (ARM: l2c: Add interface to
> ask hypervisor to configure L2C) and what is used on Exynos which also
> updates multiple registers in single SMC calls. You can find an
> example of use in patch 6/8 (ARM: EXYNOS: Add .write_sec outer cache
> callback for L2C-310). What's even more interesting is that approaches
> similar to the one currently used on OMAP had been NAKed, when
> proposed for Exynos and this is why we have the solution proposed by
> my patches.
>
> Note that .write_sec() callback is still used for L2X0_CTRL and
> L2X0_DEBUG_CTRL registers, because there might be a need to write them
> separately (e.g. to disable the controller and to perform debug
> operations/workarounds when the controller is already enabled).


we dont have a machine descriptor for configure instead we overide the 
logic(in you case after firmware load, in OMAP case, I need to figure 
out). my point being unlike the exynos configure code, OMAP code will 
look exactly like current pl310_configure-2 lines of code which really 
does not benefit anything.


Thinking again, in fact, i'd rather drop this series than have to do a 
duplicated configure code(and force a resultant maintenance for the 
future) in OMAP code since none of OMAP4 or AM437x series need these 
patches. Interest for this series was non-mandatory, but just to be 
complete from SoC definition point of view.

Let me know which way you guys want me to go.

---
Regards,
Nishanth Menon

  reply	other threads:[~2015-01-03 16:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02 17:43 [PATCH V2 0/2] ARM: l2c: OMAP4/AM437x: Additional register programming support Nishanth Menon
2015-01-02 17:43 ` [PATCH V2 1/2] ARM: l2c: OMAP4/AM437x: Introduce support for cache latency programming Nishanth Menon
2015-01-02 17:43 ` [PATCH V2 2/2] ARM: l2c: AM437x: Introduce support for cache filter programming Nishanth Menon
2015-01-03  6:40   ` Tomasz Figa
2015-01-03 15:34     ` Nishanth Menon
2015-01-03 16:16       ` Tomasz Figa
2015-01-03 16:45         ` Nishanth Menon [this message]
2015-01-04  7:47           ` Tomasz Figa
2015-01-02 18:46 ` [PATCH V2 0/2] ARM: l2c: OMAP4/AM437x: Additional register programming support santosh.shilimkar
2015-01-02 19:47   ` Nishanth Menon
2015-01-03  0:23     ` Tony Lindgren
2015-01-03  6:42       ` Tomasz Figa
2015-01-03 15:39         ` [PATCH V2 0/2] ARM: l2c: OMAP4/AM437x: Additional register programming support.\ Nishanth Menon

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=54A81CC6.2010007@ti.com \
    --to=nm@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=nsekhar@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=tomasz.figa@gmail.com \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).