2015-02-22 16:09:29

by Vincent Stehlé

[permalink] [raw]
Subject: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

LPAE iommu page table makes sense only for ARM architecture. Add the
corresponding dependency in Kconfig.

This fixes the following runtime warnings on PA-RISC architecture:

WARNING: at drivers/iommu/io-pgtable-arm.c:413
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-next-20150222-00002-gc420256 #2
task: 17ca0000 ti: 17ca8000 task.ti: 17ca8000

YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001001111111100001111 Not tainted
r00-03 0004ff0f 0000001b 104871b0 17ca83c0
r04-07 00001000 00000000 00000000 00000000
r08-11 00000000 40001000 1013b36c 17ca8248
r12-15 00000080 17e712c0 00000000 17c5e100
r16-19 0000000c 105d8eb0 40001000 ffffffff
r20-23 00000000 00800020 1048717c 00000000
r24-27 00001000 00000000 00000009 10774ce0
r28-31 00000000 00000027 17ca8480 10486d44
sr00-03 00000000 00000000 00000000 00000000
sr04-07 00000000 00000000 00000000 00000000

IASQ: 00000000 00000000 IAOQ: 10486df4 10486df8
IIR: 03ffe01f ISR: 00000000 IOR: 17c86e54
CPU: 0 CR30: 17ca8000 CR31: 00000002
ORIG_R28: 00000001
IAOQ[0]: __arm_lpae_unmap+0x144/0x4cc
IAOQ[1]: __arm_lpae_unmap+0x148/0x4cc
RP(r2): arm_lpae_unmap+0x34/0x6c
Backtrace:
[<104871b0>] arm_lpae_unmap+0x34/0x6c
[<10127944>] 0x10127944
[<10168ee0>] do_one_initcall+0x128/0x1dc
[<101028fc>] 0x101028fc
[<10161b48>] kernel_init+0x1c/0x118
[<1015d01c>] end_fault_vector+0x1c/0x24
[<101762ec>] save_stack_trace+0x28/0x60

Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Will Deacon <[email protected]>
---


Hi,

This can be seen with e.g. Linux next-20150222 on parisc with allmodconfig.

Best regards,

V.


drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index baa0d97..c73fd72 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE

config IOMMU_IO_PGTABLE_LPAE
bool "ARMv7/v8 Long Descriptor Format"
+ depends on ARM
select IOMMU_IO_PGTABLE
help
Enable support for the ARM long descriptor pagetable format.
--
2.1.4


2015-02-23 16:51:43

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

Hi Vincent,

Thank you for the patch.

On Sunday 22 February 2015 17:09:06 Vincent Stehl? wrote:
> LPAE iommu page table makes sense only for ARM architecture. Add the
> corresponding dependency in Kconfig.
>
> This fixes the following runtime warnings on PA-RISC architecture:

I suppose this is caused by the selftest code ?

> WARNING: at drivers/iommu/io-pgtable-arm.c:413
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted
> 3.19.0-next-20150222-00002-gc420256 #2 task: 17ca0000 ti: 17ca8000 task.ti:
> 17ca8000
>
> YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
> PSW: 00000000000001001111111100001111 Not tainted
> r00-03 0004ff0f 0000001b 104871b0 17ca83c0
> r04-07 00001000 00000000 00000000 00000000
> r08-11 00000000 40001000 1013b36c 17ca8248
> r12-15 00000080 17e712c0 00000000 17c5e100
> r16-19 0000000c 105d8eb0 40001000 ffffffff
> r20-23 00000000 00800020 1048717c 00000000
> r24-27 00001000 00000000 00000009 10774ce0
> r28-31 00000000 00000027 17ca8480 10486d44
> sr00-03 00000000 00000000 00000000 00000000
> sr04-07 00000000 00000000 00000000 00000000
>
> IASQ: 00000000 00000000 IAOQ: 10486df4 10486df8
> IIR: 03ffe01f ISR: 00000000 IOR: 17c86e54
> CPU: 0 CR30: 17ca8000 CR31: 00000002
> ORIG_R28: 00000001
> IAOQ[0]: __arm_lpae_unmap+0x144/0x4cc
> IAOQ[1]: __arm_lpae_unmap+0x148/0x4cc
> RP(r2): arm_lpae_unmap+0x34/0x6c
> Backtrace:
> [<104871b0>] arm_lpae_unmap+0x34/0x6c
> [<10127944>] 0x10127944
> [<10168ee0>] do_one_initcall+0x128/0x1dc
> [<101028fc>] 0x101028fc
> [<10161b48>] kernel_init+0x1c/0x118
> [<1015d01c>] end_fault_vector+0x1c/0x24
> [<101762ec>] save_stack_trace+0x28/0x60
>
> Signed-off-by: Vincent Stehl? <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: Will Deacon <[email protected]>
> ---
>
>
> Hi,
>
> This can be seen with e.g. Linux next-20150222 on parisc with allmodconfig.
>
> Best regards,
>
> V.
>
>
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index baa0d97..c73fd72 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
>
> config IOMMU_IO_PGTABLE_LPAE
> bool "ARMv7/v8 Long Descriptor Format"
> + depends on ARM

