blob: 45a9a2cfaf79ff73a7cdc12b673b93a5d9d7aedc [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* cpudata.h: Per-cpu parameters.
2 *
David S. Millerd7ce78f2005-08-29 22:46:43 -07003 * Copyright (C) 2003, 2005 David S. Miller (davem@redhat.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 */
5
6#ifndef _SPARC64_CPUDATA_H
7#define _SPARC64_CPUDATA_H
8
9#include <linux/percpu.h>
10
11typedef struct {
12 /* Dcache line 1 */
David S. Millerd7ce78f2005-08-29 22:46:43 -070013 unsigned int __softirq_pending; /* must be 1st, see rtrap.S */
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 unsigned int multiplier;
15 unsigned int counter;
16 unsigned int idle_volume;
17 unsigned long clock_tick; /* %tick's per second */
18 unsigned long udelay_val;
19
20 /* Dcache line 2 */
21 unsigned int pgcache_size;
22 unsigned int __pad1;
David S. Miller05e28f92006-01-31 18:30:13 -080023 unsigned long *pte_cache;
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 unsigned long *pgd_cache;
David S. Miller05e28f92006-01-31 18:30:13 -080025 unsigned long __pad2;
David S. Miller80dc0d62005-09-26 00:32:17 -070026
27 /* Dcache line 3, rarely used */
28 unsigned int dcache_size;
29 unsigned int dcache_line_size;
30 unsigned int icache_size;
31 unsigned int icache_line_size;
32 unsigned int ecache_size;
33 unsigned int ecache_line_size;
David S. Miller80dc0d62005-09-26 00:32:17 -070034 unsigned int __pad3;
David S. Miller05e28f92006-01-31 18:30:13 -080035 unsigned int __pad4;
Linus Torvalds1da177e2005-04-16 15:20:36 -070036} cpuinfo_sparc;
37
38DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data);
39#define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu))
40#define local_cpu_data() __get_cpu_var(__cpu_data)
41
42#endif /* _SPARC64_CPUDATA_H */