Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	kvm@vger.kernel.org
Cc: frankja@linux.ibm.com, thuth@redhat.com, nrb@linux.ibm.com,
	scgl@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v1 1/5] lib: s390x: smp: add functions to work with CPU indexes
Date: Wed, 2 Feb 2022 17:55:49 +0100	[thread overview]
Message-ID: <a9a4f77b-1c70-478c-1389-f243fa485159@linux.ibm.com> (raw)
In-Reply-To: <defe074e-0215-cb9a-39e7-cc4dcbf75785@redhat.com>



On 1/31/22 14:50, David Hildenbrand wrote:
> On 28.01.22 19:54, Claudio Imbrenda wrote:
>> Knowing the number of active CPUs is not enough to know which ones are
>> active. This patch adds 2 new functions:
>>
>> * smp_cpu_addr_from_idx to get the CPU address from the index
>> * smp_cpu_from_idx allows to retrieve the struct cpu from the index
>>
>> This makes it possible for tests to avoid hardcoding the CPU addresses.
>> It is useful in cases where the address and the index might not match.
>>
>> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
With Davids nit
Reviewed-by Steffen Eiden <seiden@linux.ibm.com>
>> ---
>>   lib/s390x/smp.h |  2 ++
>>   lib/s390x/smp.c | 12 ++++++++++++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/lib/s390x/smp.h b/lib/s390x/smp.h
>> index a2609f11..69aa4003 100644
>> --- a/lib/s390x/smp.h
>> +++ b/lib/s390x/smp.h
>> @@ -37,6 +37,7 @@ struct cpu_status {
>>   
>>   int smp_query_num_cpus(void);
>>   struct cpu *smp_cpu_from_addr(uint16_t addr);
>> +struct cpu *smp_cpu_from_idx(uint16_t addr);
> 
> s/addr/idx/
> 
> 

  reply	other threads:[~2022-02-02 16:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 18:54 [kvm-unit-tests PATCH v1 0/5] s390x: smp: avoid hardcoded CPU addresses Claudio Imbrenda
2022-01-28 18:54 ` [kvm-unit-tests PATCH v1 1/5] lib: s390x: smp: add functions to work with CPU indexes Claudio Imbrenda
2022-01-31 13:50   ` David Hildenbrand
2022-02-02 16:55     ` Steffen Eiden [this message]
2022-02-03 13:33     ` Claudio Imbrenda
2022-01-28 18:54 ` [kvm-unit-tests PATCH v1 2/5] lib: s390x: smp: guarantee that boot CPU has index 0 Claudio Imbrenda
2022-01-31 13:55   ` David Hildenbrand
2022-02-03 11:41     ` Claudio Imbrenda
2022-01-28 18:54 ` [kvm-unit-tests PATCH v1 3/5] s390x: smp: avoid hardcoded CPU addresses Claudio Imbrenda
2022-01-28 18:54 ` [kvm-unit-tests PATCH v1 4/5] s390x: firq: " Claudio Imbrenda
2022-01-28 18:54 ` [kvm-unit-tests PATCH v1 5/5] s390x: skrf: " Claudio Imbrenda
2022-02-03  8:45 ` [kvm-unit-tests PATCH v1 0/5] s390x: smp: " Janosch Frank
2022-02-03 13:37   ` Claudio Imbrenda
2022-02-03 15:23     ` Janosch Frank
2022-02-03 15:48       ` Claudio Imbrenda
2022-02-04 15:01 ` Janosch Frank
2022-02-04 15:14   ` Claudio Imbrenda
2022-02-04 15:37     ` Janosch Frank

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=a9a4f77b-1c70-478c-1389-f243fa485159@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=scgl@linux.ibm.com \
    --cc=thuth@redhat.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