How about ARM || COMPILE_TEST ? It can still be useful to compile the module
on other architectures.

> select IOMMU_IO_PGTABLE
> help
> Enable support for the ARM long descriptor pagetable format.

--
Regards,

Laurent Pinchart

2015-02-23 23:36:14

by Vincent Stehlé

[permalink] [raw]
Subject: Re: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

On 02/23/2015 05:52 PM, Laurent Pinchart wrote:
(runtime warning)
> I suppose this is caused by the selftest code ?

Hi Laurent,

Thanks for your feedback. You are right, this is the selftest code. Here
are the traces just before the first warnings:

arm-lpae io-pgtable: selftest: pgsize_bitmap 0x40201000, IAS 32^M
arm-lpae io-pgtable: selftest: pgsize_bitmap 0x40201000, IAS 36^M
arm-lpae io-pgtable: selftest: pgsize_bitmap 0x40201000, IAS 40^M

There are a number of failed selftests and warnings, and in the end the
PA-RISC machine won't boot.

..
> How about ARM || COMPILE_TEST ? It can still be useful to compile the module
> on other architectures.

I think you are right and this is how it should be; thank you for the
tips, I did not know about COMPILE_TEST. I'll resend a patch v2 right away.

Best regards,

V.

2015-02-23 23:55:44

by Vincent Stehlé

[permalink] [raw]
Subject: [PATCH v2 linux-next] iommu: Enable LPAE pagetable on ARM only

LPAE iommu page table makes sense only for ARM architecture. Add the
corresponding dependency in Kconfig (and enable for COMPILE_TEST, too, as per
Laurent's suggestion).

Signed-off-by: Vincent Stehlé <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Cc: Will Deacon <[email protected]>
---

Changes since v1:
- Add condition on COMPILE_TEST

drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index baa0d97..27cd88d 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE

config IOMMU_IO_PGTABLE_LPAE
bool "ARMv7/v8 Long Descriptor Format"
+ depends on ARM || COMPILE_TEST
select IOMMU_IO_PGTABLE
help
Enable support for the ARM long descriptor pagetable format.
--
2.1.4

2015-02-23 23:57:19

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v2 linux-next] iommu: Enable LPAE pagetable on ARM only

Hi Vincent,

Thank you for the patch.

On Tuesday 24 February 2015 00:55:21 Vincent Stehl? wrote:
> LPAE iommu page table makes sense only for ARM architecture. Add the
> corresponding dependency in Kconfig (and enable for COMPILE_TEST, too, as
> per Laurent's suggestion).
>
> Signed-off-by: Vincent Stehl? <[email protected]>
> Suggested-by: Laurent Pinchart <[email protected]>
> Cc: Will Deacon <[email protected]>

Acked-by: Laurent Pinchart <[email protected]>

> ---
>
> Changes since v1:
> - Add condition on COMPILE_TEST
>
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index baa0d97..27cd88d 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
>
> config IOMMU_IO_PGTABLE_LPAE
> bool "ARMv7/v8 Long Descriptor Format"
> + depends on ARM || COMPILE_TEST
> select IOMMU_IO_PGTABLE
> help
> Enable support for the ARM long descriptor pagetable format.

--
Regards,

Laurent Pinchart

2015-02-24 00:01:58

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v2 linux-next] iommu: Enable LPAE pagetable on ARM only

Hi Vincent,

