From: Michael Ellerman <mpe@ellerman.id.au>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>
Cc: peterz@infradead.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [3/9] powerpc/hv-24x7: Drop event_24x7_request()
Date: Tue, 17 Mar 2015 13:16:02 +1100 (AEDT) [thread overview]
Message-ID: <20150317021602.6BCFE14010F@ozlabs.org> (raw)
In-Reply-To: <1424210434-28070-4-git-send-email-sukadev@linux.vnet.ibm.com>
On Tue, 2015-17-02 at 22:00:28 UTC, Sukadev Bhattiprolu wrote:
> The function event_24x7_request() is essentially a wrapper to the
> function single_24x7_request() and can be dropped to simplify code.
>
> diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
> index 7856e38..c189e75 100644
> --- a/arch/powerpc/perf/hv-24x7.c
> +++ b/arch/powerpc/perf/hv-24x7.c
> @@ -1004,17 +1004,22 @@ static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
> memset(request_buffer, 0, 4096);
> memset(result_buffer, 0, 4096);
>
> + if (is_physical_domain(event_get_domain(event)))
> + idx = event_get_core(event);
> + else
> + idx = event_get_vcpu(event);
> +
> request_buffer->interface_version = HV_24X7_IF_VERSION_CURRENT;
> request_buffer->num_requests = 1;
>
> req = &request_buffer->requests[0];
>
> - req->performance_domain = domain;
> + req->performance_domain = event_get_domain(event);
> req->data_size = cpu_to_be16(8);
> - req->data_offset = cpu_to_be32(offset);
> - req->starting_lpar_ix = cpu_to_be16(lpar),
> + req->data_offset = cpu_to_be32(event_get_offset(event));
> + req->starting_lpar_ix = cpu_to_be16(event_get_lpar(event)),
> req->max_num_lpars = cpu_to_be16(1);
> - req->starting_ix = cpu_to_be16(ix);
> + req->starting_ix = cpu_to_be16(idx);
> req->max_ix = cpu_to_be16(1);
>
> /*
> @@ -1029,7 +1034,9 @@ static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
> if (ret) {
> pr_notice_ratelimited("hcall failed: %d %#x %#x %d => "
> "0x%lx (%ld) detail=0x%x failing ix=%x\n",
> - domain, offset, ix, lpar, ret, ret,
> + (int)event_get_domain(event),
> + (unsigned int)event_get_offset(event),
> + idx, (int)event_get_lpar(event), ret, ret,
It seems more natural here to print the req->performance_domain etc. rather
then re-extracting them from the event?
cheers
next prev parent reply other threads:[~2015-03-17 2:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 22:00 [PATCH 0/9] powerpc/hv-24x7: Reorganize single_24x7_request() Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 1/9] powerpc/hv-24x7: Modify definition of request and result buffers Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 2/9] powerpc/hv24x7: Remove unnecessary parameter Sukadev Bhattiprolu
2015-03-17 0:13 ` [2/9] " Michael Ellerman
2015-03-23 22:17 ` Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 3/9] powerpc/hv-24x7: Drop event_24x7_request() Sukadev Bhattiprolu
2015-03-17 2:16 ` Michael Ellerman [this message]
2015-02-17 22:00 ` [PATCH 4/9] powerpc/hv24x7: Move debug prints to separate function Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 5/9] powerpc/hv-24x7: Rename hv_24x7_event_update Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 6/9] powerpc/hv-24x7: Define add_event_to_24x7_request() Sukadev Bhattiprolu
2015-03-17 2:18 ` [6/9] " Michael Ellerman
2015-02-17 22:00 ` [PATCH 7/9] powerpc/hv-24x7: Define update_event_count() Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 8/9] powerpc/hv-24x7: Break up single_24x7_request Sukadev Bhattiprolu
2015-03-17 2:23 ` [8/9] " Michael Ellerman
2015-03-23 21:55 ` Sukadev Bhattiprolu
2015-02-17 22:00 ` [PATCH 9/9] powerpc/hv-24x7: Add missing put_cpu_var() Sukadev Bhattiprolu
2015-03-17 2:39 ` [9/9] " Michael Ellerman
2015-03-23 21:47 ` Sukadev Bhattiprolu
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=20150317021602.6BCFE14010F@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.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).