qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 08/10] ppc/xics: allow ICSState to have an offset


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 08/10] ppc/xics: allow ICSState to have an offset 0
Date: Thu, 3 Jan 2019 15:33:40 +1100
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Jan 02, 2019 at 06:57:41AM +0100, Cédric Le Goater wrote:
> commit 15ed653fa49a ("ppc/xics: An ICS with offset 0 is assumed to be
> uninitialized") introduced an extra check on the ICS offset which is
> not strictly necessary.

The commit message for that suggests it was added to make pnv easier.
I take it you no longer need this for the current or expected pnv
code?

> Revert the change to be able to map the XICS IRQ number space on the
> XIVE IRQ number space.



> 
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
>  include/hw/ppc/xics.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
> index 7668c381a887..07508cbd217e 100644
> --- a/include/hw/ppc/xics.h
> +++ b/include/hw/ppc/xics.h
> @@ -139,8 +139,7 @@ struct ICSState {
>  
>  static inline bool ics_valid_irq(ICSState *ics, uint32_t nr)
>  {
> -    return (ics->offset != 0) && (nr >= ics->offset)
> -        && (nr < (ics->offset + ics->nr_irqs));
> +    return (nr >= ics->offset) && (nr < (ics->offset + ics->nr_irqs));
>  }
>  
>  struct ICSIRQState {

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]