All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <joro@8bytes.org>, <peterz@infradead.org>, <mingo@redhat.com>,
	<acme@kernel.org>, <andihartmann@freenet.de>,
	<linux-kernel@vger.kernel.org>,
	<iommu@lists.linux-foundation.org>
Subject: Re: [PATCH V3 1/5] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header
Date: Thu, 11 Feb 2016 01:42:52 +0700	[thread overview]
Message-ID: <56BB84AC.5080605@amd.com> (raw)
In-Reply-To: <20160210164116.GG23914@pd.tnic>

Hi Boris,

On 2/10/16 23:41, Borislav Petkov wrote:
> On Tue, Feb 09, 2016 at 04:53:51PM -0600, Suravee Suthikulpanit wrote:
>> >This patch consolidates "arch/x86/kernel/cpu/perf_event_amd_iommu.h" and
>> >"drivers/iommu/amd_iommu_proto.h", which contain duplicate function
>> >declarations, into "include/linux/perf/perf_event_amd_iommu.h"
>> >
>> >Reviewed-by: Joerg Roedel<jroedel@suse.de>
>> >Signed-off-by: Suravee Suthikulpanit<Suravee.Suthikulpanit@amd.com>
>> >---
>> >  arch/x86/kernel/cpu/perf_event_amd_iommu.c |  2 +-
>> >  arch/x86/kernel/cpu/perf_event_amd_iommu.h | 40 ------------------------------
>> >  drivers/iommu/amd_iommu_init.c             |  2 ++
>> >  drivers/iommu/amd_iommu_proto.h            |  7 ------
>> >  include/linux/perf/perf_event_amd_iommu.h  | 40 ++++++++++++++++++++++++++++++
>> >  5 files changed, 43 insertions(+), 48 deletions(-)
>> >  delete mode 100644 arch/x86/kernel/cpu/perf_event_amd_iommu.h
>> >  create mode 100644 include/linux/perf/perf_event_amd_iommu.h
> Is this a header which will be used on something else besides x86 or why
> is it being moved to include/linux/ ?
>
> If not, it should go into arch/x86/events/ with the rest of the perf
> private headers.
>
> ...
>

My goal here is to find a place that I can declare a set of function 
prototypes and macros used in the IOMMU driver and IOMMU PERF. These are 
exported by the AMD IOMMU and can be used by other drivers (e.g. IOMMU 
perf).

The reason I picked this location to place the header file is because 
there is already an existing include/linux/perf/arm_pmu.h file there. 
So, I thought it might be alright to put the perf_event_amd_iommu.h here.

Having the information in the file arch/x86/events/amd/iommu.h seems 
strange for having to specify ../../arch/x86/events/amd/iommu.h in the 
IOMMU driver.

So, you think it would be alright if move

include/linux/perf/perf_event_amd_iommu.h
to
arch/x86/include/perf/perf_event_amd_iommu.h


Suravee

Thanks,
Suravee

WARNING: multiple messages have this Message-ID (diff)
From: Suravee Suthikulpanit <Suravee.Suthikulpanit-5C7GfCeVMHo@public.gmane.org>
To: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	andihartmann-KuiJ5kEpwI6ELgA04lAiVw@public.gmane.org,
	mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH V3 1/5] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header
Date: Thu, 11 Feb 2016 01:42:52 +0700	[thread overview]
Message-ID: <56BB84AC.5080605@amd.com> (raw)
In-Reply-To: <20160210164116.GG23914-fF5Pk5pvG8Y@public.gmane.org>

Hi Boris,

