Skip to content

Commit b5ad0d2

Browse files
henryZepaulmckrcu
authored andcommitted
rcu: Remove unused 'cpu' in rcu_virt_note_context_switch()
This commit removes the unused function argument 'cpu'. This does not change functionality, but might save a cycle or two. Signed-off-by: Zeng Heng <zengheng4@huawei.com> Acked-by: Mukesh Ojha <quic_mojha@quicinc.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 6343402 commit b5ad0d2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static __always_inline void guest_context_enter_irqoff(void)
416416
*/
417417
if (!context_tracking_guest_enter()) {
418418
instrumentation_begin();
419-
rcu_virt_note_context_switch(smp_processor_id());
419+
rcu_virt_note_context_switch();
420420
instrumentation_end();
421421
}
422422
}

include/linux/rcutiny.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static inline int rcu_needs_cpu(void)
142142
* Take advantage of the fact that there is only one CPU, which
143143
* allows us to ignore virtualization-based context switches.
144144
*/
145-
static inline void rcu_virt_note_context_switch(int cpu) { }
145+
static inline void rcu_virt_note_context_switch(void) { }
146146
static inline void rcu_cpu_stall_reset(void) { }
147147
static inline int rcu_jiffies_till_stall_check(void) { return 21 * HZ; }
148148
static inline void rcu_irq_exit_check_preempt(void) { }

include/linux/rcutree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void rcu_cpu_stall_reset(void);
2727
* wrapper around rcu_note_context_switch(), which allows TINY_RCU
2828
* to save a few bytes. The caller must have disabled interrupts.
2929
*/
30-
static inline void rcu_virt_note_context_switch(int cpu)
30+
static inline void rcu_virt_note_context_switch(void)
3131
{
3232
rcu_note_context_switch(false);
3333
}

0 commit comments

Comments
 (0)