Changeset 0187fd0 in mainline


Ignore:
Timestamp:
2005-11-08T17:21:53Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b5ac364
Parents:
0060b1d
Message:

fix IA-32 fences (½)

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/Makefile.inc

    r0060b1d r0187fd0  
    5050ifeq ($(CPU),athlon-xp)
    5151        CFLAGS += -march=athlon-xp -mmmx -msse -m3dnow
    52         DEFS += -DFENCES=p3
     52        DEFS += -DCONFIG_FENCES_P3
    5353        CONFIG_SMP = n
    5454        CONFIG_HT = n
     
    5656ifeq ($(CPU),athlon-mp)
    5757        CFLAGS += -march=athlon-mp -mmmx -msse -m3dnow
    58         DEFS += -DFENCES=p3
     58        DEFS += -DCONFIG_FENCES_P3
    5959        CONFIG_HT = n
    6060endif
    6161ifeq ($(CPU),pentium3)
    6262        CFLAGS += -march=pentium3 -mmmx -msse
    63         DEFS += -DFENCES=p3
     63        DEFS += -DCONFIG_FENCES_P3
    6464        CONFIG_HT = n
    6565endif
    6666ifeq ($(CPU),prescott)
    6767        CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -msse3
    68         DEFS += -DFENCES=p4
     68        DEFS += -DCONFIG_FENCES_P4
    6969endif
    7070ifeq ($(CPU),pentium4)
    7171        CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2
    72         DEFS += -DFENCES=p4
     72        DEFS += -DCONFIG_FENCES_P4
    7373endif
    7474
  • arch/ia32/include/barrier.h

    r0060b1d r0187fd0  
    4444#define CS_LEAVE_BARRIER()      __asm__ volatile ("" ::: "memory")
    4545
    46 #if (FENCES == p4)
     46#ifdef CONFIG_FENCES_P4
    4747#       define memory_barrier() __asm__ volatile ("mfence\n" ::: "memory")
    48 #       define read_barrier()           __asm__ volatile ("sfence\n" ::: "memory")
    49 #       define write_barrier()          __asm__ volatile ("lfence\n" ::: "memory")
    50 #elif (FENCES == p3)
    51 #       define memory_barrier() __asm__ volatile ("xchgl %%eax,%%eax\n" ::: "memory")
    52 #       define read_barrier()           __asm__ volatile ("sfence\n" ::: "memory")
    53 #       define write_barrier()          __asm__ volatile ("xchgl %%eax,%%eax\n" ::: "memory")
    54 #else
    55 #       error Unsupported FENCES value
     48#       define read_barrier()           __asm__ volatile ("lfence\n" ::: "memory")
     49#       define write_barrier()          __asm__ volatile ("sfence\n" ::: "memory")
     50#elif CONFIG_FENCES_P3
     51#       define memory_barrier() __asm__ volatile ("\n" ::: "memory")
     52#       define read_barrier()           __asm__ volatile ("\n" ::: "memory")
     53#       define write_barrier()          __asm__ volatile ("sfence\n" ::: "memory")
    5654#endif
    5755
Note: See TracChangeset for help on using the changeset viewer.