On Tuesday 24 February 2015 01:58:17 Laurent Pinchart wrote:
> On Tuesday 24 February 2015 00:55:21 Vincent Stehl? wrote:
> > LPAE iommu page table makes sense only for ARM architecture. Add the
> > corresponding dependency in Kconfig (and enable for COMPILE_TEST, too, as
> > per Laurent's suggestion).
> >
> > Signed-off-by: Vincent Stehl? <[email protected]>
> > Suggested-by: Laurent Pinchart <[email protected]>
> > Cc: Will Deacon <[email protected]>
>
> Acked-by: Laurent Pinchart <[email protected]>

And I of course spoke too soon :-/

> > ---
> >
> > Changes since v1:
> > - Add condition on COMPILE_TEST
> >
> > drivers/iommu/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> > index baa0d97..27cd88d 100644
> > --- a/drivers/iommu/Kconfig
> > +++ b/drivers/iommu/Kconfig
> > @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
> >
> > config IOMMU_IO_PGTABLE_LPAE
> > bool "ARMv7/v8 Long Descriptor Format"
> > + depends on ARM || COMPILE_TEST

Shouldn't this be ARM || ARM64 || COMPILE_TEST ?

> > select IOMMU_IO_PGTABLE
> > help
> > Enable support for the ARM long descriptor pagetable format.

--
Regards,

Laurent Pinchart

2015-02-24 00:20:42

by Vincent Stehlé

[permalink] [raw]
Subject: [PATCH v3 linux-next] iommu: Enable LPAE pagetable on ARM and ARM64 only

LPAE iommu page table makes sense only for ARM and ARM64 architectures. Add the
corresponding dependency in Kconfig (and enable for COMPILE_TEST, too, as per
Laurent's suggestion).

Signed-off-by: Vincent Stehlé <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Cc: Will Deacon <[email protected]>
---


On 02/24/2015 01:02 AM, Laurent Pinchart wrote:
> Shouldn't this be ARM || ARM64 || COMPILE_TEST ?

Hi Laurent,

It makes perfect sense; thanks. I completely forgot, as I have yet to see one
of those. Here is v3 of the patch.

Best regards,

V.


Changes since v2:
- Add condition on ARM64

Changes since v1:
- Add condition on COMPILE_TEST


drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index baa0d97..a440922 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE

config IOMMU_IO_PGTABLE_LPAE
bool "ARMv7/v8 Long Descriptor Format"
+ depends on ARM || ARM64 || COMPILE_TEST
select IOMMU_IO_PGTABLE
help
Enable support for the ARM long descriptor pagetable format.
--
2.1.4

2015-02-24 00:22:47

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v3 linux-next] iommu: Enable LPAE pagetable on ARM and ARM64 only

On Tuesday 24 February 2015 01:20:21 Vincent Stehl? wrote:
> LPAE iommu page table makes sense only for ARM and ARM64 architectures. Add
> the corresponding dependency in Kconfig (and enable for COMPILE_TEST, too,
> as per Laurent's suggestion).
>
> Signed-off-by: Vincent Stehl? <[email protected]>
> Suggested-by: Laurent Pinchart <[email protected]>
> Cc: Will Deacon <[email protected]>

Now,

Acked-by: Laurent Pinchart <[email protected]>

> ---
>
> On 02/24/2015 01:02 AM, Laurent Pinchart wrote:
> > Shouldn't this be ARM || ARM64 || COMPILE_TEST ?
>
> Hi Laurent,
>
> It makes perfect sense; thanks. I completely forgot, as I have yet to see
> one of those. Here is v3 of the patch.
>
> Best regards,
>
> V.
>
>
> Changes since v2:
> - Add condition on ARM64
>
> Changes since v1:
> - Add condition on COMPILE_TEST
>
>
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index baa0d97..a440922 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
>
> config IOMMU_IO_PGTABLE_LPAE
> bool "ARMv7/v8 Long Descriptor Format"
> + depends on ARM || ARM64 || COMPILE_TEST
> select IOMMU_IO_PGTABLE
> help
> Enable support for the ARM long descriptor pagetable format.

--
Regards,

Laurent Pinchart

2015-02-24 10:33:05

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

On Mon, Feb 23, 2015 at 5:52 PM, Laurent Pinchart
<[email protected]> wrote:
> On Sunday 22 February 2015 17:09:06 Vincent Stehlé wrote:
>> LPAE iommu page table makes sense only for ARM architecture. Add the
>> corresponding dependency in Kconfig.
>>
>> This fixes the following runtime warnings on PA-RISC architecture:
>
> I suppose this is caused by the selftest code ?
>
>> WARNING: at drivers/iommu/io-pgtable-arm.c:413
>> Modules linked in:
>> CPU: 0 PID: 1 Comm: swapper/0 Not tainted
>> 3.19.0-next-20150222-00002-gc420256 #2 task: 17ca0000 ti: 17ca8000 task.ti:
>> 17ca8000
>>
>> YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
>> PSW: 00000000000001001111111100001111 Not tainted
>> r00-03 0004ff0f 0000001b 104871b0 17ca83c0
>> r04-07 00001000 00000000 00000000 00000000
>> r08-11 00000000 40001000 1013b36c 17ca8248
>> r12-15 00000080 17e712c0 00000000 17c5e100
>> r16-19 0000000c 105d8eb0 40001000 ffffffff
>> r20-23 00000000 00800020 1048717c 00000000
>> r24-27 00001000 00000000 00000009 10774ce0
>> r28-31 00000000 00000027 17ca8480 10486d44
>> sr00-03 00000000 00000000 00000000 00000000
>> sr04-07 00000000 00000000 00000000 00000000
>>
>> IASQ: 00000000 00000000 IAOQ: 10486df4 10486df8
>> IIR: 03ffe01f ISR: 00000000 IOR: 17c86e54
>> CPU: 0 CR30: 17ca8000 CR31: 00000002
>> ORIG_R28: 00000001
>> IAOQ[0]: __arm_lpae_unmap+0x144/0x4cc
>> IAOQ[1]: __arm_lpae_unmap+0x148/0x4cc
>> RP(r2): arm_lpae_unmap+0x34/0x6c
>> Backtrace:
>> [<104871b0>] arm_lpae_unmap+0x34/0x6c
>> [<10127944>] 0x10127944
>> [<10168ee0>] do_one_initcall+0x128/0x1dc
>> [<101028fc>] 0x101028fc
>> [<10161b48>] kernel_init+0x1c/0x118
>> [<1015d01c>] end_fault_vector+0x1c/0x24
>> [<101762ec>] save_stack_trace+0x28/0x60
>>
>> Signed-off-by: Vincent Stehlé <[email protected]>
>> Cc: Laurent Pinchart <[email protected]>
>> Cc: Will Deacon <[email protected]>
>> ---
>>
>>
>> Hi,
>>
>> This can be seen with e.g. Linux next-20150222 on parisc with allmodconfig.
>>
>> Best regards,
>>
>> V.
>>
>>
>> drivers/iommu/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
>> index baa0d97..c73fd72 100644
>> --- a/drivers/iommu/Kconfig
>> +++ b/drivers/iommu/Kconfig
>> @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
>>
>> config IOMMU_IO_PGTABLE_LPAE
>> bool "ARMv7/v8 Long Descriptor Format"
>> + depends on ARM
>
> How about ARM || COMPILE_TEST ? It can still be useful to compile the module
> on other architectures.

COMPILE_TEST is meant for test-compiling drivers or subsystems that are not
useful on all platforms. IMHO COMPILE_TEST kernels are still supposed to boot
without ill effects.

Now, I understand the issue on PA-RISC is with the selftest, not with the actual
IOMMU_IO_PGTABLE_LPAE module? Then IOMMU_IO_PGTABLE_LPAE
can depend on ARM || COMPILE_TEST (|| ARM64, cfr. Laurent's later email).

But the selftest should protect itself against running on non-ARM, either
by making IOMMU_IO_PGTABLE_LPAE_SELFTEST depend on ARM(64)
(without "|| COMPILE_TEST"), or by adding a check to arm_lpae_do_selftests(),
to please all compile-testers.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2015-02-25 09:59:29

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH v3 linux-next] iommu: Enable LPAE pagetable on ARM and ARM64 only

On Tue, Feb 24, 2015 at 12:23:48AM +0000, Laurent Pinchart wrote:
> On Tuesday 24 February 2015 01:20:21 Vincent Stehl? wrote:
> > LPAE iommu page table makes sense only for ARM and ARM64 architectures. Add
> > the corresponding dependency in Kconfig (and enable for COMPILE_TEST, too,
> > as per Laurent's suggestion).
> >
> > Signed-off-by: Vincent Stehl? <[email protected]>
> > Suggested-by: Laurent Pinchart <[email protected]>
> > Cc: Will Deacon <[email protected]>
>
> Now,
>
> Acked-by: Laurent Pinchart <[email protected]>

Sorry guys, I've been away from email for the past couple of days, but I
already have an exact copy of this patch queued from somebody else!

http://www.spinics.net/lists/arm-kernel/msg400030.html

Will

2015-02-25 10:00:58

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

On Tue, Feb 24, 2015 at 10:33:02AM +0000, Geert Uytterhoeven wrote:
> On Mon, Feb 23, 2015 at 5:52 PM, Laurent Pinchart
> <[email protected]> wrote:
> > On Sunday 22 February 2015 17:09:06 Vincent Stehl? wrote:
> >> LPAE iommu page table makes sense only for ARM architecture. Add the
> >> corresponding dependency in Kconfig.
> >>
> >> This fixes the following runtime warnings on PA-RISC architecture:
> >
> > I suppose this is caused by the selftest code ?
> >
> >> WARNING: at drivers/iommu/io-pgtable-arm.c:413
> >> Modules linked in:
> >> CPU: 0 PID: 1 Comm: swapper/0 Not tainted
> >> 3.19.0-next-20150222-00002-gc420256 #2 task: 17ca0000 ti: 17ca8000 task.ti:
> >> 17ca8000
> >>
> >> YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
> >> PSW: 00000000000001001111111100001111 Not tainted
> >> r00-03 0004ff0f 0000001b 104871b0 17ca83c0
> >> r04-07 00001000 00000000 00000000 00000000
> >> r08-11 00000000 40001000 1013b36c 17ca8248
> >> r12-15 00000080 17e712c0 00000000 17c5e100
> >> r16-19 0000000c 105d8eb0 40001000 ffffffff
> >> r20-23 00000000 00800020 1048717c 00000000
> >> r24-27 00001000 00000000 00000009 10774ce0
> >> r28-31 00000000 00000027 17ca8480 10486d44
> >> sr00-03 00000000 00000000 00000000 00000000
> >> sr04-07 00000000 00000000 00000000 00000000
> >>
> >> IASQ: 00000000 00000000 IAOQ: 10486df4 10486df8
> >> IIR: 03ffe01f ISR: 00000000 IOR: 17c86e54
> >> CPU: 0 CR30: 17ca8000 CR31: 00000002
> >> ORIG_R28: 00000001
> >> IAOQ[0]: __arm_lpae_unmap+0x144/0x4cc
> >> IAOQ[1]: __arm_lpae_unmap+0x148/0x4cc
> >> RP(r2): arm_lpae_unmap+0x34/0x6c
> >> Backtrace:
> >> [<104871b0>] arm_lpae_unmap+0x34/0x6c
> >> [<10127944>] 0x10127944
> >> [<10168ee0>] do_one_initcall+0x128/0x1dc
> >> [<101028fc>] 0x101028fc
> >> [<10161b48>] kernel_init+0x1c/0x118
> >> [<1015d01c>] end_fault_vector+0x1c/0x24
> >> [<101762ec>] save_stack_trace+0x28/0x60
> >>
> >> Signed-off-by: Vincent Stehl? <[email protected]>
> >> Cc: Laurent Pinchart <[email protected]>
> >> Cc: Will Deacon <[email protected]>
> >> ---
> >>
> >>
> >> Hi,
> >>
> >> This can be seen with e.g. Linux next-20150222 on parisc with allmodconfig.
> >>
> >> Best regards,
> >>
> >> V.
> >>
> >>
> >> drivers/iommu/Kconfig | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> >> index baa0d97..c73fd72 100644
> >> --- a/drivers/iommu/Kconfig
> >> +++ b/drivers/iommu/Kconfig
> >> @@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
> >>
> >> config IOMMU_IO_PGTABLE_LPAE
> >> bool "ARMv7/v8 Long Descriptor Format"
> >> + depends on ARM
> >
> > How about ARM || COMPILE_TEST ? It can still be useful to compile the module
> > on other architectures.
>
> COMPILE_TEST is meant for test-compiling drivers or subsystems that are not
> useful on all platforms. IMHO COMPILE_TEST kernels are still supposed to boot
> without ill effects.
>
> Now, I understand the issue on PA-RISC is with the selftest, not with the actual
> IOMMU_IO_PGTABLE_LPAE module? Then IOMMU_IO_PGTABLE_LPAE
> can depend on ARM || COMPILE_TEST (|| ARM64, cfr. Laurent's later email).
>
> But the selftest should protect itself against running on non-ARM, either
> by making IOMMU_IO_PGTABLE_LPAE_SELFTEST depend on ARM(64)
> (without "|| COMPILE_TEST"), or by adding a check to arm_lpae_do_selftests(),
> to please all compile-testers.

Perhaps, but actually the issues reported by the self-test are *real* bugs
that I've now got fixes for. They just don't show up on arm platforms
because of different right shift behaviour.

Will