Skip to content

Commit b39a920

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 <[email protected]> Acked-by: Mukesh Ojha <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 5f7a15f commit b39a920

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/linux/kvm_host.h

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

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)