Changeset b9b103d3 in mainline


Ignore:
Timestamp:
2005-10-27T15:53:40Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39cb79a
Parents:
807d2d4
Message:

Enable/disable CPU memory barriers at compile time

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile.config

    r807d2d4 rb9b103d3  
    88# If this is yes, then the native compiler will be used instead of cross compiler
    99NATIVE_COMPILER=no
     10
     11# If this is yes, strong CPU ordering is assumed
     12STRONG_ORDERING=no
    1013
    1114# Support for symetric multiprocessors
  • arch/ia32/Makefile.inc

    r807d2d4 rb9b103d3  
    2323DEFS:=-DARCH=$(ARCH) -DFPU_LAZY
    2424
     25ifeq (${STRONG_ORDERING},yes)
     26        DEFS+=-D__STRONG_ORDERING__
     27endif
     28
    2529ifdef SMP
    26 DEFS+=-D$(SMP)
     30        DEFS+=-D$(SMP)
    2731endif
    2832
    2933ifdef HT
    30 DEFS+=-D$(HT)
     34        DEFS+=-D$(HT)
    3135endif
    3236
  • arch/ia32/include/barrier.h

    r807d2d4 rb9b103d3  
    4444#define CS_LEAVE_BARRIER()      __asm__ volatile ("" ::: "memory")
    4545
     46#ifdef __STRONG_ORDERING__
     47
     48#define memory_barrier()
     49#define read_barrier()
     50#define write_barrier()
     51
     52#else
     53
    4654#define memory_barrier()        __asm__ volatile ("mfence\n" ::: "memory")
    4755#define read_barrier()          __asm__ volatile ("sfence\n" ::: "memory")
     
    4957
    5058#endif
     59
     60#endif
  • build.ia32

    r807d2d4 rb9b103d3  
    33COMPILER=""
    44
    5 if [ "$1" == "native" ];
    6 then
    7         COMPILER="NATIVE_COMPILER=yes";
    8 fi;
     5while [ "$#" -gt 0 ]; do
     6        case "$1" in
     7                native)
     8                        COMPILER="$COMPILER NATIVE_COMPILER=yes"
     9                        ;;
     10                strong)
     11                        COMPILER="$COMPILER STRONG_ORDERING=yes"
     12                        ;;
     13                *)
     14                        echo "Supported arguments: native strong"
     15                        exit 1
     16                        ;;
     17        esac
     18        shift
     19done
    920
    1021make all ARCH=ia32 $COMPILER
Note: See TracChangeset for help on using the changeset viewer.