/linux/include/linux/ |
H A D | local_lock_internal.h | 79 local_lock_acquire(this_cpu_ptr(lock)); \ 85 local_lock_acquire(this_cpu_ptr(lock)); \ 91 local_lock_acquire(this_cpu_ptr(lock)); \ 96 local_lock_release(this_cpu_ptr(lock)); \ 102 local_lock_release(this_cpu_ptr(lock)); \ 108 local_lock_release(this_cpu_ptr(lock)); \ 115 local_lock_acquire(this_cpu_ptr(lock)); \ 119 local_lock_release(this_cpu_ptr(lock)) 139 spin_lock(this_cpu_ptr((__lock))); \ 153 spin_unlock(this_cpu_ptr((__lock))); \ [all …]
|
/linux/kernel/ |
H A D | irq_work.c | 35 if (!llist_empty(this_cpu_ptr(&lazy_list)) && tsk) in wake_irq_workd() 51 return !llist_empty(this_cpu_ptr(&lazy_list)); in irq_workd_should_run() 103 list = this_cpu_ptr(&lazy_list); in __irq_work_queue_local() 105 list = this_cpu_ptr(&raised_list); in __irq_work_queue_local() 188 raised = this_cpu_ptr(&raised_list); in irq_work_needs_cpu() 189 lazy = this_cpu_ptr(&lazy_list); in irq_work_needs_cpu() 261 irq_work_run_list(this_cpu_ptr(&raised_list)); in irq_work_run() 263 irq_work_run_list(this_cpu_ptr(&lazy_list)); in irq_work_run() 271 struct llist_head *raised = this_cpu_ptr(&raised_list); in irq_work_tick() 277 irq_work_run_list(this_cpu_ptr(&lazy_list)); in irq_work_tick() [all …]
|
H A D | context_tracking.c | 126 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in ct_kernel_exit() 165 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in ct_kernel_enter() 206 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in ct_nmi_exit() 261 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in ct_nmi_enter() 470 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in __ct_user_enter() 612 struct context_tracking *ct = this_cpu_ptr(&context_tracking); in __ct_user_exit()
|
H A D | watchdog.c | 151 new_interrupts = atomic_inc_return(this_cpu_ptr(&hrtimer_interrupts)); in watchdog_hardlockup_kick() 670 complete(this_cpu_ptr(&softlockup_completion)); in softlockup_fn() 690 if (completion_done(this_cpu_ptr(&softlockup_completion))) { in watchdog_timer_fn() 691 reinit_completion(this_cpu_ptr(&softlockup_completion)); in watchdog_timer_fn() 694 this_cpu_ptr(&softlockup_stop_work)); in watchdog_timer_fn() 716 period_ts = READ_ONCE(*this_cpu_ptr(&watchdog_report_ts)); in watchdog_timer_fn() 780 struct hrtimer *hrtimer = this_cpu_ptr(&watchdog_hrtimer); in watchdog_enable() 781 struct completion *done = this_cpu_ptr(&softlockup_completion); in watchdog_enable() 806 struct hrtimer *hrtimer = this_cpu_ptr(&watchdog_hrtimer); in watchdog_disable() 817 wait_for_completion(this_cpu_ptr( in watchdog_disable() [all...] |
/linux/arch/powerpc/include/asm/ |
H A D | idle.h | 14 *this_cpu_ptr(&idle_entry_purr_snap) = mfspr(SPRN_PURR); in snapshot_purr_idle_entry() 19 *this_cpu_ptr(&idle_entry_spurr_snap) = mfspr(SPRN_SPURR); in snapshot_spurr_idle_entry() 25 u64 in_purr = *this_cpu_ptr(&idle_entry_purr_snap); in update_idle_purr_accounting() 34 u64 *idle_spurr_cycles_ptr = this_cpu_ptr(&idle_spurr_cycles); in update_idle_spurr_accounting() 35 u64 in_spurr = *this_cpu_ptr(&idle_entry_spurr_snap); in update_idle_spurr_accounting() 89 return *this_cpu_ptr(&idle_spurr_cycles); in read_this_idle_spurr()
|
H A D | xics.h | 115 struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); in xics_push_cppr() 128 struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); in xics_pop_cppr() 138 struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); in xics_set_base_cppr() 150 struct xics_cppr *os_cppr = this_cpu_ptr(&xics_cppr); in xics_cppr_top()
|
/linux/Documentation/translations/zh_CN/core-api/ |
H A D | this_cpu_ops.rst | 118 y = this_cpu_ptr(&x) 121 ``this_cpu_ptr`` 避免了通用 ``get_cpu``/``put_cpu`` 序列所需的多个步骤。没有可用 148 &x和p是每CPU变量的偏移量。 ``this_cpu_ptr()`` 使用每CPU变量的偏移量,这让它看起来 181 ``this_cpu_ptr()``:: 185 pp = this_cpu_ptr(&p); 225 &this_cpu_ptr(pp)->n 对比 this_cpu_ptr(&pp->n) 259 struct data *p = this_cpu_ptr(&datap); 261 但是,将通过this_cpu_ptr计算的指针传递给其他cpu是不寻常的,应该避免。
|
/linux/arch/x86/kernel/cpu/mce/ |
H A D | intel.c | 165 machine_check_poll(MCP_TIMESTAMP, this_cpu_ptr(&mce_banks_owned)); in intel_threshold_interrupt() 177 unsigned long *owned = (void *)this_cpu_ptr(&mce_banks_owned); in cmci_skip_bank() 191 __clear_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_skip_bank() 231 struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc); in cmci_claim_bank() 239 WARN_ON(!test_bit(bank, this_cpu_ptr(mce_poll_banks))); in cmci_claim_bank() 245 set_bit(bank, (void *)this_cpu_ptr(&mce_banks_owned)); in cmci_claim_bank() 252 __clear_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_claim_bank() 315 machine_check_poll(0, this_cpu_ptr(&mce_banks_owned)); in cmci_recheck() 324 if (!test_bit(bank, this_cpu_ptr(mce_banks_owned))) in __cmci_disable_bank() 329 __clear_bit(bank, this_cpu_ptr(mce_banks_owned)); in __cmci_disable_bank() [all …]
|
H A D | threshold.c | 37 struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc); in mce_inherit_storm() 71 struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc); in cmci_storm_begin() 73 __set_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_storm_begin() 86 struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc); in cmci_storm_end() 88 __clear_bit(bank, this_cpu_ptr(mce_poll_banks)); in cmci_storm_end() 99 struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc); in mce_track_storm()
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
H A D | stacktrace.c | 28 struct kvm_nvhe_stacktrace_info *stacktrace_info = this_cpu_ptr(&kvm_stacktrace_info); in hyp_prepare_backtrace() 29 struct kvm_nvhe_init_params *params = this_cpu_ptr(&kvm_init_params); in hyp_prepare_backtrace() 32 stacktrace_info->overflow_stack_base = (unsigned long)this_cpu_ptr(overflow_stack); in hyp_prepare_backtrace() 44 unsigned long low = (unsigned long)this_cpu_ptr(overflow_stack); in stackinfo_get_overflow() 55 struct kvm_nvhe_init_params *params = this_cpu_ptr(&kvm_init_params); in stackinfo_get_hyp() 96 unsigned long *stacktrace = this_cpu_ptr(pkvm_stacktrace); in pkvm_save_backtrace_entry()
|
H A D | psci-relay.c | 160 boot_args = this_cpu_ptr(&suspend_args); in psci_cpu_suspend() 161 init_params = this_cpu_ptr(&kvm_init_params); in psci_cpu_suspend() 187 boot_args = this_cpu_ptr(&suspend_args); in psci_system_suspend() 188 init_params = this_cpu_ptr(&kvm_init_params); in psci_system_suspend() 211 boot_args = this_cpu_ptr(&cpu_on_args); in __kvm_host_psci_cpu_entry() 213 boot_args = this_cpu_ptr(&suspend_args); in __kvm_host_psci_cpu_entry()
|
/linux/arch/x86/events/amd/ |
H A D | brs.c | 205 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_enable() 221 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_enable_all() 228 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_disable() 257 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_disable_all() 283 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_drain() 386 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_brs_sched_task() 407 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in perf_amd_brs_lopwr_cb()
|
H A D | lbr.c | 99 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_filter() 162 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_read() 322 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_reset() 341 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_add() 361 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_del() 376 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_sched_task() 389 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_enable_all() 412 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_disable_all()
|
/linux/arch/xtensa/kernel/ |
H A D | hw_breakpoint.c | 178 i = alloc_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_install_hw_breakpoint() 185 i = alloc_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_install_hw_breakpoint() 216 i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_uninstall_hw_breakpoint() 224 i = free_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_uninstall_hw_breakpoint() 269 struct perf_event *bp = this_cpu_ptr(wp_on_reg)[i]; in restore_dbreak() 281 struct perf_event **bp = this_cpu_ptr(bp_on_reg); in check_hw_breakpoint() 290 struct perf_event **bp = this_cpu_ptr(wp_on_reg); in check_hw_breakpoint()
|
/linux/net/core/ |
H A D | dst_cache.c | 71 return dst_cache_per_cpu_get(dst_cache, this_cpu_ptr(dst_cache->cache)); 83 idst = this_cpu_ptr(dst_cache->cache); in dst_cache_get_ip4() 101 idst = this_cpu_ptr(dst_cache->cache); in dst_cache_set_ip4() 116 idst = this_cpu_ptr(dst_cache->cache); in dst_cache_set_ip6() 132 idst = this_cpu_ptr(dst_cache->cache); in dst_cache_get_ip6()
|
/linux/kernel/time/ |
H A D | tick-sched.c | 407 irq_work_queue(this_cpu_ptr(&nohz_full_kick_work)); in tick_nohz_full_kick() 592 ts = this_cpu_ptr(&tick_cpu_sched); in __tick_nohz_task_switch() 689 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_tick_stopped() 1206 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_idle_stop_tick() 1242 tick_nohz_retain_tick(this_cpu_ptr(&tick_cpu_sched)); in tick_nohz_idle_retain_tick() 1258 ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_idle_enter() 1289 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_irq_exit() 1304 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_idle_got_tick() 1342 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_get_sleep_length() 1412 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in tick_nohz_idle_restart_tick() [all …]
|
/linux/kernel/irq/ |
H A D | ipi-mux.c | 31 struct ipi_mux_cpu *icpu = this_cpu_ptr(ipi_mux_pcpu); in ipi_mux_mask() 38 struct ipi_mux_cpu *icpu = this_cpu_ptr(ipi_mux_pcpu); in ipi_mux_unmask() 56 struct ipi_mux_cpu *icpu = this_cpu_ptr(ipi_mux_pcpu); in ipi_mux_send_mask() 122 struct ipi_mux_cpu *icpu = this_cpu_ptr(ipi_mux_pcpu); in ipi_mux_process()
|
H A D | matrix.c | 86 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_online() 107 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_offline() 190 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_assign_system() 330 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_assign() 458 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_available() 482 struct cpumap *cm = this_cpu_ptr(m->maps); in irq_matrix_allocated()
|
/linux/arch/arm64/kvm/ |
H A D | vmid.c | 135 atomic64_set(this_cpu_ptr(&active_vmids), VMID_ACTIVE_INVALID); in kvm_arm_vmid_clear_active() 156 old_active_vmid = atomic64_read(this_cpu_ptr(&active_vmids)); in kvm_arm_vmid_update() 158 0 != atomic64_cmpxchg_relaxed(this_cpu_ptr(&active_vmids), in kvm_arm_vmid_update() 171 atomic64_set(this_cpu_ptr(&active_vmids), vmid); in kvm_arm_vmid_update()
|
/linux/net/netfilter/ |
H A D | nft_counter.c | 43 this_cpu = this_cpu_ptr(priv->counter); in nft_counter_do_eval() 44 nft_sync = this_cpu_ptr(&nft_counter_sync); in nft_counter_do_eval() 116 this_cpu = this_cpu_ptr(priv->counter); in nft_counter_reset() 117 nft_sync = this_cpu_ptr(&nft_counter_sync); in nft_counter_reset() 276 this_cpu = this_cpu_ptr(priv->counter); in nft_counter_offload_stats() 277 nft_sync = this_cpu_ptr(&nft_counter_sync); in nft_counter_offload_stats()
|
/linux/arch/arm64/kernel/ |
H A D | hw_breakpoint.c | 237 slots = this_cpu_ptr(bp_on_reg); in hw_breakpoint_control() 244 slots = this_cpu_ptr(wp_on_reg); in hw_breakpoint_control() 589 slots = this_cpu_ptr(bp_on_reg); in toggle_bp_registers() 593 slots = this_cpu_ptr(wp_on_reg); in toggle_bp_registers() 631 slots = this_cpu_ptr(bp_on_reg); in breakpoint_handler() 681 kernel_step = this_cpu_ptr(&stepping_kernel_bp); in breakpoint_handler() 766 slots = this_cpu_ptr(wp_on_reg); in watchpoint_handler() 832 kernel_step = this_cpu_ptr(&stepping_kernel_bp); in watchpoint_handler() 857 kernel_step = this_cpu_ptr(&stepping_kernel_bp); in reinstall_suspended_bps() 956 for (slots = this_cpu_ptr(bp_on_reg), i = 0; i < core_num_brps; ++i) { in hw_breakpoint_reset() [all …]
|
/linux/arch/x86/hyperv/ |
H A D | hv_proc.c | 81 input_page = *this_cpu_ptr(hyperv_pcpu_input_arg); in hv_call_deposit_pages() 132 input = *this_cpu_ptr(hyperv_pcpu_input_arg); in hv_call_add_logical_proc() 134 output = *this_cpu_ptr(hyperv_pcpu_output_arg); in hv_call_add_logical_proc() 175 input = *this_cpu_ptr(hyperv_pcpu_input_arg); in hv_call_create_vp()
|
/linux/arch/sh/kernel/ |
H A D | kprobes.c | 97 struct kprobe *saved = this_cpu_ptr(&saved_next_opcode); in arch_remove_kprobe() 106 saved = this_cpu_ptr(&saved_next_opcode2); in arch_remove_kprobe() 148 op1 = this_cpu_ptr(&saved_next_opcode); in prepare_singlestep() 149 op2 = this_cpu_ptr(&saved_next_opcode2); in prepare_singlestep() 321 p = this_cpu_ptr(&saved_next_opcode); in post_kprobe_handler() 333 p = this_cpu_ptr(&saved_next_opcode2); in post_kprobe_handler()
|
/linux/mm/kasan/ |
H A D | quarantine.c | 209 q = this_cpu_ptr(&cpu_quarantine); in kasan_quarantine_put() 320 sq = this_cpu_ptr(&shrink_qlist); in __per_cpu_remove_cache() 330 q = this_cpu_ptr(&cpu_quarantine); in per_cpu_remove_cache() 385 this_cpu_ptr(&cpu_quarantine)->offline = false; in kasan_cpu_online() 393 q = this_cpu_ptr(&cpu_quarantine); in kasan_cpu_offline()
|
/linux/lib/ |
H A D | irq_poll.c | 37 list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll)); in irq_poll_sched() 80 struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll); in irq_poll_softirq() 199 this_cpu_ptr(&blk_cpu_iopoll)); in irq_poll_cpu_dead()
|