linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Haren Myneni <haren@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	nathanl@linux.ibm.com
Subject: Re: [PATCH v4 2/9] powerpc/pseries/vas: Save PID in pseries_vas_window struct
Date: Wed, 23 Feb 2022 17:00:07 +1000	[thread overview]
Message-ID: <1645599574.ncjieunpqo.astroid@bobo.none> (raw)
In-Reply-To: <5f709998f609b477d9f975c32bef775f45e61185.camel@linux.ibm.com>

Excerpts from Haren Myneni's message of February 20, 2022 5:55 am:
> 
> The kernel sets the VAS window with PID when it is opened in
> the hypervisor. During DLPAR operation, windows can be closed and
> reopened in the hypervisor when the credit is available. So saves
> this PID in pseries_vas_window struct when the window is opened
> initially and reuse it later during DLPAR operation.

Thanks for renaming it lpid->pid and adding the comment.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> 
> Signed-off-by: Haren Myneni <haren@linux.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/vas.c | 9 +++++----
>  arch/powerpc/platforms/pseries/vas.h | 1 +
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c
> index 18aae037ffe9..1035446f985b 100644
> --- a/arch/powerpc/platforms/pseries/vas.c
> +++ b/arch/powerpc/platforms/pseries/vas.c
> @@ -107,7 +107,6 @@ static int h_deallocate_vas_window(u64 winid)
>  static int h_modify_vas_window(struct pseries_vas_window *win)
>  {
>  	long rc;
> -	u32 lpid = mfspr(SPRN_PID);
>  
>  	/*
>  	 * AMR value is not supported in Linux VAS implementation.
> @@ -115,7 +114,7 @@ static int h_modify_vas_window(struct pseries_vas_window *win)
>  	 */
>  	do {
>  		rc = plpar_hcall_norets(H_MODIFY_VAS_WINDOW,
> -					win->vas_win.winid, lpid, 0,
> +					win->vas_win.winid, win->pid, 0,
>  					VAS_MOD_WIN_FLAGS, 0);
>  
>  		rc = hcall_return_busy_check(rc);
> @@ -124,8 +123,8 @@ static int h_modify_vas_window(struct pseries_vas_window *win)
>  	if (rc == H_SUCCESS)
>  		return 0;
>  
> -	pr_err("H_MODIFY_VAS_WINDOW error: %ld, winid %u lpid %u\n",
> -			rc, win->vas_win.winid, lpid);
> +	pr_err("H_MODIFY_VAS_WINDOW error: %ld, winid %u pid %u\n",
> +			rc, win->vas_win.winid, win->pid);
>  	return -EIO;
>  }
>  
> @@ -338,6 +337,8 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
>  		}
>  	}
>  
> +	txwin->pid = mfspr(SPRN_PID);
> +
>  	/*
>  	 * Allocate / Deallocate window hcalls and setup / free IRQs
>  	 * have to be protected with mutex.
> diff --git a/arch/powerpc/platforms/pseries/vas.h b/arch/powerpc/platforms/pseries/vas.h
> index d6ea8ab8b07a..2872532ed72a 100644
> --- a/arch/powerpc/platforms/pseries/vas.h
> +++ b/arch/powerpc/platforms/pseries/vas.h
> @@ -114,6 +114,7 @@ struct pseries_vas_window {
>  	u64 domain[6];		/* Associativity domain Ids */
>  				/* this window is allocated */
>  	u64 util;
> +	u32 pid;		/* PID associated with this window */
>  
>  	/* List of windows opened which is used for LPM */
>  	struct list_head win_list;
> -- 
> 2.27.0
> 
> 
> 

  reply	other threads:[~2022-02-23  7:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 19:49 [PATCH v4 0/9] powerpc/pseries/vas: NXGZIP support with DLPAR Haren Myneni
2022-02-19 19:54 ` [PATCH v4 1/9] powerpc/pseries/vas: Use common names in VAS capability structure Haren Myneni
2022-02-19 19:55 ` [PATCH v4 2/9] powerpc/pseries/vas: Save PID in pseries_vas_window struct Haren Myneni
2022-02-23  7:00   ` Nicholas Piggin [this message]
2022-02-19 19:55 ` [PATCH v4 3/9] powerpc/vas: Add paste address mmap fault handler Haren Myneni
2022-02-23  7:03   ` Nicholas Piggin
2022-02-19 19:58 ` [PATCH v4 4/9] powerpc/vas: Return paste instruction failure if no active window Haren Myneni
2022-02-23  7:05   ` Nicholas Piggin
2022-02-23  7:56     ` Haren Myneni
2022-02-19 19:59 ` [PATCH v4 5/9] powerpc/vas: Map paste address only if window is active Haren Myneni
2022-02-23  7:11   ` Nicholas Piggin
2022-02-23  8:02     ` Haren Myneni
2022-02-19 20:00 ` [PATCH v4 6/9] powerpc/pseries/vas: Close windows with DLPAR core removal Haren Myneni
2022-02-23  7:23   ` Nicholas Piggin
2022-02-23  8:21     ` Haren Myneni
2022-02-19 20:01 ` [PATCH v4 7/9] powerpc/pseries/vas: Reopen windows with DLPAR core add Haren Myneni
2022-02-23  7:28   ` Nicholas Piggin
2022-02-23  8:32     ` Haren Myneni
2022-02-19 20:01 ` [PATCH v4 8/9] powerpc/pseries/vas: sysfs interface to export capabilities Haren Myneni
2022-02-23  7:29   ` Nicholas Piggin
2022-02-19 20:03 ` [PATCH v4 9/9] powerpc/pseries/vas: Write 'nr_total_credits' for QoS credits change Haren Myneni
2022-02-23  7:33   ` Nicholas Piggin
2022-02-23  8:39     ` Haren Myneni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1645599574.ncjieunpqo.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=haren@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nathanl@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).