Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* cpudata.h: Per-cpu parameters.
0003  *
0004  * Copyright (C) 2004 Keith M Wesolowski (wesolows@foobazco.org)
0005  *
0006  * Based on include/asm/cpudata.h and Linux 2.4 smp.h
0007  * both (C) David S. Miller.
0008  */
0009 
0010 #ifndef _SPARC_CPUDATA_H
0011 #define _SPARC_CPUDATA_H
0012 
0013 #include <linux/percpu.h>
0014 
0015 typedef struct {
0016     unsigned long udelay_val;
0017     unsigned long clock_tick;
0018     unsigned int counter;
0019 #ifdef CONFIG_SMP
0020     unsigned int irq_resched_count;
0021     unsigned int irq_call_count;
0022 #endif
0023     int prom_node;
0024     int mid;
0025     int next;
0026 } cpuinfo_sparc;
0027 
0028 DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data);
0029 #define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu))
0030 #define local_cpu_data() (*this_cpu_ptr(&__cpu_data))
0031 
0032 #endif /* _SPARC_CPUDATA_H */