[PATCH 2/9] ppc/xive: Export xive_presenter_notify()

Cédric Le Goater posted 9 patches 5 years, 9 months ago
[PATCH 2/9] ppc/xive: Export xive_presenter_notify()
Posted by Cédric Le Goater 5 years, 9 months ago
It's generic enough to be used from the XIVE2 router and avoid more
duplication.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 include/hw/ppc/xive.h | 4 ++++
 hw/intc/xive.c        | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 112fb6fb6dbe..88b0a2a3811f 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -406,6 +406,10 @@ int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx,
                               uint8_t format,
                               uint8_t nvt_blk, uint32_t nvt_idx,
                               bool cam_ignore, uint32_t logic_serv);
+bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
+                           uint8_t nvt_blk, uint32_t nvt_idx,
+                           bool cam_ignore, uint8_t priority,
+                           uint32_t logic_serv);
 
 /*
  * XIVE Fabric (Interface between Interrupt Controller and Machine)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index b8825577f719..f08fcec1c039 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -1481,10 +1481,10 @@ int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx,
  *
  * The parameters represent what is sent on the PowerBus
  */
-static bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
-                                  uint8_t nvt_blk, uint32_t nvt_idx,
-                                  bool cam_ignore, uint8_t priority,
-                                  uint32_t logic_serv)
+bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
+                           uint8_t nvt_blk, uint32_t nvt_idx,
+                           bool cam_ignore, uint8_t priority,
+                           uint32_t logic_serv)
 {
     XiveFabricClass *xfc = XIVE_FABRIC_GET_CLASS(xfb);
     XiveTCTXMatch match = { .tctx = NULL, .ring = 0 };
-- 
2.25.4


Re: [PATCH 2/9] ppc/xive: Export xive_presenter_notify()
Posted by Greg Kurz 5 years, 8 months ago
On Wed, 13 May 2020 17:11:02 +0200
Cédric Le Goater <clg@kaod.org> wrote:

> It's generic enough to be used from the XIVE2 router and avoid more
> duplication.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---

Reviewed-by: Greg Kurz <groug@kaod.org>

>  include/hw/ppc/xive.h | 4 ++++
>  hw/intc/xive.c        | 8 ++++----
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
> index 112fb6fb6dbe..88b0a2a3811f 100644
> --- a/include/hw/ppc/xive.h
> +++ b/include/hw/ppc/xive.h
> @@ -406,6 +406,10 @@ int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx,
>                                uint8_t format,
>                                uint8_t nvt_blk, uint32_t nvt_idx,
>                                bool cam_ignore, uint32_t logic_serv);
> +bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
> +                           uint8_t nvt_blk, uint32_t nvt_idx,
> +                           bool cam_ignore, uint8_t priority,
> +                           uint32_t logic_serv);
>  
>  /*
>   * XIVE Fabric (Interface between Interrupt Controller and Machine)
> diff --git a/hw/intc/xive.c b/hw/intc/xive.c
> index b8825577f719..f08fcec1c039 100644
> --- a/hw/intc/xive.c
> +++ b/hw/intc/xive.c
> @@ -1481,10 +1481,10 @@ int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx,
>   *
>   * The parameters represent what is sent on the PowerBus
>   */
> -static bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
> -                                  uint8_t nvt_blk, uint32_t nvt_idx,
> -                                  bool cam_ignore, uint8_t priority,
> -                                  uint32_t logic_serv)
> +bool xive_presenter_notify(XiveFabric *xfb, uint8_t format,
> +                           uint8_t nvt_blk, uint32_t nvt_idx,
> +                           bool cam_ignore, uint8_t priority,
> +                           uint32_t logic_serv)
>  {
>      XiveFabricClass *xfc = XIVE_FABRIC_GET_CLASS(xfb);
>      XiveTCTXMatch match = { .tctx = NULL, .ring = 0 };