cregit-Linux how code gets into the kernel

Release 4.14 arch/ia64/include/asm/smp.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * SMP Support
 *
 * Copyright (C) 1999 VA Linux Systems
 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
 * (c) Copyright 2001-2003, 2005 Hewlett-Packard Development Company, L.P.
 *      David Mosberger-Tang <davidm@hpl.hp.com>
 *      Bjorn Helgaas <bjorn.helgaas@hp.com>
 */
#ifndef _ASM_IA64_SMP_H

#define _ASM_IA64_SMP_H

#include <linux/init.h>
#include <linux/threads.h>
#include <linux/kernel.h>
#include <linux/cpumask.h>
#include <linux/bitops.h>
#include <linux/irqreturn.h>

#include <asm/io.h>
#include <asm/param.h>
#include <asm/processor.h>
#include <asm/ptrace.h>


static inline unsigned int ia64_get_lid (void) { union { struct { unsigned long reserved : 16; unsigned long eid : 8; unsigned long id : 8; unsigned long ignored : 32; } f; unsigned long bits; } lid; lid.bits = ia64_getreg(_IA64_REG_CR_LID); return lid.f.id << 8 | lid.f.eid; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas72100.00%1100.00%
Total72100.00%1100.00%

#define hard_smp_processor_id() ia64_get_lid() #ifdef CONFIG_SMP #define XTP_OFFSET 0x1e0008 #define SMP_IRQ_REDIRECTION (1 << 0) #define SMP_IPI_REDIRECTION (1 << 1) #define raw_smp_processor_id() (current_thread_info()->cpu) extern struct smp_boot_data { int cpu_count; int cpu_phys_id[NR_CPUS]; } smp_boot_data __initdata; extern char no_int_routing; extern cpumask_t cpu_core_map[NR_CPUS]; DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); extern int smp_num_siblings; extern void __iomem *ipi_base_addr; extern unsigned char smp_int_redirect; extern volatile int ia64_cpu_to_sapicid[]; #define cpu_physical_id(i) ia64_cpu_to_sapicid[i] extern unsigned long ap_wakeup_vector; /* * Function to map hard smp processor id to logical id. Slow, so don't use this in * performance-critical code. */
static inline int cpu_logical_id (int cpuid) { int i; for (i = 0; i < NR_CPUS; ++i) if (cpu_physical_id(i) == cpuid) break; return i; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)3794.87%133.33%
Linus Torvalds12.56%133.33%
Rusty Russell12.56%133.33%
Total39100.00%3100.00%

/* * XTP control functions: * min_xtp : route all interrupts to this CPU * normal_xtp: nominal XTP value * max_xtp : never deliver interrupts to this CPU. */
static inline void min_xtp (void) { if (smp_int_redirect & SMP_IRQ_REDIRECTION) writeb(0x00, ipi_base_addr + XTP_OFFSET); /* XTP to min */ }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2496.00%375.00%
David Mosberger-Tang14.00%125.00%
Total25100.00%4100.00%


static inline void normal_xtp (void) { if (smp_int_redirect & SMP_IRQ_REDIRECTION) writeb(0x08, ipi_base_addr + XTP_OFFSET); /* XTP normal */ }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2496.00%375.00%
David Mosberger-Tang14.00%125.00%
Total25100.00%4100.00%


static inline void max_xtp (void) { if (smp_int_redirect & SMP_IRQ_REDIRECTION) writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */ }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2496.00%375.00%
David Mosberger-Tang14.00%125.00%
Total25100.00%4100.00%

/* Upping and downing of CPUs */ extern int __cpu_disable (void); extern void __cpu_die (unsigned int cpu); extern void cpu_die (void) __attribute__ ((noreturn)); extern void __init smp_build_cpu_map(void); extern void __init init_smp_config (void); extern void smp_do_timer (struct pt_regs *regs); extern irqreturn_t handle_IPI(int irq, void *dev_id); extern void smp_send_reschedule (int cpu); extern void identify_siblings (struct cpuinfo_ia64 *); extern int is_multithreading_enabled(void); extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); #else /* CONFIG_SMP */ #define cpu_logical_id(i) 0 #define cpu_physical_id(i) ia64_get_lid() #endif /* CONFIG_SMP */ #endif /* _ASM_IA64_SMP_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)19944.12%516.67%
Björn Helgaas9220.40%26.67%
Rusty Russell296.43%26.67%
Andrew Morton255.54%310.00%
Linus Torvalds204.43%310.00%
Suresh B. Siddha173.77%13.33%
David Mosberger-Tang173.77%310.00%
Isaku Yamahata153.33%13.33%
Jens Axboe112.44%13.33%
Kimio Suganuma81.77%13.33%
Fernando Luis Vázquez Cao61.33%26.67%
Mike Travis40.89%13.33%
Stéphane Eranian40.89%13.33%
Greg Kroah-Hartman10.22%13.33%
David Howells10.22%13.33%
Jiri Slaby10.22%13.33%
Ingo Molnar10.22%13.33%
Total451100.00%30100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.