diff mbox series

[v5,3/7] xen/riscv: introduce dummy <asm/bug.h>

Message ID 82aa35ce27ca11076bbafbb565e9c85e1ce7624d.1678976127.git.oleksii.kurochko@gmail.com (mailing list archive)
State New, archived
Headers show
Series RISCV basic exception handling implementation | expand

Commit Message

Oleksii March 16, 2023, 2:39 p.m. UTC
<xen/lib.h> will be used in the patch "xen/riscv: introduce
decode_cause() stuff" and requires <asm/bug.h>

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V5:
 * the patch was introduced in the current patch series (V5)
---
 xen/arch/riscv/include/asm/bug.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/bug.h

Comments

Julien Grall March 21, 2023, 5:21 p.m. UTC | #1
Hi Oleksii,

On 16/03/2023 14:39, Oleksii Kurochko wrote:
> <xen/lib.h> will be used in the patch "xen/riscv: introduce
> decode_cause() stuff" and requires <asm/bug.h>
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
> Changes in V5:
>   * the patch was introduced in the current patch series (V5)
> ---
>   xen/arch/riscv/include/asm/bug.h | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>   create mode 100644 xen/arch/riscv/include/asm/bug.h
> 
> diff --git a/xen/arch/riscv/include/asm/bug.h b/xen/arch/riscv/include/asm/bug.h
> new file mode 100644
> index 0000000000..e8b1e40823
> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/bug.h
> @@ -0,0 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (C) 2012 Regents of the University of California
> + * Copyright (C) 2021-2023 Vates

I am a bit puzzled with those copyright given the header is empty.

But is there any reason this can't be folded in #6 or part of #6 moved 
forward?

> + *

NIT: Drop the line.

> + */
> +#ifndef _ASM_RISCV_BUG_H
> +#define _ASM_RISCV_BUG_H
> +
> +#endif /* _ASM_RISCV_BUG_H */
Oleksii March 22, 2023, 10:09 a.m. UTC | #2
On Tue, 2023-03-21 at 17:21 +0000, Julien Grall wrote:
> Hi Oleksii,
> 
> On 16/03/2023 14:39, Oleksii Kurochko wrote:
> > <xen/lib.h> will be used in the patch "xen/riscv: introduce
> > decode_cause() stuff" and requires <asm/bug.h>
> > 
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > ---
> > Changes in V5:
> >   * the patch was introduced in the current patch series (V5)
> > ---
> >   xen/arch/riscv/include/asm/bug.h | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> >   create mode 100644 xen/arch/riscv/include/asm/bug.h
> > 
> > diff --git a/xen/arch/riscv/include/asm/bug.h
> > b/xen/arch/riscv/include/asm/bug.h
> > new file mode 100644
> > index 0000000000..e8b1e40823
> > --- /dev/null
> > +++ b/xen/arch/riscv/include/asm/bug.h
> > @@ -0,0 +1,10 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (C) 2012 Regents of the University of California
> > + * Copyright (C) 2021-2023 Vates
> 
> I am a bit puzzled with those copyright given the header is empty.
> 
> But is there any reason this can't be folded in #6 or part of #6
> moved 
> forward?
Initially it was folded in #6 but in this case a build will be failed
after introduction of #5 as <asm/bug.h> is needed for <xen/lib.h>

Taking into account that <asm/bug.h> is fully re-written after
introduction of generic bug implementation we can remove copyrights
from header fully.

> 
> > + *
> 
> NIT: Drop the line.
Thanks. I'll do it in the next patch version.

