From: Nicholas Piggin <npiggin@gmail.com>
To: Haren Myneni <haren@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Subject: Re: [PATCH v3 01/10] powerpc/pseries/vas: Use common names in VAS capability structure
Date: Mon, 14 Feb 2022 12:14:28 +1000 [thread overview]
Message-ID: <1644804791.k88oankrue.astroid@bobo.none> (raw)
In-Reply-To: <1de60767b71bcc714cf613ff8f660afc430a0720.camel@linux.ibm.com>
Excerpts from Haren Myneni's message of January 22, 2022 5:54 am:
>
> target/used/avail_creds provides credits usage to user space via
> sysfs and the same interface can be used on PowerNV in future.
> Remove "lpar" from these names so that applicable on both PowerVM
> and PowerNV.
But not in this series? This is just to save you having to do more
renaming later?
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
>
> Signed-off-by: Haren Myneni <haren@linux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/vas.c | 10 +++++-----
> arch/powerpc/platforms/pseries/vas.h | 6 +++---
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c
> index d243ddc58827..c0737379cc7b 100644
> --- a/arch/powerpc/platforms/pseries/vas.c
> +++ b/arch/powerpc/platforms/pseries/vas.c
> @@ -310,8 +310,8 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
>
> cop_feat_caps = &caps->caps;
>
> - if (atomic_inc_return(&cop_feat_caps->used_lpar_creds) >
> - atomic_read(&cop_feat_caps->target_lpar_creds)) {
> + if (atomic_inc_return(&cop_feat_caps->used_creds) >
> + atomic_read(&cop_feat_caps->target_creds)) {
> pr_err("Credits are not available to allocate window\n");
> rc = -EINVAL;
> goto out;
> @@ -385,7 +385,7 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
> free_irq_setup(txwin);
> h_deallocate_vas_window(txwin->vas_win.winid);
> out:
> - atomic_dec(&cop_feat_caps->used_lpar_creds);
> + atomic_dec(&cop_feat_caps->used_creds);
> kfree(txwin);
> return ERR_PTR(rc);
> }
> @@ -445,7 +445,7 @@ static int vas_deallocate_window(struct vas_window *vwin)
> }
>
> list_del(&win->win_list);
> - atomic_dec(&caps->used_lpar_creds);
> + atomic_dec(&caps->used_creds);
> mutex_unlock(&vas_pseries_mutex);
>
> put_vas_user_win_ref(&vwin->task_ref);
> @@ -521,7 +521,7 @@ static int __init get_vas_capabilities(u8 feat, enum vas_cop_feat_type type,
> }
> caps->max_lpar_creds = be16_to_cpu(hv_caps->max_lpar_creds);
> caps->max_win_creds = be16_to_cpu(hv_caps->max_win_creds);
> - atomic_set(&caps->target_lpar_creds,
> + atomic_set(&caps->target_creds,
> be16_to_cpu(hv_caps->target_lpar_creds));
> if (feat == VAS_GZIP_DEF_FEAT) {
> caps->def_lpar_creds = be16_to_cpu(hv_caps->def_lpar_creds);
> diff --git a/arch/powerpc/platforms/pseries/vas.h b/arch/powerpc/platforms/pseries/vas.h
> index 4ecb3fcabd10..fa7ce74f1e49 100644
> --- a/arch/powerpc/platforms/pseries/vas.h
> +++ b/arch/powerpc/platforms/pseries/vas.h
> @@ -72,9 +72,9 @@ struct vas_cop_feat_caps {
> };
> /* Total LPAR available credits. Can be different from max LPAR */
> /* credits due to DLPAR operation */
> - atomic_t target_lpar_creds;
> - atomic_t used_lpar_creds; /* Used credits so far */
> - u16 avail_lpar_creds; /* Remaining available credits */
> + atomic_t target_creds;
> + atomic_t used_creds; /* Used credits so far */
> + u16 avail_creds; /* Remaining available credits */
> };
>
> /*
> --
> 2.27.0
>
>
>
next prev parent reply other threads:[~2022-02-14 2:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 19:52 [PATCH v3 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR Haren Myneni
2022-01-21 19:54 ` [PATCH v3 01/10] powerpc/pseries/vas: Use common names in VAS capability structure Haren Myneni
2022-02-14 2:14 ` Nicholas Piggin [this message]
2022-02-15 18:32 ` Haren Myneni
2022-01-21 19:54 ` [PATCH v3 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add Haren Myneni
2022-02-14 2:27 ` Nicholas Piggin
2022-02-16 1:07 ` Haren Myneni
2022-01-21 19:55 ` [PATCH v3 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct Haren Myneni
2022-02-14 2:41 ` Nicholas Piggin
2022-02-16 1:09 ` Haren Myneni
2022-01-21 19:56 ` [PATCH v3 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add Haren Myneni
2022-02-14 3:08 ` Nicholas Piggin
2022-02-16 1:38 ` Haren Myneni
2022-01-21 19:57 ` [PATCH v3 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal Haren Myneni
2022-02-14 3:17 ` Nicholas Piggin
2022-02-16 1:48 ` Haren Myneni
2022-01-21 19:58 ` [PATCH v3 06/10] powerpc/vas: Map paste address only if window is active Haren Myneni
2022-02-14 3:20 ` Nicholas Piggin
2022-02-16 1:58 ` Haren Myneni
2022-01-21 19:59 ` [PATCH v3 07/10] powerpc/vas: Add paste address mmap fault handler Haren Myneni
2022-02-14 3:37 ` Nicholas Piggin
2022-02-16 2:21 ` Haren Myneni
2022-01-21 19:59 ` [PATCH v3 08/10] powerpc/vas: Return paste instruction failure if no active window Haren Myneni
2022-02-14 3:41 ` Nicholas Piggin
2022-01-21 20:00 ` [PATCH v3 09/10] powerpc/pseries/vas: sysfs interface to export capabilities Haren Myneni
2022-02-14 3:49 ` Nicholas Piggin
2022-01-21 20:01 ` [PATCH v3 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change 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=1644804791.k88oankrue.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=haren@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).