From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13639 invoked from network); 20 Mar 2000 03:24:44 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 20 Mar 2000 03:24:44 -0000 Received: from network-services.uoregon.edu (network-services.uoregon.edu [128.223.60.21]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id WAA08273 for ; Sun, 19 Mar 2000 22:24:43 -0500 From: werner@darkwing.uoregon.edu Received: from darkwing.uoregon.edu (ev6.uoregon.edu [128.223.23.31]) by network-services.uoregon.edu (8.9.3/8.9.3) with ESMTP id TAA15493; Sun, 19 Mar 2000 19:24:38 -0800 (PST) Sender: werner@network-services.uoregon.edu Message-ID: <38D599F6.7341FE7A@darkwing.uoregon.edu> Date: Sun, 19 Mar 2000 19:24:38 -0800 X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.3.99-pre2 alpha) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com, torvalds@transmeta.com Subject: patch for include/asm-alpha/cache.h Content-Type: multipart/mixed; boundary="------------4F6A5A526DC8C284CAA98516" This is a multi-part message in MIME format. --------------4F6A5A526DC8C284CAA98516 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit what is the status of adding page coloring for Alpha? --------------4F6A5A526DC8C284CAA98516 Content-Type: text/plain; charset=us-ascii; name="Makefile.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile.diff" --- linux/arch/alpha/Makefile.orig Sun Mar 19 16:51:44 2000 +++ linux/arch/alpha/Makefile Sun Mar 19 16:49:57 2000 @@ -31,37 +31,37 @@ # more likely to keep an EV4 processor busy than vice-versa. mcpu_done := n ifeq ($(CONFIG_ALPHA_GENERIC),y) - CFLAGS := $(CFLAGS) -mcpu=ev5 + CFLAGS := $(CFLAGS) -mcpu=ev5 -DCPU=EV5 mcpu_done := y endif ifeq ($(mcpu_done)$(CONFIG_ALPHA_PYXIS),ny) - CFLAGS := $(CFLAGS) -mcpu=ev56 + CFLAGS := $(CFLAGS) -mcpu=ev56 -DCPU=EV5 mcpu_done := y endif ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS),ny) ifeq ($(have_mcpu_pca56),y) - CFLAGS := $(CFLAGS) -mcpu=pca56 + CFLAGS := $(CFLAGS) -mcpu=pca56 -DCPU=EV5 else - CFLAGS := $(CFLAGS) -mcpu=ev56 + CFLAGS := $(CFLAGS) -mcpu=ev56 -DCPU=EV5 endif mcpu_done := y endif ifeq ($(mcpu_done)$(CONFIG_ALPHA_NAUTILUS)$(have_mcpu_ev67),nyy) - CFLAGS := $(CFLAGS) -mcpu=ev67 + CFLAGS := $(CFLAGS) -mcpu=ev67 -DCPU=EV6 mcpu_done := y endif ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),ny) - CFLAGS := $(CFLAGS) -mcpu=ev4 + CFLAGS := $(CFLAGS) -mcpu=ev4 -DCPU=EV4 mcpu_done := y endif ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),ny) ifeq ($(have_mcpu_ev6),y) - CFLAGS := $(CFLAGS) -mcpu=ev6 + CFLAGS := $(CFLAGS) -mcpu=ev6 -DCPU=EV6 else ifeq ($(have_mcpu_pca56),y) - CFLAGS := $(CFLAGS) -mcpu=pca56 + CFLAGS := $(CFLAGS) -mcpu=pca56 -DCPU=EV5 else - CFLAGS := $(CFLAGS) -mcpu=ev56 + CFLAGS := $(CFLAGS) -mcpu=ev56 -DCPU=EV5 endif endif mcpu_done := y --------------4F6A5A526DC8C284CAA98516 Content-Type: text/plain; charset=us-ascii; name="cache.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cache.h.diff" --- linux/include/asm-alpha/cache.h.orig Sun Mar 19 16:39:23 2000 +++ linux/include/asm-alpha/cache.h Sun Mar 19 19:11:23 2000 @@ -1,12 +1,53 @@ /* * include/asm-alpha/cache.h + * + * Modified 03/19/2000 by Michael Werner to include more details + * of the Alpha processors for future optimizations, + * for example, processor dependent page coloring. */ + #ifndef __ARCH_ALPHA_CACHE_H #define __ARCH_ALPHA_CACHE_H -/* Bytes per L1 (data) cache line. Both EV4 and EV5 are write-through, - read-allocate, direct-mapped, physical. */ +/* L1_CACHE_BYTES is Bytes per L1 (data) cache line. + * L1_CACHE_PAGES is the size of the L1 data cache in units of default pages + */ + +/* + * EV5 has a dual-read-ported, single-write-ported, 8KB data cache. + * It is a write-through, read-allocate, direct-mapped, physical cache + * with 32-byte blocks. + * See 21164 and 21164PC Alpha Microprocessor Data Sheets. + */ + +#if CPU==EV4 || CPU==EV5 #define L1_CACHE_BYTES 32 +#define L1_CACHE_PAGES 1 + +/* + * EV6 has a virtually-indexed, physically-tagged two-way associative + * write-back, read/write allocate 64KB data cache. + * See 21264 Alpha Microprocessor Data Sheet at + * http://ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html + * + * Avoid touching data that is 32KB apart. + * The 21264 can have only one memory operation in progress at a time + * that maps to any one cache index. Otherwise a replay trap may result. + * See 21264 Compilers Writers Guide for more information. + */ + +#elif CPU==EV6 || CPU==EV67 || CPU==EV7 +#define L1_CACHE_BYTES 64 +#define L1_CACHE_PAGES 8 +#else + +/* Force errors in compilation so the correct values are assigned rather than defaults */ + +#define L1_CACHE_BYTES 0 +#define L1_CACHE_PAGES 0 +#endif + + #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define SMP_CACHE_BYTES L1_CACHE_BYTES --------------4F6A5A526DC8C284CAA98516--