diff options
author | Michael Kowal <kowal@linux.ibm.com> | 2025-03-11 11:51:21 +1000 |
---|---|---|
committer | Nicholas Piggin <npiggin@gmail.com> | 2025-03-11 22:43:31 +1000 |
commit | a45580ad03f034c84689c6bee5f875432dbd73ba (patch) | |
tree | d087902e129c6e9f33e9abfa509a14643f6660a4 /include/hw | |
parent | 19db3b5a247c57a40d7e8a545a8dee9faf4db150 (diff) | |
download | qemu-a45580ad03f034c84689c6bee5f875432dbd73ba.zip qemu-a45580ad03f034c84689c6bee5f875432dbd73ba.tar.gz qemu-a45580ad03f034c84689c6bee5f875432dbd73ba.tar.bz2 |
ppc/xive: Rename ipb_to_pipr() to xive_ipb_to_pipr()
Rename to follow the convention of the other function names.
Signed-off-by: Michael Kowal <kowal@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/ppc/xive.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index ea5d03a..75276b9 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -130,11 +130,9 @@ * TCTX Thread interrupt Context * * - * Copyright (c) 2017-2018, IBM Corporation. - * - * This code is licensed under the GPL version 2 or later. See the - * COPYING file in the top-level directory. + * Copyright (c) 2017-2024, IBM Corporation. * + * SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef PPC_XIVE_H @@ -511,6 +509,16 @@ static inline uint8_t xive_priority_to_ipb(uint8_t priority) } /* + * Convert an Interrupt Pending Buffer (IPB) register to a Pending + * Interrupt Priority Register (PIPR), which contains the priority of + * the most favored pending notification. + */ +static inline uint8_t xive_ipb_to_pipr(uint8_t ibp) +{ + return ibp ? clz32((uint32_t)ibp << 24) : 0xff; +} + +/* * XIVE Thread Interrupt Management Aera (TIMA) * * This region gives access to the registers of the thread interrupt |