rtems: Use size_t for cache line size

A cache line cannot have a negative size.
This commit is contained in:
Sebastian Huber
2014-02-26 11:00:17 +01:00
parent 5e8301da86
commit e7549ff4a1
5 changed files with 8 additions and 8 deletions

View File

@@ -629,7 +629,7 @@ static void initializeHardware(struct bfin_ethernetSoftc *sc) {
including other status structures, so we can safely manage both the
processor and DMA writing to them. So this rounds up the structure
sizes to a multiple of the cache line size. */
cacheAlignment = rtems_cache_get_data_line_size();
cacheAlignment = (int) rtems_cache_get_data_line_size();
if (cacheAlignment == 0)
cacheAlignment = 1;
rxStatusSize = cacheAlignment * ((sizeof(rxStatusT) + cacheAlignment - 1) /

View File

@@ -21,7 +21,7 @@ int ppc_exc_alignment_handler(BSP_Exception_frame *frame, unsigned excNum)
/* Do we have a dcbz instruction? */
if ((opcode & 0xffe007ff) == 0x7c0007ec) {
unsigned clsz = (unsigned) rtems_cache_get_data_line_size();
unsigned clsz = rtems_cache_get_data_line_size();
unsigned a = (opcode >> 16) & 0x1f;
unsigned b = (opcode >> 11) & 0x1f;
unsigned *regs = &frame->GPR0;

View File

@@ -149,7 +149,7 @@ rtems_cache_invalidate_entire_data( void )
/*
* This function returns the data cache granularity.
*/
int
size_t
rtems_cache_get_data_line_size( void )
{
#if defined(CPU_DATA_CACHE_ALIGNMENT)
@@ -264,7 +264,7 @@ rtems_cache_invalidate_entire_instruction( void )
/*
* This function returns the instruction cache granularity.
*/
int
size_t
rtems_cache_get_instruction_line_size( void )
{
#if defined(CPU_INSTRUCTION_CACHE_ALIGNMENT)