[PATCH v2 39/39] xen: fix compilation issue of serial.c

Oleksii Kurochko posted 39 patches 2 years ago
There is a newer version of this series
[PATCH v2 39/39] xen: fix compilation issue of serial.c
Posted by Oleksii Kurochko 2 years ago
The following issue occurs on RISC-V platforms:
drivers/char/serial.c: In function 'serial_tx_interrupt':
drivers/char/serial.c:88:9: error: implicit declaration of function 'cpu_relax' [-Werror=implicit-function-declaration]
   88 |         cpu_relax();

cpu_relax() is defined in <asm/processor.h> so it was added
an inclusion of the header to serial.c.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V2:
 - New commit introduced in V2
---
 xen/drivers/char/serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c
index 00efe69574..35df58fe33 100644
--- a/xen/drivers/char/serial.c
+++ b/xen/drivers/char/serial.c
@@ -13,6 +13,8 @@
 #include <xen/serial.h>
 #include <xen/cache.h>
 
+#include <asm/processor.h>
+
 /* Never drop characters, even if the async transmit buffer fills. */
 /* #define SERIAL_NEVER_DROP_CHARS 1 */
 
-- 
2.42.0
Re: [PATCH v2 39/39] xen: fix compilation issue of serial.c
Posted by Jan Beulich 2 years ago
On 24.11.2023 11:30, Oleksii Kurochko wrote:
> The following issue occurs on RISC-V platforms:
> drivers/char/serial.c: In function 'serial_tx_interrupt':
> drivers/char/serial.c:88:9: error: implicit declaration of function 'cpu_relax' [-Werror=implicit-function-declaration]
>    88 |         cpu_relax();
> 
> cpu_relax() is defined in <asm/processor.h> so it was added
> an inclusion of the header to serial.c.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

I think this needs moving ahead at least by one patch in the series,
but I guess I'll put it in ahead of most of the rest anyway.

Jan
Re: [PATCH v2 39/39] xen: fix compilation issue of serial.c
Posted by Oleksii 2 years ago
On Thu, 2023-12-14 at 17:24 +0100, Jan Beulich wrote:
> On 24.11.2023 11:30, Oleksii Kurochko wrote:
> > The following issue occurs on RISC-V platforms:
> > drivers/char/serial.c: In function 'serial_tx_interrupt':
> > drivers/char/serial.c:88:9: error: implicit declaration of function
> > 'cpu_relax' [-Werror=implicit-function-declaration]
> >    88 |         cpu_relax();
> > 
> > cpu_relax() is defined in <asm/processor.h> so it was added
> > an inclusion of the header to serial.c.
> > 
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> I think this needs moving ahead at least by one patch in the series,
> but I guess I'll put it in ahead of most of the rest anyway.
Thanks. I'll moved it.

~ Oleksii