| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * coupled.c - helper functions to enter the same idle state on multiple cpus |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2011 Google, Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Colin Cross <ccross@android.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 14 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 15 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 16 | | - * more details. |
|---|
| 17 | 8 | */ |
|---|
| 18 | 9 | |
|---|
| 19 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 98 | 89 | * @coupled_cpus: mask of cpus that are part of the coupled set |
|---|
| 99 | 90 | * @requested_state: array of requested states for cpus in the coupled set |
|---|
| 100 | 91 | * @ready_waiting_counts: combined count of cpus in ready or waiting loops |
|---|
| 92 | + * @abort_barrier: synchronisation point for abort cases |
|---|
| 101 | 93 | * @online_count: count of cpus that are online |
|---|
| 102 | 94 | * @refcnt: reference count of cpuidle devices that are using this struct |
|---|
| 103 | 95 | * @prevent: flag to prevent coupled idle while a cpu is hotplugging |
|---|
| .. | .. |
|---|
| 347 | 339 | |
|---|
| 348 | 340 | /** |
|---|
| 349 | 341 | * cpuidle_coupled_poke_others - wake up all other cpus that may be waiting |
|---|
| 350 | | - * @dev: struct cpuidle_device for this cpu |
|---|
| 342 | + * @this_cpu: target cpu |
|---|
| 351 | 343 | * @coupled: the struct coupled that contains the current cpu |
|---|
| 352 | 344 | * |
|---|
| 353 | 345 | * Calls cpuidle_coupled_poke on all other online cpus. |
|---|
| .. | .. |
|---|
| 364 | 356 | |
|---|
| 365 | 357 | /** |
|---|
| 366 | 358 | * cpuidle_coupled_set_waiting - mark this cpu as in the wait loop |
|---|
| 367 | | - * @dev: struct cpuidle_device for this cpu |
|---|
| 359 | + * @cpu: target cpu |
|---|
| 368 | 360 | * @coupled: the struct coupled that contains the current cpu |
|---|
| 369 | 361 | * @next_state: the index in drv->states of the requested state for this cpu |
|---|
| 370 | 362 | * |
|---|
| .. | .. |
|---|
| 385 | 377 | |
|---|
| 386 | 378 | /** |
|---|
| 387 | 379 | * cpuidle_coupled_set_not_waiting - mark this cpu as leaving the wait loop |
|---|
| 388 | | - * @dev: struct cpuidle_device for this cpu |
|---|
| 380 | + * @cpu: target cpu |
|---|
| 389 | 381 | * @coupled: the struct coupled that contains the current cpu |
|---|
| 390 | 382 | * |
|---|
| 391 | 383 | * Removes the requested idle state for the specified cpuidle device. |
|---|
| .. | .. |
|---|
| 421 | 413 | |
|---|
| 422 | 414 | /** |
|---|
| 423 | 415 | * cpuidle_coupled_clear_pokes - spin until the poke interrupt is processed |
|---|
| 424 | | - * @cpu - this cpu |
|---|
| 416 | + * @cpu: this cpu |
|---|
| 425 | 417 | * |
|---|
| 426 | 418 | * Turns on interrupts and spins until any outstanding poke interrupts have |
|---|
| 427 | 419 | * been processed and the poke bit has been cleared. |
|---|