···1-/* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $2- * cache.h: Cache specific code for the Sparc. These include flushing3 * and direct tag/data line access.4 *5- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)6 */78#ifndef _SPARC_CACHE_H9#define _SPARC_CACHE_H1011-#include <asm/asi.h>12-13#define L1_CACHE_SHIFT 514#define L1_CACHE_BYTES 3215#define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)))1617-#define SMP_CACHE_BYTES 32000000000001819/* Direct access to the instruction cache is provided through and20 * alternate address space. The IDC bit must be off in the ICCR on···133 "r" (addr), "i" (ASI_M_FLUSH_USER) :134 "memory");135}0136137#endif /* !(_SPARC_CACHE_H) */
···1+/* cache.h: Cache specific code for the Sparc. These include flushing02 * and direct tag/data line access.3 *4+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)5 */67#ifndef _SPARC_CACHE_H8#define _SPARC_CACHE_H90010#define L1_CACHE_SHIFT 511#define L1_CACHE_BYTES 3212#define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)))1314+#ifdef CONFIG_SPARC3215+#define SMP_CACHE_BYTES_SHIFT 516+#else17+#define SMP_CACHE_BYTES_SHIFT 618+#endif19+20+#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)21+22+#define __read_mostly __attribute__((__section__(".data.read_mostly")))23+24+#ifdef CONFIG_SPARC3225+#include <asm/asi.h>2627/* Direct access to the instruction cache is provided through and28 * alternate address space. The IDC bit must be off in the ICCR on···125 "r" (addr), "i" (ASI_M_FLUSH_USER) :126 "memory");127}128+#endif /* CONFIG_SPARC32 */129130#endif /* !(_SPARC_CACHE_H) */
+1-18
include/asm-sparc64/cache.h
···1-/*2- * include/asm-sparc64/cache.h3- */4-#ifndef __ARCH_SPARC64_CACHE_H5-#define __ARCH_SPARC64_CACHE_H6-7-/* bytes per L1 cache line */8-#define L1_CACHE_SHIFT 59-#define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */10-11-#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))12-13-#define SMP_CACHE_BYTES_SHIFT 614-#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */15-16-#define __read_mostly __attribute__((__section__(".data.read_mostly")))17-18-#endif