All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ppc4xx: Add dcache_enable() for 440
Date: Mon, 21 Apr 2008 06:58:06 +0200	[thread overview]
Message-ID: <200804210658.07170.sr@denx.de> (raw)
In-Reply-To: <20080420223407.63490248CB@gemini.denx.de>

On Monday 21 April 2008, Wolfgang Denk wrote:
> In message <1208530299-9817-1-git-send-email-sr@denx.de> you wrote:
> > dcache_enable() was missing for 440 and the patch
> > 017e9b7925f74878d0e9475388cca9bda5ef9482 ["allow ports to override
> > bootelf "] behavior uses this function.
> >
> > Note: Currently the cache handling functions like
> > d/icache_disable/enable() are NOP's on 440. This may be changed in the
> > future.
>
> Sorry, but I don't think this is a good idea. Actually I tend to
> reject this patch.
>
> > --- a/cpu/ppc4xx/cache.S
> > +++ b/cpu/ppc4xx/cache.S
> > @@ -166,9 +166,11 @@ _GLOBAL(invalidate_dcache)
> >  #ifdef CONFIG_440
> >
> >         .globl  dcache_disable
> > +       .globl  dcache_enable
> >         .globl  icache_disable
> >         .globl  icache_enable
> >  dcache_disable:
> > +dcache_enable:
> >  icache_disable:
> >  icache_enable:
> >  	blr
>
> I was not are that we have such code in U-Boot; I think it  is  plain
> unacceptable.  Either  we  implement these functions correctly, i. e.
> such that they perform the actions their name suggests, or we do  not
> define these functions at all.

So what do you suggest instead? Removing these functions completely for 440? 
This would result in bigger changes to common code currently using those 
functions (especially dcache_disable). Probably by using more #ifdefs there 
which I would really like not to see.

> But providing a function that promises to enable  or  disable  the  I
> resp.  D  cache, and which then actually does nothing, is *extremely*
> misleading. I see all kind of regressions and lost  time  because  of
> people debug completely different parts of the code just because they
> don't know that these functions are dummies.
>
> Please: let's not do this. May I please ask to clean this up?

OK, I removed this patch from my custodian repository. But I assume that you 
are you asking for additional changes too. Are you asking me to remove (a) 
all dummy cache entries or (b) to support *real* cache support functions for 
440? (a) would lead as explained above to bigger code changes in the common 
code and (b) is extremely difficult and I just have no time for such a thing 
currently.

BTW: All the already existing 440 dummy cache entries were not introduced by 
myself.

> Yes,  I  am  aware  that  the   current   (new)   implementation   of
> do_bootelf_exec()  needs  to  be fixed for this, too - and maybe some
> other places as well. But this is important enough to me.

Understood. We should propably revert this patch then.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2008-04-21  4:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 14:51 [U-Boot-Users] [PATCH] ppc4xx: Add dcache_enable() for 440 Stefan Roese
2008-04-20 22:34 ` Wolfgang Denk
2008-04-21  4:58   ` Stefan Roese [this message]
2008-04-21  5:04     ` Wolfgang Denk
2008-04-21  5:29       ` Stefan Roese
2008-04-21  7:44         ` Wolfgang Denk
2008-04-21  8:23           ` Stefan Roese
2008-04-21  9:12             ` Wolfgang Denk
2008-04-21  9:45               ` Stefan Roese
2008-04-21 10:27                 ` Wolfgang Denk
2008-04-21 11:37 ` [U-Boot-Users] [PATCH] Fix missing dcache_enable symbol and declare cache function as weak Jean-Christophe PLAGNIOL-VILLARD
2008-04-21 12:18   ` Wolfgang Denk

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=200804210658.07170.sr@denx.de \
    --to=sr@denx.de \
    --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 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.