The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/asm-alpha/smp.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #ifndef __ASM_SMP_H
    2 #define __ASM_SMP_H
    3 
    4 #include <linux/config.h>
    5 #include <asm/pal.h>
    6 
    7 /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
    8 
    9 static __inline__ unsigned char
   10 __hard_smp_processor_id(void)
   11 {
   12         register unsigned char __r0 __asm__("$0");
   13         __asm__ __volatile__(
   14                 "call_pal %1 #whami"
   15                 : "=r"(__r0)
   16                 :"i" (PAL_whami)
   17                 : "$1", "$22", "$23", "$24", "$25");
   18         return __r0;
   19 }
   20 
   21 #ifdef CONFIG_SMP
   22 
   23 #include <linux/threads.h>
   24 #include <asm/irq.h>
   25 
   26 struct cpuinfo_alpha {
   27         unsigned long loops_per_jiffy;
   28         unsigned long last_asn;
   29         int need_new_asn;
   30         int asn_lock;
   31         unsigned long *pgd_cache;
   32         unsigned long *pmd_cache;
   33         unsigned long *pte_cache;
   34         unsigned long pgtable_cache_sz;
   35         unsigned long ipi_count;
   36         unsigned long irq_attempt[NR_IRQS];
   37         unsigned long prof_multiplier;
   38         unsigned long prof_counter;
   39         unsigned char mcheck_expected;
   40         unsigned char mcheck_taken;
   41         unsigned char mcheck_extra;
   42 } __attribute__((aligned(64)));
   43 
   44 extern struct cpuinfo_alpha cpu_data[NR_CPUS];
   45 
   46 #define PROC_CHANGE_PENALTY     20
   47 
   48 /* Map from cpu id to sequential logical cpu number.  This will only
   49    not be idempotent when cpus failed to come on-line.  */
   50 extern int __cpu_number_map[NR_CPUS];
   51 #define cpu_number_map(cpu)  __cpu_number_map[cpu]
   52 
   53 /* The reverse map from sequential logical cpu number to cpu id.  */
   54 extern int __cpu_logical_map[NR_CPUS];
   55 #define cpu_logical_map(cpu)  __cpu_logical_map[cpu]
   56 
   57 #define hard_smp_processor_id() __hard_smp_processor_id()
   58 #define smp_processor_id()      (current->processor)
   59 
   60 extern unsigned long cpu_present_mask;
   61 #define cpu_online_map cpu_present_mask
   62 
   63 extern int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, unsigned long cpu);
   64 
   65 #else /* CONFIG_SMP */
   66 
   67 #define smp_call_function_on_cpu(func,info,retry,wait,cpu)    ({ 0; })
   68 
   69 #endif /* CONFIG_SMP */
   70 
   71 #define NO_PROC_ID      (-1)
   72 
   73 #endif

Cache object: 756d74621ac742d924cd608ead4b9527


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.