162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/* cpudata.h: Per-cpu parameters.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (C) 2003, 2005, 2006 David S. Miller (davem@davemloft.net)
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef _SPARC64_CPUDATA_H
862306a36Sopenharmony_ci#define _SPARC64_CPUDATA_H
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __ASSEMBLY__
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_citypedef struct {
1362306a36Sopenharmony_ci	/* Dcache line 1 */
1462306a36Sopenharmony_ci	unsigned int	__softirq_pending; /* must be 1st, see rtrap.S */
1562306a36Sopenharmony_ci	unsigned int	__nmi_count;
1662306a36Sopenharmony_ci	unsigned long	clock_tick;	/* %tick's per second */
1762306a36Sopenharmony_ci	unsigned long	__pad;
1862306a36Sopenharmony_ci	unsigned int	irq0_irqs;
1962306a36Sopenharmony_ci	unsigned int	__pad2;
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci	/* Dcache line 2, rarely used */
2262306a36Sopenharmony_ci	unsigned int	dcache_size;
2362306a36Sopenharmony_ci	unsigned int	dcache_line_size;
2462306a36Sopenharmony_ci	unsigned int	icache_size;
2562306a36Sopenharmony_ci	unsigned int	icache_line_size;
2662306a36Sopenharmony_ci	unsigned int	ecache_size;
2762306a36Sopenharmony_ci	unsigned int	ecache_line_size;
2862306a36Sopenharmony_ci	unsigned short	sock_id;	/* physical package */
2962306a36Sopenharmony_ci	unsigned short	core_id;
3062306a36Sopenharmony_ci	unsigned short  max_cache_id;	/* groupings of highest shared cache */
3162306a36Sopenharmony_ci	signed short	proc_id;	/* strand (aka HW thread) id */
3262306a36Sopenharmony_ci} cpuinfo_sparc;
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciDECLARE_PER_CPU(cpuinfo_sparc, __cpu_data);
3562306a36Sopenharmony_ci#define cpu_data(__cpu)		per_cpu(__cpu_data, (__cpu))
3662306a36Sopenharmony_ci#define local_cpu_data()	(*this_cpu_ptr(&__cpu_data))
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#endif /* !(__ASSEMBLY__) */
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#include <asm/trap_block.h>
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci#endif /* _SPARC64_CPUDATA_H */
43