* [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-07 14:12 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-07 14:12 UTC (permalink / raw)
To: Joerg Roedel, Lu Baolu, iommu, linux-kernel
Cc: Will Deacon, Andy Shevchenko, David Woodhouse
Compiler is not happy about hidden declaration of intel_iommu_ops.
.../iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
Move declaration to header file to make compiler happy.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: made sure it compiles with IRQ_REMAP=y, INTEL_IOMMU=n (Lu)
drivers/iommu/intel/dmar.c | 2 --
include/linux/intel-iommu.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index 915bff76fe96..b114e09a647d 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -66,8 +66,6 @@ static unsigned long dmar_seq_ids[BITS_TO_LONGS(DMAR_UNITS_SUPPORTED)];
static int alloc_iommu(struct dmar_drhd_unit *drhd);
static void free_iommu(struct intel_iommu *iommu);
-extern const struct iommu_ops intel_iommu_ops;
-
static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
{
/*
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 69230fd695ea..1036c1900b5c 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
u8 devfn, int alloc);
+extern const struct iommu_ops intel_iommu_ops;
+
#ifdef CONFIG_INTEL_IOMMU
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
--
2.34.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-07 14:12 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-07 14:12 UTC (permalink / raw)
To: Joerg Roedel, Lu Baolu, iommu, linux-kernel
Cc: David Woodhouse, Joerg Roedel, Will Deacon, Andy Shevchenko
Compiler is not happy about hidden declaration of intel_iommu_ops.
.../iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
Move declaration to header file to make compiler happy.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: made sure it compiles with IRQ_REMAP=y, INTEL_IOMMU=n (Lu)
drivers/iommu/intel/dmar.c | 2 --
include/linux/intel-iommu.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index 915bff76fe96..b114e09a647d 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -66,8 +66,6 @@ static unsigned long dmar_seq_ids[BITS_TO_LONGS(DMAR_UNITS_SUPPORTED)];
static int alloc_iommu(struct dmar_drhd_unit *drhd);
static void free_iommu(struct intel_iommu *iommu);
-extern const struct iommu_ops intel_iommu_ops;
-
static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
{
/*
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 69230fd695ea..1036c1900b5c 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
u8 devfn, int alloc);
+extern const struct iommu_ops intel_iommu_ops;
+
#ifdef CONFIG_INTEL_IOMMU
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
2022-02-07 14:12 ` Andy Shevchenko
@ 2022-02-09 11:56 ` Andy Shevchenko
-1 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-09 11:56 UTC (permalink / raw)
To: Joerg Roedel, Lu Baolu, iommu, linux-kernel; +Cc: Will Deacon, David Woodhouse
On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
> Compiler is not happy about hidden declaration of intel_iommu_ops.
>
> .../iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
>
> Move declaration to header file to make compiler happy.
Note, with this change we are closer to have a clean build with the
CONFIG_WERROR=y when `make W=1`.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-09 11:56 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-09 11:56 UTC (permalink / raw)
To: Joerg Roedel, Lu Baolu, iommu, linux-kernel
Cc: David Woodhouse, Joerg Roedel, Will Deacon
On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
> Compiler is not happy about hidden declaration of intel_iommu_ops.
>
> .../iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
>
> Move declaration to header file to make compiler happy.
Note, with this change we are closer to have a clean build with the
CONFIG_WERROR=y when `make W=1`.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
2022-02-07 14:12 ` Andy Shevchenko
@ 2022-02-14 13:27 ` Joerg Roedel
-1 siblings, 0 replies; 12+ messages in thread
From: Joerg Roedel @ 2022-02-14 13:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joerg Roedel, Lu Baolu, iommu, linux-kernel, David Woodhouse,
Will Deacon
On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
> index 69230fd695ea..1036c1900b5c 100644
> --- a/include/linux/intel-iommu.h
> +++ b/include/linux/intel-iommu.h
> @@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
> struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
> u8 devfn, int alloc);
>
> +extern const struct iommu_ops intel_iommu_ops;
> +
The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
would prefer a header in that directory. But I leave that up to Baolu to
decide.
Thanks,
Joerg
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-14 13:27 ` Joerg Roedel
0 siblings, 0 replies; 12+ messages in thread
From: Joerg Roedel @ 2022-02-14 13:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joerg Roedel, David Woodhouse, linux-kernel, iommu, Will Deacon
On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
> index 69230fd695ea..1036c1900b5c 100644
> --- a/include/linux/intel-iommu.h
> +++ b/include/linux/intel-iommu.h
> @@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
> struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
> u8 devfn, int alloc);
>
> +extern const struct iommu_ops intel_iommu_ops;
> +
The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
would prefer a header in that directory. But I leave that up to Baolu to
decide.
Thanks,
Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
2022-02-14 13:27 ` Joerg Roedel
@ 2022-02-15 1:31 ` Lu Baolu
-1 siblings, 0 replies; 12+ messages in thread
From: Lu Baolu @ 2022-02-15 1:31 UTC (permalink / raw)
To: Joerg Roedel, Andy Shevchenko
Cc: baolu.lu, Joerg Roedel, iommu, linux-kernel, David Woodhouse,
Will Deacon
On 2/14/22 9:27 PM, Joerg Roedel wrote:
> On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
>> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
>> index 69230fd695ea..1036c1900b5c 100644
>> --- a/include/linux/intel-iommu.h
>> +++ b/include/linux/intel-iommu.h
>> @@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
>> struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
>> u8 devfn, int alloc);
>>
>> +extern const struct iommu_ops intel_iommu_ops;
>> +
> The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
> would prefer a header in that directory. But I leave that up to Baolu to
> decide.
Agreed. I also have a plan to split them out into a internal header.
Best regards,
baolu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-15 1:31 ` Lu Baolu
0 siblings, 0 replies; 12+ messages in thread
From: Lu Baolu @ 2022-02-15 1:31 UTC (permalink / raw)
To: Joerg Roedel, Andy Shevchenko
Cc: Joerg Roedel, David Woodhouse, linux-kernel, iommu, Will Deacon
On 2/14/22 9:27 PM, Joerg Roedel wrote:
> On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
>> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
>> index 69230fd695ea..1036c1900b5c 100644
>> --- a/include/linux/intel-iommu.h
>> +++ b/include/linux/intel-iommu.h
>> @@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
>> struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
>> u8 devfn, int alloc);
>>
>> +extern const struct iommu_ops intel_iommu_ops;
>> +
> The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
> would prefer a header in that directory. But I leave that up to Baolu to
> decide.
Agreed. I also have a plan to split them out into a internal header.
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
2022-02-15 1:31 ` Lu Baolu
@ 2022-02-15 9:51 ` Andy Shevchenko
-1 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-15 9:51 UTC (permalink / raw)
To: Lu Baolu
Cc: Joerg Roedel, Joerg Roedel, iommu, linux-kernel, David Woodhouse,
Will Deacon
On Tue, Feb 15, 2022 at 09:31:37AM +0800, Lu Baolu wrote:
> On 2/14/22 9:27 PM, Joerg Roedel wrote:
> > On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
...
> > > +extern const struct iommu_ops intel_iommu_ops;
> > The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
> > would prefer a header in that directory. But I leave that up to Baolu to
> > decide.
>
> Agreed. I also have a plan to split them out into a internal header.
The above change is hanging for more than a year, can we apply it and then
you can do a split?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-15 9:51 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-02-15 9:51 UTC (permalink / raw)
To: Lu Baolu; +Cc: Joerg Roedel, David Woodhouse, linux-kernel, iommu, Will Deacon
On Tue, Feb 15, 2022 at 09:31:37AM +0800, Lu Baolu wrote:
> On 2/14/22 9:27 PM, Joerg Roedel wrote:
> > On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
...
> > > +extern const struct iommu_ops intel_iommu_ops;
> > The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
> > would prefer a header in that directory. But I leave that up to Baolu to
> > decide.
>
> Agreed. I also have a plan to split them out into a internal header.
The above change is hanging for more than a year, can we apply it and then
you can do a split?
--
With Best Regards,
Andy Shevchenko
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
2022-02-15 9:51 ` Andy Shevchenko
@ 2022-02-16 7:03 ` Lu Baolu
-1 siblings, 0 replies; 12+ messages in thread
From: Lu Baolu @ 2022-02-16 7:03 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joerg Roedel, Will Deacon, linux-kernel, iommu, David Woodhouse
On 2/15/22 5:51 PM, Andy Shevchenko wrote:
> On Tue, Feb 15, 2022 at 09:31:37AM +0800, Lu Baolu wrote:
>> On 2/14/22 9:27 PM, Joerg Roedel wrote:
>>> On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
>
> ...
>
>>>> +extern const struct iommu_ops intel_iommu_ops;
>
>>> The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
>>> would prefer a header in that directory. But I leave that up to Baolu to
>>> decide.
>>
>> Agreed. I also have a plan to split them out into a internal header.
>
> The above change is hanging for more than a year, can we apply it and then
> you can do a split?
>
Yeah. This is my plan. The include/linux/intel-iommu.h also keeps other
internal only helpers. It worth a separated cleanup patch.
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file
@ 2022-02-16 7:03 ` Lu Baolu
0 siblings, 0 replies; 12+ messages in thread
From: Lu Baolu @ 2022-02-16 7:03 UTC (permalink / raw)
To: Andy Shevchenko
Cc: baolu.lu, Joerg Roedel, Joerg Roedel, iommu, linux-kernel,
David Woodhouse, Will Deacon
On 2/15/22 5:51 PM, Andy Shevchenko wrote:
> On Tue, Feb 15, 2022 at 09:31:37AM +0800, Lu Baolu wrote:
>> On 2/14/22 9:27 PM, Joerg Roedel wrote:
>>> On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
>
> ...
>
>>>> +extern const struct iommu_ops intel_iommu_ops;
>
>>> The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
>>> would prefer a header in that directory. But I leave that up to Baolu to
>>> decide.
>>
>> Agreed. I also have a plan to split them out into a internal header.
>
> The above change is hanging for more than a year, can we apply it and then
> you can do a split?
>
Yeah. This is my plan. The include/linux/intel-iommu.h also keeps other
internal only helpers. It worth a separated cleanup patch.
Best regards,
baolu
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-02-16 7:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 14:12 [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file Andy Shevchenko
2022-02-07 14:12 ` Andy Shevchenko
2022-02-09 11:56 ` Andy Shevchenko
2022-02-09 11:56 ` Andy Shevchenko
2022-02-14 13:27 ` Joerg Roedel
2022-02-14 13:27 ` Joerg Roedel
2022-02-15 1:31 ` Lu Baolu
2022-02-15 1:31 ` Lu Baolu
2022-02-15 9:51 ` Andy Shevchenko
2022-02-15 9:51 ` Andy Shevchenko
2022-02-16 7:03 ` Lu Baolu
2022-02-16 7:03 ` Lu Baolu
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.