android_kernel_motorola_sm6225/arch/mn10300
David Howells b75bb2365d MN10300: The icache invalidate functions should disable the icache first
The icache invalidate functions should disable the icache on AM33 and wait for
it to quiesce before attempting to invalidate it, and should then wait for it
to quiesce again before reenabling it, but on AM34 they should invalidate
directly.  The same goes for the dcache invalidation, but this isn't used much.

Whilst we're at it, this can be wrapped in assembler macros to remove duplicate
code.

The AM33 manual states that:

	An operation that invalidates the cache, switches the writing mode, or
	changes the way mode must be performed after disabling the cache,
	checking the busy bit, and confirming that the cache is not in
	operation.

for the dcache [sec 2.8.3.2.1].  This is not stated so for the icache [sec
2.8.3.1.1] but the example code there suggests that it is.

Whilst the AM34 manual states that the cache must be disabled for both the
icache [sec 1.8.3.2.1] and the dcache [sec 1.8.3.2.1], the Panasonic hardware
engineers say the manual is wrong and that disabling the caches for
invalidation is wrong.

Furthermore, they say that disabling the caches on the AM34 whilst running an
SMP kernel can lead to incoherency between the various CPU caches and should
thus be avoided.

Signed-off-by: David Howells <dhowells@redhat.com>
2011-03-18 16:54:29 +00:00
..
boot MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
configs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
include/asm MN10300: Remove unused mn10300_intc_* functions 2011-03-18 16:52:51 +00:00
kernel MN10300: gdbstub: Restrict single-stepping to non-preemptable non-SMP configs 2011-03-18 16:54:29 +00:00
lib MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
mm MN10300: The icache invalidate functions should disable the icache first 2011-03-18 16:54:29 +00:00
oprofile MN10300: Kill MN10300's own profiling Kconfig 2009-04-09 10:53:16 -07:00
proc-mn2ws0050 MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
proc-mn103e010 MN10300: Change "Matsushita" to "Panasonic". 2010-10-27 17:29:00 +01:00
unit-asb2303 MN10300: Generic time support 2010-10-27 17:28:57 +01:00
unit-asb2305 MN10300: Generic time support 2010-10-27 17:28:57 +01:00
unit-asb2364 MN10300: Clear ASB2364 peripheral interrupt masks before enabling interrupts 2011-03-18 16:52:54 +00:00
Kconfig MN10300: Select GENERIC_HARDIRQS_NO_DEPRECATED 2011-03-18 16:52:53 +00:00
Kconfig.debug MN10300: gdbstub: Restrict single-stepping to non-preemptable non-SMP configs 2011-03-18 16:54:29 +00:00
Makefile MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00