> 
> > + */
> > +#ifndef _ASM_RISCV_BUG_H
> > +#define _ASM_RISCV_BUG_H
> > +
> > +#endif /* _ASM_RISCV_BUG_H */
>
Jan Beulich March 22, 2023, 10:27 a.m. UTC | #3
On 22.03.2023 11:09, Oleksii wrote:
> On Tue, 2023-03-21 at 17:21 +0000, Julien Grall wrote:
>> On 16/03/2023 14:39, Oleksii Kurochko wrote:
>>> <xen/lib.h> will be used in the patch "xen/riscv: introduce
>>> decode_cause() stuff" and requires <asm/bug.h>
>>>
>>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>>> ---
>>> Changes in V5:
>>>   * the patch was introduced in the current patch series (V5)
>>> ---
>>>   xen/arch/riscv/include/asm/bug.h | 10 ++++++++++
>>>   1 file changed, 10 insertions(+)
>>>   create mode 100644 xen/arch/riscv/include/asm/bug.h
>>>
>>> diff --git a/xen/arch/riscv/include/asm/bug.h
>>> b/xen/arch/riscv/include/asm/bug.h
>>> new file mode 100644
>>> index 0000000000..e8b1e40823
>>> --- /dev/null
>>> +++ b/xen/arch/riscv/include/asm/bug.h
>>> @@ -0,0 +1,10 @@
>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>> +/*
>>> + * Copyright (C) 2012 Regents of the University of California
>>> + * Copyright (C) 2021-2023 Vates
>>
>> I am a bit puzzled with those copyright given the header is empty.
>>
>> But is there any reason this can't be folded in #6 or part of #6
>> moved 
>> forward?
> Initially it was folded in #6 but in this case a build will be failed
> after introduction of #5 as <asm/bug.h> is needed for <xen/lib.h>

But what about the other option Julien mentioned, moving ahead the
later "filling" of asm/bug.h, so it wouldn't be introduced empty and
then (almost immediately) touched again to actually populate it?

Jan
Oleksii March 22, 2023, 1:14 p.m. UTC | #4
On Wed, 2023-03-22 at 11:27 +0100, Jan Beulich wrote:
> On 22.03.2023 11:09, Oleksii wrote:
> > On Tue, 2023-03-21 at 17:21 +0000, Julien Grall wrote:
> > > On 16/03/2023 14:39, Oleksii Kurochko wrote:
> > > > <xen/lib.h> will be used in the patch "xen/riscv: introduce
> > > > decode_cause() stuff" and requires <asm/bug.h>
> > > > 
> > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > > > ---
> > > > Changes in V5:
> > > >   * the patch was introduced in the current patch series (V5)
> > > > ---
> > > >   xen/arch/riscv/include/asm/bug.h | 10 ++++++++++
> > > >   1 file changed, 10 insertions(+)
> > > >   create mode 100644 xen/arch/riscv/include/asm/bug.h
> > > > 
> > > > diff --git a/xen/arch/riscv/include/asm/bug.h
> > > > b/xen/arch/riscv/include/asm/bug.h
> > > > new file mode 100644
> > > > index 0000000000..e8b1e40823
> > > > --- /dev/null
> > > > +++ b/xen/arch/riscv/include/asm/bug.h
> > > > @@ -0,0 +1,10 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > > +/*
> > > > + * Copyright (C) 2012 Regents of the University of California
> > > > + * Copyright (C) 2021-2023 Vates
> > > 
> > > I am a bit puzzled with those copyright given the header is
> > > empty.
> > > 
> > > But is there any reason this can't be folded in #6 or part of #6
> > > moved 
> > > forward?
> > Initially it was folded in #6 but in this case a build will be
> > failed
> > after introduction of #5 as <asm/bug.h> is needed for <xen/lib.h>
> 
> But what about the other option Julien mentioned, moving ahead the
> later "filling" of asm/bug.h, so it wouldn't be introduced empty and
> then (almost immediately) touched again to actually populate it?
I think I can move the content of <asm/bug.h> from #6 to the current
patch.

~ Oleksii
diff mbox series

Patch

diff --git a/xen/arch/riscv/include/asm/bug.h b/xen/arch/riscv/include/asm/bug.h
new file mode 100644
index 0000000000..e8b1e40823
--- /dev/null
+++ b/xen/arch/riscv/include/asm/bug.h
@@ -0,0 +1,10 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2012 Regents of the University of California
+ * Copyright (C) 2021-2023 Vates
+ *
+ */
+#ifndef _ASM_RISCV_BUG_H
+#define _ASM_RISCV_BUG_H
+
+#endif /* _ASM_RISCV_BUG_H */