* [PATCH] xen/arm: Fix compilation error when early printk is enabled
@ 2021-01-21 9:30 Michal Orzel
2021-01-21 9:35 ` Julien Grall
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Michal Orzel @ 2021-01-21 9:30 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Julien Grall, Volodymyr Babchuk,
bertrand.marquis, wei.chen
Fix compilation error when enabling early printk, introduced
by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
```
debug.S: Assembler messages:
debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
```
The fix is to include header <xen/page-size.h> which now contains
definitions for page/size/mask etc.
Signed-off-by: Michal Orzel <michal.orzel@arm.com>
---
xen/include/asm-arm/early_printk.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index d5485decfa..8dc911cf48 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -10,6 +10,7 @@
#ifndef __ARM_EARLY_PRINTK_H__
#define __ARM_EARLY_PRINTK_H__
+#include <xen/page-size.h>
#ifdef CONFIG_EARLY_PRINTK
--
2.29.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:30 [PATCH] xen/arm: Fix compilation error when early printk is enabled Michal Orzel
@ 2021-01-21 9:35 ` Julien Grall
2021-01-21 9:43 ` Jan Beulich
2021-01-21 9:47 ` Bertrand Marquis
2 siblings, 0 replies; 9+ messages in thread
From: Julien Grall @ 2021-01-21 9:35 UTC (permalink / raw)
To: Michal Orzel, xen-devel
Cc: Stefano Stabellini, Volodymyr Babchuk, bertrand.marquis, wei.chen
Hi Michal,
On 21/01/2021 09:30, Michal Orzel wrote:
> Fix compilation error when enabling early printk, introduced
> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
> ```
> debug.S: Assembler messages:
> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> ```
>
> The fix is to include header <xen/page-size.h> which now contains
> definitions for page/size/mask etc.
>
Fixes: aa4b9d1ee653 ("include: don't use asm/page.h from common headers")
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
> ---
> xen/include/asm-arm/early_printk.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
> index d5485decfa..8dc911cf48 100644
> --- a/xen/include/asm-arm/early_printk.h
> +++ b/xen/include/asm-arm/early_printk.h
> @@ -10,6 +10,7 @@
> #ifndef __ARM_EARLY_PRINTK_H__
> #define __ARM_EARLY_PRINTK_H__
>
> +#include <xen/page-size.h>
>
> #ifdef CONFIG_EARLY_PRINTK
>
>
Cheers,
--
Julien Grall
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:30 [PATCH] xen/arm: Fix compilation error when early printk is enabled Michal Orzel
2021-01-21 9:35 ` Julien Grall
@ 2021-01-21 9:43 ` Jan Beulich
2021-01-21 9:52 ` Michal Orzel
2021-01-21 9:56 ` Julien Grall
2021-01-21 9:47 ` Bertrand Marquis
2 siblings, 2 replies; 9+ messages in thread
From: Jan Beulich @ 2021-01-21 9:43 UTC (permalink / raw)
To: Michal Orzel
Cc: Stefano Stabellini, Julien Grall, Volodymyr Babchuk,
bertrand.marquis, wei.chen, xen-devel
On 21.01.2021 10:30, Michal Orzel wrote:
> Fix compilation error when enabling early printk, introduced
> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
> ```
> debug.S: Assembler messages:
> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> ```
>
> The fix is to include header <xen/page-size.h> which now contains
> definitions for page/size/mask etc.
>
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
I'm sorry for the breakage, but I wonder how I should have noticed
the issue. In all the Arm .config-s I'm routinely building I can't
even see ...
> --- a/xen/include/asm-arm/early_printk.h
> +++ b/xen/include/asm-arm/early_printk.h
> @@ -10,6 +10,7 @@
> #ifndef __ARM_EARLY_PRINTK_H__
> #define __ARM_EARLY_PRINTK_H__
>
> +#include <xen/page-size.h>
>
> #ifdef CONFIG_EARLY_PRINTK
... a respective Kconfig setting, i.e. it's not like I simply
failed to enable it.
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:30 [PATCH] xen/arm: Fix compilation error when early printk is enabled Michal Orzel
2021-01-21 9:35 ` Julien Grall
2021-01-21 9:43 ` Jan Beulich
@ 2021-01-21 9:47 ` Bertrand Marquis
2 siblings, 0 replies; 9+ messages in thread
From: Bertrand Marquis @ 2021-01-21 9:47 UTC (permalink / raw)
To: Michal Orzel
Cc: xen-devel, Stefano Stabellini, Julien Grall, Volodymyr Babchuk, Wei Chen
Hi Michal,
> On 21 Jan 2021, at 09:30, Michal Orzel <Michal.Orzel@arm.com> wrote:
>
> Fix compilation error when enabling early printk, introduced
> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
> ```
> debug.S: Assembler messages:
> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
> ```
>
> The fix is to include header <xen/page-size.h> which now contains
> definitions for page/size/mask etc.
>
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Thanks a lot, this is fixing the compilation issues.
Cheers
Bertrand
> ---
> xen/include/asm-arm/early_printk.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
> index d5485decfa..8dc911cf48 100644
> --- a/xen/include/asm-arm/early_printk.h
> +++ b/xen/include/asm-arm/early_printk.h
> @@ -10,6 +10,7 @@
> #ifndef __ARM_EARLY_PRINTK_H__
> #define __ARM_EARLY_PRINTK_H__
>
> +#include <xen/page-size.h>
>
> #ifdef CONFIG_EARLY_PRINTK
>
> --
> 2.29.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:43 ` Jan Beulich
@ 2021-01-21 9:52 ` Michal Orzel
2021-01-21 9:56 ` Julien Grall
1 sibling, 0 replies; 9+ messages in thread
From: Michal Orzel @ 2021-01-21 9:52 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Julien Grall, Volodymyr Babchuk,
bertrand.marquis, wei.chen, xen-devel
Hi Jan,
On 21.01.2021 10:43, Jan Beulich wrote:
> On 21.01.2021 10:30, Michal Orzel wrote:
>> Fix compilation error when enabling early printk, introduced
>> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
>> ```
>> debug.S: Assembler messages:
>> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>> ```
>>
>> The fix is to include header <xen/page-size.h> which now contains
>> definitions for page/size/mask etc.
>>
>> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
>
> I'm sorry for the breakage, but I wonder how I should have noticed
> the issue. In all the Arm .config-s I'm routinely building I can't
> even see ...
>
This is not your fault. Nowadays it is becoming harder and harder to try all the possible combinations.
>> --- a/xen/include/asm-arm/early_printk.h
>> +++ b/xen/include/asm-arm/early_printk.h
>> @@ -10,6 +10,7 @@
>> #ifndef __ARM_EARLY_PRINTK_H__
>> #define __ARM_EARLY_PRINTK_H__
>>
>> +#include <xen/page-size.h>
>>
>> #ifdef CONFIG_EARLY_PRINTK
>
> ... a respective Kconfig setting, i.e. it's not like I simply
> failed to enable it.
>
> Jan
>
Cheers,
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:43 ` Jan Beulich
2021-01-21 9:52 ` Michal Orzel
@ 2021-01-21 9:56 ` Julien Grall
2021-01-21 10:24 ` Jan Beulich
1 sibling, 1 reply; 9+ messages in thread
From: Julien Grall @ 2021-01-21 9:56 UTC (permalink / raw)
To: Jan Beulich, Michal Orzel
Cc: Stefano Stabellini, Volodymyr Babchuk, bertrand.marquis,
wei.chen, xen-devel
Hi Jan,
On 21/01/2021 09:43, Jan Beulich wrote:
> On 21.01.2021 10:30, Michal Orzel wrote:
>> Fix compilation error when enabling early printk, introduced
>> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
>> ```
>> debug.S: Assembler messages:
>> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>> ```
>>
>> The fix is to include header <xen/page-size.h> which now contains
>> definitions for page/size/mask etc.
>>
>> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
>
> I'm sorry for the breakage, but I wonder how I should have noticed
> the issue. In all the Arm .config-s I'm routinely building I can't
> even see ...
>
>> --- a/xen/include/asm-arm/early_printk.h
>> +++ b/xen/include/asm-arm/early_printk.h
>> @@ -10,6 +10,7 @@
>> #ifndef __ARM_EARLY_PRINTK_H__
>> #define __ARM_EARLY_PRINTK_H__
>>
>> +#include <xen/page-size.h>
>>
>> #ifdef CONFIG_EARLY_PRINTK
>
> ... a respective Kconfig setting, i.e. it's not like I simply
> failed to enable it.
EARLY_PRINTK is defined in arch/arm/Kconfig.debug and is selected when
you specify the UART to use.
Assuming you are only build testing, you could add the following for
testing EARLY_PRINTK:
CONFIG_DEBUG=y
CONFIG_EARLY_UART_CHOICE_8250=y
CONFIG_EARLY_UART_8250=y
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_UART_BASE_ADDRESS=
CONFIG_EARLY_UART_8250_REG_SHIFT=0
CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
Cheers,
--
Julien Grall
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 9:56 ` Julien Grall
@ 2021-01-21 10:24 ` Jan Beulich
2021-01-21 18:47 ` Julien Grall
0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2021-01-21 10:24 UTC (permalink / raw)
To: Julien Grall
Cc: Stefano Stabellini, Volodymyr Babchuk, bertrand.marquis,
wei.chen, xen-devel, Michal Orzel
On 21.01.2021 10:56, Julien Grall wrote:
> Hi Jan,
>
> On 21/01/2021 09:43, Jan Beulich wrote:
>> On 21.01.2021 10:30, Michal Orzel wrote:
>>> Fix compilation error when enabling early printk, introduced
>>> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
>>> ```
>>> debug.S: Assembler messages:
>>> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>>> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>>> ```
>>>
>>> The fix is to include header <xen/page-size.h> which now contains
>>> definitions for page/size/mask etc.
>>>
>>> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
>>
>> I'm sorry for the breakage, but I wonder how I should have noticed
>> the issue. In all the Arm .config-s I'm routinely building I can't
>> even see ...
>>
>>> --- a/xen/include/asm-arm/early_printk.h
>>> +++ b/xen/include/asm-arm/early_printk.h
>>> @@ -10,6 +10,7 @@
>>> #ifndef __ARM_EARLY_PRINTK_H__
>>> #define __ARM_EARLY_PRINTK_H__
>>>
>>> +#include <xen/page-size.h>
>>>
>>> #ifdef CONFIG_EARLY_PRINTK
>>
>> ... a respective Kconfig setting, i.e. it's not like I simply
>> failed to enable it.
>
> EARLY_PRINTK is defined in arch/arm/Kconfig.debug and is selected when
> you specify the UART to use.
>
> Assuming you are only build testing, you could add the following for
> testing EARLY_PRINTK:
>
> CONFIG_DEBUG=y
> CONFIG_EARLY_UART_CHOICE_8250=y
> CONFIG_EARLY_UART_8250=y
> CONFIG_EARLY_PRINTK=y
> CONFIG_EARLY_UART_BASE_ADDRESS=
> CONFIG_EARLY_UART_8250_REG_SHIFT=0
> CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
Ah yes, this works, thanks. The "optional" on the choice isn't
very helpful I suppose, because when going from an existing
.config one would neither find a setting presently turned off
in that .config, nor will there be a prompt.
I suppose any page-aligned base address is fine to use for my
build-testing-only purposes?
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 10:24 ` Jan Beulich
@ 2021-01-21 18:47 ` Julien Grall
2021-01-22 9:07 ` Jan Beulich
0 siblings, 1 reply; 9+ messages in thread
From: Julien Grall @ 2021-01-21 18:47 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Volodymyr Babchuk, bertrand.marquis,
wei.chen, xen-devel, Michal Orzel
Hi Jan,
On 21/01/2021 10:24, Jan Beulich wrote:
> On 21.01.2021 10:56, Julien Grall wrote:
>> Hi Jan,
>>
>> On 21/01/2021 09:43, Jan Beulich wrote:
>>> On 21.01.2021 10:30, Michal Orzel wrote:
>>>> Fix compilation error when enabling early printk, introduced
>>>> by commit aa4b9d1ee6538b5cbe218d4d3fcdf9548130a063:
>>>> ```
>>>> debug.S: Assembler messages:
>>>> debug.S:31: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>>>> debug.S:38: Error: constant expression expected at operand 2 -- `ldr x15,=((0x00400000+(0)*PAGE_SIZE)+(0x1c090000&~PAGE_MASK))`
>>>> ```
>>>>
>>>> The fix is to include header <xen/page-size.h> which now contains
>>>> definitions for page/size/mask etc.
>>>>
>>>> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
>>>
>>> I'm sorry for the breakage, but I wonder how I should have noticed
>>> the issue. In all the Arm .config-s I'm routinely building I can't
>>> even see ...
>>>
>>>> --- a/xen/include/asm-arm/early_printk.h
>>>> +++ b/xen/include/asm-arm/early_printk.h
>>>> @@ -10,6 +10,7 @@
>>>> #ifndef __ARM_EARLY_PRINTK_H__
>>>> #define __ARM_EARLY_PRINTK_H__
>>>>
>>>> +#include <xen/page-size.h>
>>>>
>>>> #ifdef CONFIG_EARLY_PRINTK
>>>
>>> ... a respective Kconfig setting, i.e. it's not like I simply
>>> failed to enable it.
>>
>> EARLY_PRINTK is defined in arch/arm/Kconfig.debug and is selected when
>> you specify the UART to use.
>>
>> Assuming you are only build testing, you could add the following for
>> testing EARLY_PRINTK:
>>
>> CONFIG_DEBUG=y
>> CONFIG_EARLY_UART_CHOICE_8250=y
>> CONFIG_EARLY_UART_8250=y
>> CONFIG_EARLY_PRINTK=y
>> CONFIG_EARLY_UART_BASE_ADDRESS=
>> CONFIG_EARLY_UART_8250_REG_SHIFT=0
>> CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
>
> Ah yes, this works, thanks. The "optional" on the choice isn't
> very helpful I suppose, because when going from an existing
> .config one would neither find a setting presently turned off
> in that .config, nor will there be a prompt.
Do you have a suggestion how the "choice" can appear in the .config?
> I suppose any page-aligned base address is fine to use for my
> build-testing-only purposes?
The base address doesn't need to be page-aligned (some HW have multiple
UARTs in the same 4K region).
Cheers,
--
Julien Grall
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xen/arm: Fix compilation error when early printk is enabled
2021-01-21 18:47 ` Julien Grall
@ 2021-01-22 9:07 ` Jan Beulich
0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2021-01-22 9:07 UTC (permalink / raw)
To: Julien Grall
Cc: Stefano Stabellini, Volodymyr Babchuk, bertrand.marquis,
wei.chen, xen-devel, Michal Orzel
On 21.01.2021 19:47, Julien Grall wrote:
> On 21/01/2021 10:24, Jan Beulich wrote:
>> On 21.01.2021 10:56, Julien Grall wrote:
>>> On 21/01/2021 09:43, Jan Beulich wrote:
>>>> On 21.01.2021 10:30, Michal Orzel wrote:
>>>>> --- a/xen/include/asm-arm/early_printk.h
>>>>> +++ b/xen/include/asm-arm/early_printk.h
>>>>> @@ -10,6 +10,7 @@
>>>>> #ifndef __ARM_EARLY_PRINTK_H__
>>>>> #define __ARM_EARLY_PRINTK_H__
>>>>>
>>>>> +#include <xen/page-size.h>
>>>>>
>>>>> #ifdef CONFIG_EARLY_PRINTK
>>>>
>>>> ... a respective Kconfig setting, i.e. it's not like I simply
>>>> failed to enable it.
>>>
>>> EARLY_PRINTK is defined in arch/arm/Kconfig.debug and is selected when
>>> you specify the UART to use.
>>>
>>> Assuming you are only build testing, you could add the following for
>>> testing EARLY_PRINTK:
>>>
>>> CONFIG_DEBUG=y
>>> CONFIG_EARLY_UART_CHOICE_8250=y
>>> CONFIG_EARLY_UART_8250=y
>>> CONFIG_EARLY_PRINTK=y
>>> CONFIG_EARLY_UART_BASE_ADDRESS=
>>> CONFIG_EARLY_UART_8250_REG_SHIFT=0
>>> CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
>>
>> Ah yes, this works, thanks. The "optional" on the choice isn't
>> very helpful I suppose, because when going from an existing
>> .config one would neither find a setting presently turned off
>> in that .config, nor will there be a prompt.
>
> Do you have a suggestion how the "choice" can appear in the .config?
Drop the "optional" attribute from it? Of course I ask without any
knowledge on why it may have been put there in the first place.
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-01-22 9:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 9:30 [PATCH] xen/arm: Fix compilation error when early printk is enabled Michal Orzel
2021-01-21 9:35 ` Julien Grall
2021-01-21 9:43 ` Jan Beulich
2021-01-21 9:52 ` Michal Orzel
2021-01-21 9:56 ` Julien Grall
2021-01-21 10:24 ` Jan Beulich
2021-01-21 18:47 ` Julien Grall
2021-01-22 9:07 ` Jan Beulich
2021-01-21 9:47 ` Bertrand Marquis
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.