From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: cache disabling
Date: Thu, 13 Jan 2011 06:50:25 +0000 [thread overview]
Message-ID: <20110113065025.GH12013@linux-sh.org> (raw)
In-Reply-To: <201101121904.21051.fabio.giovagnini@aurion-tech.com>
On Thu, Jan 13, 2011 at 06:28:44AM +0100, Fabio Giovagnini wrote:
> Hi Paul thanks a lot for you patience with my stupid questions.
> But it is not so surprising, because I verified in previuos kernels, that
> disabling all the options of the cache still the file cache-<cpu_type> was
> compiled and linked into the built-in.o file.
> This has been the reason of my question.
> Anyway if you confirm I'm really sure.
>
I'm not sure what exactly linking has to do with anything, but a cursory
inspection of the code would have made it pretty apparent.
arch/sh/mm/cache.c shows:
void (*local_flush_cache_all)(void *args) = cache_noop;
void (*local_flush_cache_mm)(void *args) = cache_noop;
void (*local_flush_cache_dup_mm)(void *args) = cache_noop;
void (*local_flush_cache_page)(void *args) = cache_noop;
void (*local_flush_cache_range)(void *args) = cache_noop;
void (*local_flush_dcache_page)(void *args) = cache_noop;
void (*local_flush_icache_range)(void *args) = cache_noop;
void (*local_flush_icache_page)(void *args) = cache_noop;
void (*local_flush_cache_sigtramp)(void *args) = cache_noop;
....
void __init cpu_cache_init(void)
{
unsigned int cache_disabled = 0;
#ifdef CCR
cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE);
#endif
/*
* No flushing is necessary in the disabled cache case so we can
* just keep the noop functions in local_flush_..() and __flush_..()
*/
if (unlikely(cache_disabled))
goto skip;
...
skip:
emit_cache_params();
}
I really shouldn't need to paste completely obvious code paths that have
already been documented to outline what happens in the case you describe. Next
time you have a question like this, rather than opening up your mailer, how
about opening up your text editor and just looking at the code?
Contrary to popular belief, I don't generally comment code for my own benefit,
and it's becoming increasingly obvious that it's not of much benefit to people
who can't be bothered to read, either.
In the future, do not expect answers to questions you can easily answer
yourself.
next prev parent reply other threads:[~2011-01-13 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 18:04 cache disabling Fabio Giovagnini
2011-01-13 1:40 ` Paul Mundt
2011-01-13 5:28 ` Fabio Giovagnini
2011-01-13 6:50 ` Paul Mundt [this message]
2011-01-13 6:58 ` Fabio Giovagnini
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=20110113065025.GH12013@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.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.