• Home
  • Raw
  • Download

Lines Matching refs:cpu

39 static void tick_broadcast_clear_oneshot(int cpu);
42 static void tick_broadcast_oneshot_offline(unsigned int cpu);
47 static inline void tick_broadcast_clear_oneshot(int cpu) { } in tick_broadcast_clear_oneshot() argument
50 static inline void tick_broadcast_oneshot_offline(unsigned int cpu) { } in tick_broadcast_oneshot_offline() argument
67 static struct clock_event_device *tick_get_oneshot_wakeup_device(int cpu);
69 const struct clock_event_device *tick_get_wakeup_device(int cpu) in tick_get_wakeup_device() argument
71 return tick_get_oneshot_wakeup_device(cpu); in tick_get_wakeup_device()
102 static struct clock_event_device *tick_get_oneshot_wakeup_device(int cpu) in tick_get_oneshot_wakeup_device() argument
104 return per_cpu(tick_oneshot_wakeup_device, cpu); in tick_get_oneshot_wakeup_device()
117 int cpu) in tick_set_oneshot_wakeup_device() argument
119 struct clock_event_device *curdev = tick_get_oneshot_wakeup_device(cpu); in tick_set_oneshot_wakeup_device()
132 if (!cpumask_equal(newdev->cpumask, cpumask_of(cpu))) in tick_set_oneshot_wakeup_device()
144 per_cpu(tick_oneshot_wakeup_device, cpu) = newdev; in tick_set_oneshot_wakeup_device()
148 static struct clock_event_device *tick_get_oneshot_wakeup_device(int cpu) in tick_get_oneshot_wakeup_device() argument
154 int cpu) in tick_set_oneshot_wakeup_device() argument
163 void tick_install_broadcast_device(struct clock_event_device *dev, int cpu) in tick_install_broadcast_device() argument
167 if (tick_set_oneshot_wakeup_device(dev, cpu)) in tick_install_broadcast_device()
247 int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) in tick_device_uses_broadcast() argument
264 cpumask_set_cpu(cpu, tick_broadcast_mask); in tick_device_uses_broadcast()
276 cpumask_clear_cpu(cpu, tick_broadcast_mask); in tick_device_uses_broadcast()
284 if (!cpumask_test_cpu(cpu, tick_broadcast_on)) in tick_device_uses_broadcast()
285 cpumask_clear_cpu(cpu, tick_broadcast_mask); in tick_device_uses_broadcast()
297 tick_broadcast_clear_oneshot(cpu); in tick_device_uses_broadcast()
318 ret = cpumask_test_cpu(cpu, tick_broadcast_mask); in tick_device_uses_broadcast()
348 int cpu = smp_processor_id(); in tick_do_broadcast() local
355 if (cpumask_test_cpu(cpu, mask)) { in tick_do_broadcast()
358 cpumask_clear_cpu(cpu, mask); in tick_do_broadcast()
442 int cpu, bc_stopped; in tick_broadcast_control() local
459 cpu = smp_processor_id(); in tick_broadcast_control()
468 cpumask_set_cpu(cpu, tick_broadcast_on); in tick_broadcast_control()
469 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) { in tick_broadcast_control()
487 cpumask_clear_cpu(cpu, tick_broadcast_on); in tick_broadcast_control()
488 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_mask)) { in tick_broadcast_control()
537 void tick_broadcast_offline(unsigned int cpu) in tick_broadcast_offline() argument
540 cpumask_clear_cpu(cpu, tick_broadcast_mask); in tick_broadcast_offline()
541 cpumask_clear_cpu(cpu, tick_broadcast_on); in tick_broadcast_offline()
542 tick_broadcast_oneshot_offline(cpu); in tick_broadcast_offline()
647 static void tick_broadcast_set_event(struct clock_event_device *bc, int cpu, in tick_broadcast_set_event() argument
654 tick_broadcast_set_affinity(bc, cpumask_of(cpu)); in tick_broadcast_set_event()
690 int cpu, next_cpu = 0; in tick_handle_oneshot_broadcast() local
699 for_each_cpu(cpu, tick_broadcast_oneshot_mask) { in tick_handle_oneshot_broadcast()
708 td = &per_cpu(tick_cpu_device, cpu); in tick_handle_oneshot_broadcast()
710 cpumask_set_cpu(cpu, tmpmask); in tick_handle_oneshot_broadcast()
716 cpumask_set_cpu(cpu, tick_broadcast_pending_mask); in tick_handle_oneshot_broadcast()
719 next_cpu = cpu; in tick_handle_oneshot_broadcast()
766 static int broadcast_needs_cpu(struct clock_event_device *bc, int cpu) in broadcast_needs_cpu() argument
772 return bc->bound_on == cpu ? -EBUSY : 0; in broadcast_needs_cpu()
794 int cpu) in ___tick_broadcast_oneshot_control() argument
811 ret = broadcast_needs_cpu(bc, cpu); in ___tick_broadcast_oneshot_control()
826 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) { in ___tick_broadcast_oneshot_control()
827 WARN_ON_ONCE(cpumask_test_cpu(cpu, tick_broadcast_pending_mask)); in ___tick_broadcast_oneshot_control()
842 if (cpumask_test_cpu(cpu, tick_broadcast_force_mask)) { in ___tick_broadcast_oneshot_control()
845 tick_broadcast_set_event(bc, cpu, dev->next_event); in ___tick_broadcast_oneshot_control()
853 ret = broadcast_needs_cpu(bc, cpu); in ___tick_broadcast_oneshot_control()
855 cpumask_clear_cpu(cpu, in ___tick_broadcast_oneshot_control()
861 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) { in ___tick_broadcast_oneshot_control()
872 if (cpumask_test_and_clear_cpu(cpu, in ___tick_broadcast_oneshot_control()
915 cpumask_set_cpu(cpu, tick_broadcast_force_mask); in ___tick_broadcast_oneshot_control()
932 int cpu) in tick_oneshot_wakeup_control() argument
940 wd = tick_get_oneshot_wakeup_device(cpu); in tick_oneshot_wakeup_control()
962 int cpu = smp_processor_id(); in __tick_broadcast_oneshot_control() local
964 if (!tick_oneshot_wakeup_control(state, td, cpu)) in __tick_broadcast_oneshot_control()
968 return ___tick_broadcast_oneshot_control(state, td, cpu); in __tick_broadcast_oneshot_control()
982 static void tick_broadcast_clear_oneshot(int cpu) in tick_broadcast_clear_oneshot() argument
984 cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask); in tick_broadcast_clear_oneshot()
985 cpumask_clear_cpu(cpu, tick_broadcast_pending_mask); in tick_broadcast_clear_oneshot()
992 int cpu; in tick_broadcast_init_next_event() local
994 for_each_cpu(cpu, mask) { in tick_broadcast_init_next_event()
995 td = &per_cpu(tick_cpu_device, cpu); in tick_broadcast_init_next_event()
1023 int cpu = smp_processor_id(); in tick_broadcast_setup_oneshot() local
1054 tick_broadcast_clear_oneshot(cpu); in tick_broadcast_setup_oneshot()
1077 cpumask_clear_cpu(cpu, tmpmask); in tick_broadcast_setup_oneshot()
1114 tick_broadcast_set_event(bc, cpu, nexttick); in tick_broadcast_setup_oneshot()
1156 static void tick_broadcast_oneshot_offline(unsigned int cpu) in tick_broadcast_oneshot_offline() argument
1158 if (tick_get_oneshot_wakeup_device(cpu)) in tick_broadcast_oneshot_offline()
1159 tick_set_oneshot_wakeup_device(NULL, cpu); in tick_broadcast_oneshot_offline()
1165 cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask); in tick_broadcast_oneshot_offline()
1166 cpumask_clear_cpu(cpu, tick_broadcast_pending_mask); in tick_broadcast_oneshot_offline()
1167 cpumask_clear_cpu(cpu, tick_broadcast_force_mask); in tick_broadcast_oneshot_offline()