On 2/10/16 23:41, Borislav Petkov wrote:
> On Tue, Feb 09, 2016 at 04:53:51PM -0600, Suravee Suthikulpanit wrote:
>> >This patch consolidates "arch/x86/kernel/cpu/perf_event_amd_iommu.h" and
>> >"drivers/iommu/amd_iommu_proto.h", which contain duplicate function
>> >declarations, into "include/linux/perf/perf_event_amd_iommu.h"
>> >
>> >Reviewed-by: Joerg Roedel<jroedel-l3A5Bk7waGM@public.gmane.org>
>> >Signed-off-by: Suravee Suthikulpanit<Suravee.Suthikulpanit-5C7GfCeVMHo@public.gmane.org>
>> >---
>> >  arch/x86/kernel/cpu/perf_event_amd_iommu.c |  2 +-
>> >  arch/x86/kernel/cpu/perf_event_amd_iommu.h | 40 ------------------------------
>> >  drivers/iommu/amd_iommu_init.c             |  2 ++
>> >  drivers/iommu/amd_iommu_proto.h            |  7 ------
>> >  include/linux/perf/perf_event_amd_iommu.h  | 40 ++++++++++++++++++++++++++++++
>> >  5 files changed, 43 insertions(+), 48 deletions(-)
>> >  delete mode 100644 arch/x86/kernel/cpu/perf_event_amd_iommu.h
>> >  create mode 100644 include/linux/perf/perf_event_amd_iommu.h
> Is this a header which will be used on something else besides x86 or why
> is it being moved to include/linux/ ?
>
> If not, it should go into arch/x86/events/ with the rest of the perf
> private headers.
>
> ...
>

My goal here is to find a place that I can declare a set of function 
prototypes and macros used in the IOMMU driver and IOMMU PERF. These are 
exported by the AMD IOMMU and can be used by other drivers (e.g. IOMMU 
perf).

The reason I picked this location to place the header file is because 
there is already an existing include/linux/perf/arm_pmu.h file there. 
So, I thought it might be alright to put the perf_event_amd_iommu.h here.

Having the information in the file arch/x86/events/amd/iommu.h seems 
strange for having to specify ../../arch/x86/events/amd/iommu.h in the 
IOMMU driver.

So, you think it would be alright if move

include/linux/perf/perf_event_amd_iommu.h
to
arch/x86/include/perf/perf_event_amd_iommu.h


Suravee

Thanks,
Suravee

  reply	other threads:[~2016-02-10 18:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 22:53 [PATCH V3 0/5] perf/amd/iommu: Enable multi-IOMMU support Suravee Suthikulpanit
2016-02-09 22:53 ` Suravee Suthikulpanit
2016-02-09 22:53 ` [PATCH V3 1/5] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header Suravee Suthikulpanit
2016-02-09 22:53   ` Suravee Suthikulpanit
2016-02-10 16:41   ` Borislav Petkov
2016-02-10 18:42     ` Suravee Suthikulpanit [this message]
2016-02-10 18:42       ` Suravee Suthikulpanit
2016-02-10 18:51       ` Borislav Petkov
2016-02-10 18:51         ` Borislav Petkov
2016-02-10 18:56         ` Suravee Suthikulpanit
2016-02-10 18:56           ` Suravee Suthikulpanit
2016-02-10 19:00           ` Borislav Petkov
2016-02-10 19:00             ` Borislav Petkov
2016-02-09 22:53 ` [PATCH V3 2/5] perf/amd/iommu: Modify functions to query max banks and counters Suravee Suthikulpanit
2016-02-09 22:53   ` Suravee Suthikulpanit
2016-02-09 22:53 ` [PATCH V3 3/5] iommu/amd: Introduce amd_iommu_get_num_iommus() Suravee Suthikulpanit
2016-02-09 22:53   ` Suravee Suthikulpanit
2016-02-09 22:53 ` [PATCH V3 4/5] perf/amd/iommu: Introduce get_iommu_bnk_cnt_evt_idx Suravee Suthikulpanit
2016-02-09 22:53   ` Suravee Suthikulpanit
2016-02-10 16:43   ` Borislav Petkov
2016-02-10 16:43     ` Borislav Petkov
2016-02-09 22:53 ` [PATCH V3 5/5] perf/amd/iommu: Enable support for multiple IOMMUs Suravee Suthikulpanit
2016-02-09 22:53   ` Suravee Suthikulpanit
2016-02-10 17:14   ` Borislav Petkov
2016-02-10 17:14     ` Borislav Petkov
2016-02-11  8:34     ` Suravee Suthikulpanit
2016-02-11  8:34       ` Suravee Suthikulpanit
2016-02-10  0:08 ` [PATCH V3 0/5] perf/amd/iommu: Enable multi-IOMMU support Borislav Petkov
2016-02-10  0:08   ` Borislav Petkov
2016-02-10 13:43   ` Suravee Suthikulpanit
2016-02-10 13:43     ` Suravee Suthikulpanit

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=56BB84AC.5080605@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=acme@kernel.org \
    --cc=andihartmann@freenet.de \
    --cc=bp@alien8.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.