mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
ppc/xive: Export priority_to_ipb() helper
Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20210901094153.227671-7-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
0e5e9ff455
commit
89d2468d96
2 changed files with 17 additions and 15 deletions
|
@ -458,6 +458,17 @@ struct XiveENDSource {
|
|||
*/
|
||||
#define XIVE_PRIORITY_MAX 7
|
||||
|
||||
/*
|
||||
* Convert a priority number to an Interrupt Pending Buffer (IPB)
|
||||
* register, which indicates a pending interrupt at the priority
|
||||
* corresponding to the bit number
|
||||
*/
|
||||
static inline uint8_t xive_priority_to_ipb(uint8_t priority)
|
||||
{
|
||||
return priority > XIVE_PRIORITY_MAX ?
|
||||
0 : 1 << (XIVE_PRIORITY_MAX - priority);
|
||||
}
|
||||
|
||||
/*
|
||||
* XIVE Thread Interrupt Management Aera (TIMA)
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue