source: rtems/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h @ f9acc33

4.115
Last change on this file since f9acc33 was f9acc33, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/11/11 at 09:46:53

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • e500/mmu/mmu.c, mpc505/ictrl/ictrl.c, mpc505/timer/timer.c, mpc5xx/ictrl/ictrl.c, mpc5xx/timer/timer.c, mpc6xx/altivec/vec_sup.c, mpc6xx/clock/c_clock.c, mpc6xx/mmu/bat.c, mpc6xx/mmu/bat.h, mpc6xx/mmu/pte121.c, mpc8260/timer/timer.c, mpc8xx/timer/timer.c, new-exceptions/cpu.c, new-exceptions/bspsupport/ppc_exc_initialize.c, ppc403/clock/clock.c, ppc403/console/console.c, ppc403/console/console.c.polled, ppc403/console/console405.c, ppc403/irq/ictrl.c, ppc403/tty_drv/tty_drv.c, rtems/powerpc/cache.h, shared/include/powerpc-utility.h, shared/src/cache.c: Use "asm" instead of "asm" for improved c99-compliance.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * $Id$
3 */
4
5#ifndef _RTEMS_POWERPC_CACHE_H
6#define _RTEMS_POWERPC_CACHE_H
7
8#include <rtems/powerpc/powerpc.h> /* for PPC_D_CACHE */
9
10#ifdef _OLD_EXCEPTIONS
11
12#if (PPC_D_CACHE != 0)
13#define _CPU_Data_Cache_Block_Flush( _address ) \
14  do { register void *__address = (_address); \
15       register uint32_t   _zero = 0; \
16       __asm__ volatile ( "dcbf %0,%1" : \
17                      "=r" (_zero), "=r" (__address) : \
18                      "0" (_zero), "1" (__address) \
19       ); \
20  } while (0)
21#else
22#define _CPU_Data_Cache_Block_Flush( _address ) /* nop */
23#endif
24
25/*
26 * FIXME: This is not used anywhere.
27 */
28#if (PPC_D_CACHE != 0)
29#define _CPU_Data_Cache_Block_Invalidate( _address ) \
30  do { register void *__address = (_address); \
31       register uint32_t   _zero = 0; \
32       __asm__ volatile ( "dcbi %0,%1" : \
33                      "=r" (_zero), "=r" (__address) : \
34                      "0" (_zero), "1" (__address) \
35       ); \
36  } while (0)
37#else
38#define _CPU_Data_Cache_Block_Invalidate( _address ) /* nop */
39#endif
40#endif
41
42#endif
Note: See TracBrowser for help on using the repository browser.