2007-11-13 Till Straumann <strauman@slac.stanford.edu>

* shared/src/cache.c: moved generic operations
	(flush/invalidate 1 data line, invalidate 1 inst. line)
	from #ifdef <cpu_flavor> to general section (all CPUs).
This commit is contained in:
Till Straumann
2007-11-14 00:42:18 +00:00
parent a10c721462
commit ff9d8898e5
2 changed files with 28 additions and 20 deletions

View File

@@ -1,3 +1,9 @@
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* shared/src/cache.c: moved generic operations
(flush/invalidate 1 data line, invalidate 1 inst. line)
from #ifdef <cpu_flavor> to general section (all CPUs).
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* shared/src/cache_.h: include <libcpu/cache.h> only

View File

@@ -62,13 +62,6 @@ void _CPU_cache_disable_data (
PPC_Set_HID0( value );
}
void _CPU_cache_invalidate_1_data_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "dcbi 0,%0" :: "r"(__address) : "memory" );
}
void _CPU_cache_invalidate_entire_data (
void )
{
@@ -98,13 +91,6 @@ void _CPU_cache_unfreeze_data (
PPC_Set_HID0( value );
}
void _CPU_cache_flush_1_data_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "dcbf 0,%0" :: "r" (__address) : "memory" );
}
void _CPU_cache_flush_entire_data (
void )
{
@@ -131,12 +117,6 @@ void _CPU_cache_disable_instruction (
PPC_Set_HID0( value );
}
void _CPU_cache_invalidate_1_instruction_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "icbi 0,%0" :: "r" (__address) : "memory");
}
void _CPU_cache_invalidate_entire_instruction (
void )
@@ -237,4 +217,26 @@ void _CPU_cache_disable_instruction ( void )
}
#endif
void _CPU_cache_invalidate_1_data_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "dcbi 0,%0" :: "r"(__address) : "memory" );
}
void _CPU_cache_flush_1_data_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "dcbf 0,%0" :: "r" (__address) : "memory" );
}
void _CPU_cache_invalidate_1_instruction_line(
const void * _address )
{
register const void *__address = _address;
asm volatile ( "icbi 0,%0" :: "r" (__address) : "memory");
}
/* end of file */