···11-/* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $22- * cache.h: Cache specific code for the Sparc. These include flushing11+/* cache.h: Cache specific code for the Sparc. These include flushing32 * and direct tag/data line access.43 *55- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)44+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)65 */7687#ifndef _SPARC_CACHE_H98#define _SPARC_CACHE_H1091111-#include <asm/asi.h>1212-1310#define L1_CACHE_SHIFT 51411#define L1_CACHE_BYTES 321512#define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)))16131717-#define SMP_CACHE_BYTES 321414+#ifdef CONFIG_SPARC321515+#define SMP_CACHE_BYTES_SHIFT 51616+#else1717+#define SMP_CACHE_BYTES_SHIFT 61818+#endif1919+2020+#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)2121+2222+#define __read_mostly __attribute__((__section__(".data.read_mostly")))2323+2424+#ifdef CONFIG_SPARC322525+#include <asm/asi.h>18261927/* Direct access to the instruction cache is provided through and2028 * alternate address space. The IDC bit must be off in the ICCR on···133125 "r" (addr), "i" (ASI_M_FLUSH_USER) :134126 "memory");135127}128128+#endif /* CONFIG_SPARC32 */136129137130#endif /* !(_SPARC_CACHE_H) */
+1-18
include/asm-sparc64/cache.h
···11-/*22- * include/asm-sparc64/cache.h33- */44-#ifndef __ARCH_SPARC64_CACHE_H55-#define __ARCH_SPARC64_CACHE_H66-77-/* bytes per L1 cache line */88-#define L1_CACHE_SHIFT 599-#define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */1010-1111-#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))1212-1313-#define SMP_CACHE_BYTES_SHIFT 61414-#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */1515-1616-#define __read_mostly __attribute__((__section__(".data.read_mostly")))1717-1818-#endif11+#include <asm-sparc/cache.h>