/linux-master/arch/x86/kernel/ |
H A D | doublefault_32.c | 18 static void set_df_gdt_entry(unsigned int cpu); 107 static void set_df_gdt_entry(unsigned int cpu) argument 110 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, 111 &get_cpu_entry_area(cpu)->doublefault_stack.tss); 117 unsigned int cpu = smp_processor_id(); local 118 struct cpu_entry_area *cea = get_cpu_entry_area(cpu); 128 set_df_gdt_entry(cpu);
|
H A D | espfix_64.c | 75 static inline unsigned long espfix_base_addr(unsigned int cpu) argument 80 page = (cpu / ESPFIX_STACKS_PER_PAGE) ^ page_random; 81 slot = (cpu + slot_random) % ESPFIX_STACKS_PER_PAGE; 125 void init_espfix_ap(int cpu) argument 141 if (likely(per_cpu(espfix_stack, cpu))) 144 addr = espfix_base_addr(cpu); 145 page = cpu/ESPFIX_STACKS_PER_PAGE; 159 node = cpu_to_node(cpu); 202 per_cpu(espfix_stack, cpu) = addr; 203 per_cpu(espfix_waddr, cpu) [all...] |
/linux-master/arch/x86/kernel/cpu/microcode/ |
H A D | internal.h | 8 #include <asm/cpu.h> 25 enum ucode_state (*request_microcode_fw)(int cpu, struct device *dev); 26 void (*microcode_fini_cpu)(int cpu); 33 enum ucode_state (*apply_microcode)(int cpu); 34 int (*collect_cpu_info)(int cpu, struct cpu_signature *csig); 104 void reload_ucode_amd(unsigned int cpu); 111 static inline void reload_ucode_amd(unsigned int cpu) { } argument
|
/linux-master/drivers/irqchip/ |
H A D | irq-riscv-imsic-early.c | 8 #include <linux/cpu.h> 23 static void imsic_ipi_send(unsigned int cpu) argument 25 struct imsic_local_config *local = per_cpu_ptr(imsic->global.local, cpu); 73 int err, cpu = smp_processor_id(); local 91 vec = imsic_vector_from_local_id(cpu, local_id); 105 static int imsic_starting_cpu(unsigned int cpu) argument 128 static int imsic_dying_cpu(unsigned int cpu) argument
|
H A D | irq-jcore-aic.c | 15 #include <linux/cpu.h> 29 * The J-Core AIC1 and AIC2 are cpu-local interrupt controllers and do 30 * not distinguish or use distinct irq number ranges for per-cpu event 32 * particular irq number should be treated as per-cpu is not available 77 unsigned cpu; local 79 for_each_present_cpu(cpu) { 80 void __iomem *base = of_iomap(node, cpu); 83 pr_err("Unable to map AIC for cpu %u\n", cpu); 95 * such mechanism; the only interrupt masking is at the cpu leve [all...] |
H A D | irq-riscv-aplic-direct.c | 9 #include <linux/cpu.h> 56 unsigned int cpu, val; local 60 cpu = cpumask_first_and(&direct->lmask, mask_val); 62 cpu = cpumask_first_and_and(&direct->lmask, mask_val, cpu_online_mask); 64 if (cpu >= nr_cpu_ids) 67 idc = per_cpu_ptr(&aplic_idcs, cpu); 73 irq_data_update_effective_affinity(d, cpumask_of(cpu)); 173 static int aplic_direct_dying_cpu(unsigned int cpu) argument 181 static int aplic_direct_starting_cpu(unsigned int cpu) argument 218 int i, j, rc, cpu, current_cp local [all...] |
/linux-master/arch/mips/sgi-ip27/ |
H A D | ip27-timer.c | 32 unsigned int cpu = smp_processor_id(); local 33 int slice = cputoslice(cpu); 48 unsigned int cpu = smp_processor_id(); local 49 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); 50 int slice = cputoslice(cpu); 81 unsigned int cpu = smp_processor_id(); local 82 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); 83 unsigned char *name = per_cpu(hub_rt_name, cpu); 85 sprintf(name, "hub-rt %d", cpu); 95 cd->cpumask = cpumask_of(cpu); [all...] |
/linux-master/arch/csky/mm/ |
H A D | asid.c | 16 #define reserved_asid(info, cpu) *per_cpu_ptr((info)->reserved, cpu) 57 int cpu; local 69 for_each_possible_cpu(cpu) { 70 if (reserved_asid(info, cpu) == asid) { 72 reserved_asid(info, cpu) = newasid; 135 * @cpu: current CPU ID. Must have been acquired through get_cpu() 138 unsigned int cpu, struct mm_struct *mm) 151 if (cpumask_test_and_clear_cpu(cpu, &info->flush_pending)) 154 atomic64_set(&active_asid(info, cpu), asi 137 asid_new_context(struct asid_info *info, atomic64_t *pasid, unsigned int cpu, struct mm_struct *mm) argument [all...] |
/linux-master/drivers/cpufreq/ |
H A D | scpi-cpufreq.c | 12 #include <linux/cpu.h> 30 static unsigned int scpi_cpufreq_get_rate(unsigned int cpu) argument 32 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); 60 int cpu, domain, tdomain; local 67 for_each_possible_cpu(cpu) { 68 if (cpu == cpu_dev->id) 71 tcpu_dev = get_cpu_device(cpu); 77 cpumask_set_cpu(cpu, cpumask); 91 cpu_dev = get_cpu_device(policy->cpu); 93 pr_err("failed to get cpu [all...] |
H A D | cpufreq-dt.c | 12 #include <linux/cpu.h> 45 static struct private_data *cpufreq_dt_find_data(int cpu) argument 50 if (cpumask_test_cpu(cpu, priv->cpus)) 73 int cpu = dev->id; local 80 if (!cpu) { 86 pp = of_find_property(np, "cpu-supply", NULL); 88 return "cpu"; 90 dev_dbg(dev, "no regulator for cpu%d\n", cpu); 102 priv = cpufreq_dt_find_data(policy->cpu); 182 dt_cpufreq_early_init(struct device *dev, int cpu) argument 309 int ret, cpu; local [all...] |
/linux-master/arch/arm/kernel/ |
H A D | devtree.c | 59 * arm_dt_init_cpu_maps - Function retrieves cpu nodes from the device tree 60 * and builds the cpu logical map array containing MPIDR values related to 63 * Updates the cpu possible mask with the number of parsed cpu nodes 73 struct device_node *cpu, *cpus; local 85 for_each_of_cpu_node(cpu) { 86 u32 hwid = of_get_cpu_hwid(cpu, 0); 88 pr_debug(" * %pOF...\n", cpu); 95 of_node_put(cpu); 108 "Duplicate /cpu re 167 arch_match_cpu_phys_id(int cpu, u64 phys_id) argument [all...] |
/linux-master/arch/s390/mm/ |
H A D | maccess.c | 14 #include <linux/cpu.h> 133 int cpu; local 135 for_each_online_cpu(cpu) { 136 lc = virt_to_phys(lowcore_ptr[cpu]); 139 return cpu; 156 int this_cpu, cpu; local 161 cpu = get_swapped_owner(addr); 162 if (cpu < 0) 174 } else if (cpu == this_cpu) { 175 ptr = (void *)(addr - virt_to_phys(lowcore_ptr[cpu])); [all...] |
/linux-master/arch/s390/kernel/ |
H A D | cache.c | 9 #include <linux/cpu.h> 104 enum cache_type type, unsigned int level, int cpu) 120 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); 125 int init_cache_level(unsigned int cpu) argument 127 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); 147 int populate_cache_leaves(unsigned int cpu) argument 149 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); 163 ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_DATA, level, cpu); 164 ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_INST, level, cpu); 166 ci_leaf_init(this_leaf++, pvt, ctype, level, cpu); 103 ci_leaf_init(struct cacheinfo *this_leaf, int private, enum cache_type type, unsigned int level, int cpu) argument [all...] |
/linux-master/arch/x86/kernel/cpu/ |
H A D | intel_epb.c | 12 #include <linux/cpu.h> 134 unsigned int cpu = dev->id; local 138 ret = rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, &epb); 149 unsigned int cpu = dev->id; local 160 ret = rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, &epb); 164 ret = wrmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, 184 static int intel_epb_online(unsigned int cpu) argument 186 struct device *cpu_dev = get_cpu_device(cpu); 195 static int intel_epb_offline(unsigned int cpu) argument 197 struct device *cpu_dev = get_cpu_device(cpu); [all...] |
/linux-master/arch/riscv/kernel/ |
H A D | smpboot.c | 20 #include <linux/cpu.h> 80 * the cpu to which RINTC belongs. 176 static int start_secondary_cpu(int cpu, struct task_struct *tidle) argument 179 return cpu_ops->cpu_start(cpu, tidle); 184 int __cpu_up(unsigned int cpu, struct task_struct *tidle) argument 187 tidle->thread_info.cpu = cpu; 189 ret = start_secondary_cpu(cpu, tidle); 194 if (!cpu_online(cpu)) { 195 pr_crit("CPU%u: failed to come online\n", cpu); [all...] |
/linux-master/net/rds/ |
H A D | page.c | 35 #include <linux/cpu.h> 62 * page in a per-cpu structure. Future partial-page allocations may be 155 unsigned int cpu; local 157 for_each_possible_cpu(cpu) { 160 rem = &per_cpu(rds_page_remainders, cpu); 161 rdsdebug("cpu %u\n", cpu);
|
/linux-master/drivers/xen/events/ |
H A D | events_2l.c | 50 static void evtchn_2l_remove(evtchn_port_t evtchn, unsigned int cpu) argument 52 clear_bit(evtchn, BM(per_cpu(cpu_evtchn_mask, cpu))); 55 static void evtchn_2l_bind_to_cpu(evtchn_port_t evtchn, unsigned int cpu, argument 59 set_bit(evtchn, BM(per_cpu(cpu_evtchn_mask, cpu))); 89 unsigned int cpu = get_cpu(); local 96 if (unlikely((cpu != cpu_from_evtchn(port)))) 147 static inline xen_ulong_t active_evtchns(unsigned int cpu, argument 152 per_cpu(cpu_evtchn_mask, cpu)[idx] & 164 static void evtchn_2l_handle_events(unsigned cpu, struct evtchn_loop_ctrl *ctrl) argument 177 irq = irq_evtchn_from_virq(cpu, VIRQ_TIME 267 int cpu = smp_processor_id(); local 357 evtchn_2l_percpu_deinit(unsigned int cpu) argument [all...] |
/linux-master/arch/loongarch/kernel/ |
H A D | env.c | 43 int cpu, ret; local 54 for (cpu = 0; cpu < NR_CPUS; cpu++) 55 __cpu_full_name[cpu] = loongson_sysconf.cpuname;
|
/linux-master/arch/x86/include/asm/ |
H A D | desc.h | 52 static inline struct desc_struct *get_cpu_gdt_rw(unsigned int cpu) argument 54 return per_cpu(gdt_page, cpu).gdt; 64 static inline struct desc_struct *get_cpu_gdt_ro(int cpu) argument 66 return (struct desc_struct *)&get_cpu_entry_area(cpu)->gdt; 76 static inline phys_addr_t get_cpu_gdt_paddr(unsigned int cpu) argument 78 return per_cpu_ptr_to_phys(get_cpu_gdt_rw(cpu)); 120 #define load_TLS(t, cpu) native_load_tls(t, cpu) 181 static inline void __set_tss_desc(unsigned cpu, unsigned int entry, struct x86_hw_tss *addr) argument 183 struct desc_struct *d = get_cpu_gdt_rw(cpu); 198 unsigned cpu = smp_processor_id(); local 258 int cpu = raw_smp_processor_id(); local 293 native_load_tls(struct thread_struct *t, unsigned int cpu) argument [all...] |
/linux-master/arch/arm/common/ |
H A D | bL_switcher.c | 17 #include <linux/cpu.h> 306 static struct task_struct *bL_switcher_thread_create(int cpu, void *arg) argument 311 cpu_to_node(cpu), "kswitcher_%d", cpu); 313 kthread_bind(task, cpu); 316 pr_err("%s failed for CPU %d\n", __func__, cpu); 324 * @cpu: the CPU to switch 342 int bL_switch_request_cb(unsigned int cpu, unsigned int new_cluster_id, argument 348 if (cpu >= ARRAY_SIZE(bL_threads)) { 349 pr_err("%s: cpu 422 unsigned int cpu, cluster, mask; local 517 int cpu; local 554 int cpu, ret; local 604 unsigned int cpu, cluster; local 755 bL_switcher_cpu_pre(unsigned int cpu) argument [all...] |
/linux-master/drivers/clocksource/ |
H A D | ingenic-timer.c | 32 unsigned int cpu; member in struct:ingenic_tcu_timer 69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); 120 csd = &per_cpu(ingenic_cevt_csd, timer->cpu); 123 smp_call_function_single_async(timer->cpu, csd); 140 static int ingenic_tcu_setup_cevt(unsigned int cpu) argument 143 struct ingenic_tcu_timer *timer = &tcu->timers[cpu]; 182 timer->cpu = smp_processor_id(); 279 unsigned int cpu; local 316 for (cpu = 0; cpu < num_possible_cpu 375 unsigned int cpu; local 388 unsigned int cpu; local [all...] |
/linux-master/kernel/bpf/ |
H A D | percpu_freelist.c | 8 int cpu; local 14 for_each_possible_cpu(cpu) { 15 struct pcpu_freelist_head *head = per_cpu_ptr(s->freelist, cpu); 59 int cpu, orig_cpu; local 63 for_each_cpu_wrap(cpu, cpu_possible_mask, orig_cpu) { 66 head = per_cpu_ptr(s->freelist, cpu); 74 /* cannot lock any per cpu lock, try extralist */ 103 unsigned int cpu, cpu_idx, i, j, n, m; local 109 for_each_possible_cpu(cpu) { 110 head = per_cpu_ptr(s->freelist, cpu); 125 int cpu; local 157 int cpu; local [all...] |
/linux-master/drivers/platform/x86/intel/uncore-frequency/ |
H A D | uncore-frequency.c | 17 #include <linux/cpu.h> 110 static struct uncore_data *uncore_get_instance(unsigned int cpu) argument 112 int id = topology_logical_die_id(cpu); 120 static int uncore_event_cpu_online(unsigned int cpu) argument 125 /* Check if there is an online cpu in the package for uncore MSR */ 126 target = cpumask_any_and(&uncore_cpu_mask, topology_die_cpumask(cpu)); 131 cpumask_set_cpu(cpu, &uncore_cpu_mask); 133 data = uncore_get_instance(cpu); 137 data->package_id = topology_physical_package_id(cpu); 138 data->die_id = topology_die_id(cpu); 144 uncore_event_cpu_offline(unsigned int cpu) argument [all...] |
/linux-master/kernel/trace/ |
H A D | ring_buffer.c | 28 #include <linux/cpu.h> 71 * from any per cpu buffer. 73 * The reader is special. For each per cpu buffer, the reader has its own 291 #define for_each_buffer_cpu(buffer, cpu) \ 292 for_each_cpu(cpu, buffer->cpumask) 294 #define for_each_online_buffer_cpu(buffer, cpu) \ 295 for_each_cpu_and(cpu, buffer->cpumask, cpu_online_mask) 454 int cpu; member in struct:ring_buffer_per_cpu 698 * @cpu: The cpu o 702 ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu) argument 714 ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu) argument 738 full_hit(struct trace_buffer *buffer, int cpu, int full) argument 798 ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu) argument 830 rb_watermark_hit(struct trace_buffer *buffer, int cpu, int full) argument 862 rb_wait_cond(struct rb_irq_work *rbwork, struct trace_buffer *buffer, int cpu, int full, ring_buffer_cond_fn cond, void *data) argument 928 ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full, ring_buffer_cond_fn cond, void *data) argument 987 ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu, struct file *filp, poll_table *poll_table, int full) argument 1095 ring_buffer_normalize_time_stamp(struct trace_buffer *buffer, int cpu, u64 *ts) argument 1596 rb_allocate_cpu_buffer(struct trace_buffer *buffer, long nr_pages, int cpu) argument 1701 int cpu; local 1777 int cpu; local 2046 int cpu, err; local 3225 int cpu; local 3245 int cpu; local 3266 int cpu = raw_smp_processor_id(); local 3758 int cpu; local 3859 int cpu; local 3909 int cpu; local 4103 ring_buffer_record_disable_cpu(struct trace_buffer *buffer, int cpu) argument 4123 ring_buffer_record_enable_cpu(struct trace_buffer *buffer, int cpu) argument 4153 ring_buffer_oldest_event_ts(struct trace_buffer *buffer, int cpu) argument 4186 ring_buffer_bytes_cpu(struct trace_buffer *buffer, int cpu) argument 4206 ring_buffer_entries_cpu(struct trace_buffer *buffer, int cpu) argument 4225 ring_buffer_overrun_cpu(struct trace_buffer *buffer, int cpu) argument 4248 ring_buffer_commit_overrun_cpu(struct trace_buffer *buffer, int cpu) argument 4270 ring_buffer_dropped_events_cpu(struct trace_buffer *buffer, int cpu) argument 4291 ring_buffer_read_events_cpu(struct trace_buffer *buffer, int cpu) argument 4314 int cpu; local 4337 int cpu; local 4935 ring_buffer_peek(struct trace_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events) argument 5013 ring_buffer_consume(struct trace_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events) argument 5069 ring_buffer_read_prepare(struct trace_buffer *buffer, int cpu, gfp_t flags) argument 5191 ring_buffer_size(struct trace_buffer *buffer, int cpu) argument 5315 ring_buffer_reset_cpu(struct trace_buffer *buffer, int cpu) argument 5350 int cpu; local 5391 int cpu; local 5429 int cpu; local 5453 ring_buffer_empty_cpu(struct trace_buffer *buffer, int cpu) argument 5486 ring_buffer_swap_cpu(struct trace_buffer *buffer_a, struct trace_buffer *buffer_b, int cpu) argument 5585 ring_buffer_alloc_read_page(struct trace_buffer *buffer, int cpu) argument 5640 ring_buffer_free_read_page(struct trace_buffer *buffer, int cpu, struct buffer_data_read_page *data_page) argument 5712 ring_buffer_read_page(struct trace_buffer *buffer, struct buffer_data_read_page *data_page, size_t len, int cpu, int full) argument 5957 int cpu; local 6159 rb_get_mapped_buffer(struct trace_buffer *buffer, int cpu) argument 6317 ring_buffer_map(struct trace_buffer *buffer, int cpu, struct vm_area_struct *vma) argument 6382 ring_buffer_unmap(struct trace_buffer *buffer, int cpu) argument 6423 ring_buffer_map_get_reader(struct trace_buffer *buffer, int cpu) argument 6513 trace_rb_cpu_prepare(unsigned int cpu, struct hlist_node *node) argument 6583 int cpu; member in struct:rb_test_data 6690 int cpu = smp_processor_id(); local 6713 int cpu; local [all...] |
/linux-master/arch/x86/xen/ |
H A D | time.c | 250 int cpu = smp_processor_id(); local 252 if (HYPERVISOR_vcpu_op(VCPUOP_stop_singleshot_timer, xen_vcpu_nr(cpu), 254 HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, xen_vcpu_nr(cpu), 263 int cpu = smp_processor_id(); local 265 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, xen_vcpu_nr(cpu), 275 int cpu = smp_processor_id(); local 285 ret = HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, xen_vcpu_nr(cpu), 333 void xen_teardown_timer(int cpu) argument 336 evt = &per_cpu(xen_clock_events, cpu).evt; 344 void xen_setup_timer(int cpu) argument 378 int cpu; local 512 int cpu = smp_processor_id(); local 589 int cpu = smp_processor_id(); local [all...] |