xen/arm: Fix compilation error when early printk is enabled
PATCH 1/1 xen/arm: Fix compilation error when early printk is enabled
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.
--- xen/include/asm-arm/early_printk.h | 1 + 1 file changed, 1 insertion(+)
xen/include/asm-arm/early_printk.h +1 -0
@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__ +#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK
Signature · 1 line
2.29.0
Hi Michal,
Quoted 11 lines · Michal Orzel
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.
Quoted 1 line
Signed-off-by Michal Orzel <[email protected]>
Quoted 10 lines
--- xen/include/asm-arm/early_printk.h | 1 + 1 file changed, 1 insertion(+)xen/include/asm-arm/early_printk.h +0
-0
xen/include/asm-arm/early_printk.h line 16
Quoted 7 lines
xen/include/asm-arm/early_printk.h +1
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__ +#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK
Cheers,
Signature · 1 line
Julien Grall
Quoted 8 lines · Michal Orzel
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))` ```
Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>
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 ...
xen/include/asm-arm/early_printk.h line 15
Quoted 9 lines
xen/include/asm-arm/early_printk.h +1
-0@@ -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
Hi Jan,
Quoted 9 lines · Jan Beulich
Quoted 8 lines · Michal Orzel
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))` ```
Quoted 9 lines
Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>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.
Quoted 6 lines
Quoted 6 lines
xen/include/asm-arm/early_printk.h +0
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__
Quoted 9 lines
xen/include/asm-arm/early_printk.h line 15
Quoted 3 lines
xen/include/asm-arm/early_printk.h +1
-0+#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK ... a respective
Kconfigsetting, i.e. it's not like I simply failed to enable it.Jan
Cheers,
Michal
Hi Jan,
Quoted 24 lines · Jan Beulich
Quoted 8 lines · Michal Orzel
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))` ```Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>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 ...
Quoted 6 lines
xen/include/asm-arm/early_printk.h +0
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__
Quoted 6 lines
xen/include/asm-arm/early_printk.h line 15
Quoted 3 lines
xen/include/asm-arm/early_printk.h +1
-0+#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK ... a respective
Kconfigsetting, 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=yCONFIG_EARLY_UART_CHOICE_8250=yCONFIG_EARLY_UART_8250=yCONFIG_EARLY_PRINTK=yCONFIG_EARLY_UART_BASE_ADDRESS=CONFIG_EARLY_UART_8250_REG_SHIFT=0CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
Cheers,
Signature · 1 line
Julien Grall
Quoted 40 lines · Julien Grall
Hi Jan,
Quoted 24 lines · Jan Beulich
Quoted 8 lines · Michal Orzel
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))` ```Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>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 ...
Quoted 6 lines
xen/include/asm-arm/early_printk.h +0
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__Quoted 6 lines
xen/include/asm-arm/early_printk.h line 15
Quoted 3 lines
xen/include/asm-arm/early_printk.h +1
-0+#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK ... a respective
Kconfigsetting, i.e. it's not like I simply failed to enable it.
EARLY_PRINTKis defined inarch/arm/Kconfig.debugand is selected when you specify the UART to use.Assuming you are only build testing, you could add the following for testing
EARLY_PRINTK:
Quoted 7 lines
CONFIG_DEBUG=yCONFIG_EARLY_UART_CHOICE_8250=yCONFIG_EARLY_UART_8250=yCONFIG_EARLY_PRINTK=yCONFIG_EARLY_UART_BASE_ADDRESS=CONFIG_EARLY_UART_8250_REG_SHIFT=0CONFIG_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
Hi Jan,
Quoted 49 lines · Jan Beulich
Quoted 40 lines · Julien Grall
Hi Jan,
Quoted 24 lines · Jan Beulich
Quoted 8 lines · Michal Orzel
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))` ```Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>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 ...
Quoted 6 lines
xen/include/asm-arm/early_printk.h +0
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__Quoted 6 lines
xen/include/asm-arm/early_printk.h line 15
Quoted 3 lines
xen/include/asm-arm/early_printk.h +1
-0+#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK ... a respective
Kconfigsetting, i.e. it's not like I simply failed to enable it.
EARLY_PRINTKis defined inarch/arm/Kconfig.debugand is selected when you specify the UART to use.Assuming you are only build testing, you could add the following for testing
EARLY_PRINTK:Quoted 7 lines
CONFIG_DEBUG=yCONFIG_EARLY_UART_CHOICE_8250=yCONFIG_EARLY_UART_8250=yCONFIG_EARLY_PRINTK=yCONFIG_EARLY_UART_BASE_ADDRESS=CONFIG_EARLY_UART_8250_REG_SHIFT=0CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
Quoted 4 lines
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?
Quoted 2 lines
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,
Signature · 1 line
Julien Grall
Quoted 31 lines · Julien Grall
Quoted 30 lines · Jan Beulich
Quoted 28 lines · Julien Grall
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
xen/include/asm-arm/early_printk.h +0
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__Quoted 6 lines
xen/include/asm-arm/early_printk.h line 15
Quoted 3 lines
xen/include/asm-arm/early_printk.h +1
-0+#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK ... a respective
Kconfigsetting, i.e. it's not like I simply failed to enable it.
EARLY_PRINTKis defined inarch/arm/Kconfig.debugand 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=yCONFIG_EARLY_UART_CHOICE_8250=yCONFIG_EARLY_UART_8250=yCONFIG_EARLY_PRINTK=yCONFIG_EARLY_UART_BASE_ADDRESS=CONFIG_EARLY_UART_8250_REG_SHIFT=0CONFIG_EARLY_PRINTK_INC="debug-8250.inc"
Quoted 6 lines
Quoted 4 lines
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
Hi Michal,
Quoted 10 lines · Michal Orzel
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))` ```
Quoted 4 lines
The fix is to include header <
xen/page-size.h> which now contains definitions for page/size/mask etc.Signed-off-by Michal Orzel <[email protected]>
Thanks a lot, this is fixing the compilation issues.
Cheers
Bertrand
Quoted 19 lines
---
xen/include/asm-arm/early_printk.h| 1 +1 file changed, 1 insertion(+)xen/include/asm-arm/early_printk.h +1
-0@@ -10,6 +10,7 @@#ifndef __ARM_EARLY_PRINTK_H__#define __ARM_EARLY_PRINTK_H__ +#include <xen/page-size.h> #ifdef CONFIG_EARLY_PRINTK Signature · 1 line
2.29.0