diff mbox series

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

Message ID 6e1f19de1e8a276d487e8517810da3e8e68104ff.1700761381.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Enable build of full Xen for RISC-V | expand

Commit Message

Oleksii Kurochko Nov. 24, 2023, 10:30 a.m. UTC
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(+)

Comments

Jan Beulich Dec. 14, 2023, 4:24 p.m. UTC | #1
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
Oleksii Kurochko Dec. 14, 2023, 4:40 p.m. UTC | #2
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
diff mbox series

Patch

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 */