public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] Long term ARM ISA/cpu/core code organization (was: [PATCH 3/3 v3] ARM: ARM926EJS - Add cache operations)
Date: Tue, 6 Sep 2011 16:21:16 +0200	[thread overview]
Message-ID: <201109061621.16417.marek.vasut@gmail.com> (raw)
In-Reply-To: <4E660765.8000204@aribaud.net>

On Tuesday, September 06, 2011 01:43:33 PM Albert ARIBAUD wrote:
> (splitting this discussion between the patch question and longer term
> RFC, here I follow the RFC and update the subject line accordingly)
> 
> >> Seems like we're having two problems there:
> >> 
> >> 1) at least some cpus or cores (xscale) do not implement all of what was
> >> thought to be armv5 cache operations, which suggests we should indeed
> >> keep this patch in arm926ejs;
> >> 
> >> 2) that many cpus and cores implement a good subset of armv5 cache
> >> operations, which warrants having an armv5 directory where we would
> >> define them once only for all to use.
> >> 
> >> I think the Right Way is to create an armv5 subtree with armv5-common
> >> operations, but with the capability of overruling these with cpu-level
> >> variants, themselves being possibly overridden by core-level variants.
> > 
> > All right, but what about the CPUs that don't adapt so fast?
> 
> Adapt to what?

Adapt to this new cache stuff. Some CPUs have no cache functions implemented at 
all and therefore with the new stuff, they will use the generic ones -- which 
might be not good.

> 
> > There will be CPUs
> > with broken cache-ops. How do you intend to solve that ?
> 
> If a cpu has partly broken cache ops, but its cache is still useable by
> not using the armv5-stock cache ops implementation, then the cpu should
> override the broken armv5 ops with its own version.
> 
> For instance, say some armv5 based cpu badly implements full flush but
> correctly implements cache line flush. The cpu code should then provide
> its own version of the full cache flush op, based on looping through the
> cache lines instead of the armv5 single coprocessor instruction.
> 
> If, OTOH, a cpu has broken cache ops, to the point that cache is
> unuseable, then it should have its cache disabled, which can be done
> through configuration options or by providing cpu-specific cache ops
> implementations that will emit appropriate messages.

Ack, agree.

> 
> >> Now as to where to put this:
> >> 
> >> As ARMv5 is an ISA, not a cpu or core, I'm uncomfortable with creating
> >> arch/arm/cpu/armv5 anyway. I'd prefer an ISA subtree, either in parallel
> >> with the cpu subtree: arch/arm/isa [/armv5], or, and I would slightly
> >> prefer that even though some paths would become rather long, a hierarchy
> >> withe cpus stand below their isa: arch/arm/isa [/armv5/cpu/arm926ejs].
> >> To reduce path length, we could remove the 'cpu' part and consider that
> >> anything below the 'isa' is a cpu, just like currently anything below
> >> the cpu is a core.
> > 
> > This is completely out of scope for this patch. My proposal would be to
> > merge this, then start mucking with this moving files around.
> 
> Indeed -- I was not suggestion a rework of the patch, only sending out
> an RFC of sorts.
> 
> >> To sum it up, we would have
> >> 
> >> arch/arm/isa/armv5 (where ARMv5t ISA common code would reside, including
> >> cache ops)
> >> 
> >> arch/arm/isa/armv5/arm926ejs (where ARM926EJ-S cpu common code would
> >> reside, including cache ops)
> >> 
> >> arch/arm/isa/armv5/arm926ejs/orion5x (a personal favorite :) where
> >> Orion5x core code would reside, including cache ops)
> >> 
> >> Maybe we could even make do without the .../isa/... level and put ISAs
> >> directly under ARM -- I don't think any ARM ISA will ever be named
> >> 'include' or 'lib' or 'Makefile'. :)
> >> 
> >> Comments?
> > 
> > I'll have to think about it,
> 
> By all means do. :)
> 
> Amicalement,

Cheers

  reply	other threads:[~2011-09-06 14:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  3:27 [U-Boot] [PATCH 3/3 v3] ARM: ARM926EJS - Add cache operations Hong Xu
2011-08-11  4:47 ` Marek Vasut
2011-08-15  7:08   ` Hong Xu
2011-09-02 10:22     ` Simon Guinot
2011-09-02 10:23       ` Marek Vasut
2011-09-02 11:43         ` Simon Guinot
2011-09-02 11:57           ` Marek Vasut
2011-09-05 19:45             ` Albert ARIBAUD
2011-09-05 19:50               ` Marek Vasut
2011-09-06  6:19                 ` Albert ARIBAUD
2011-09-06  6:40                   ` Marek Vasut
2011-09-06 11:38                     ` Albert ARIBAUD
2011-09-06 14:21                       ` Marek Vasut
2011-09-06 11:43                     ` [U-Boot] [RFC] Long term ARM ISA/cpu/core code organization (was: [PATCH 3/3 v3] ARM: ARM926EJS - Add cache operations) Albert ARIBAUD
2011-09-06 14:21                       ` Marek Vasut [this message]
2011-09-07 14:02                       ` [U-Boot] [RFC] Long term ARM ISA/cpu/core code organization Aneesh V

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=201109061621.16417.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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