All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-4 0/2] decodetree: Support multiple inclusion
@ 2018-11-10 21:13 Philippe Mathieu-Daudé
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section Philippe Mathieu-Daudé
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard Philippe Mathieu-Daudé
  0 siblings, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-10 21:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Philippe Mathieu-Daudé, qemu-devel

Hi Richard, I noticed this issue when using decodetree with multiple ISAs.

Regards,

Phil.

Philippe Mathieu-Daudé (2):
  MAINTAINERS: Add scripts/decodetree.py to the TCG section
  decodetree: Add multiple include guard

 MAINTAINERS           | 1 +
 scripts/decodetree.py | 5 +++++
 2 files changed, 6 insertions(+)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section
  2018-11-10 21:13 [Qemu-devel] [PATCH for-4 0/2] decodetree: Support multiple inclusion Philippe Mathieu-Daudé
@ 2018-11-10 21:13 ` Philippe Mathieu-Daudé
  2018-11-11 11:27   ` Richard Henderson
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-10 21:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Philippe Mathieu-Daudé, qemu-devel

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 126fe0be7e..45e4bfcd87 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -112,6 +112,7 @@ S: Maintained
 F: cpus.c
 F: exec.c
 F: accel/tcg/
+F: scripts/decodetree.py
 F: include/exec/cpu*.h
 F: include/exec/exec-all.h
 F: include/exec/helper*.h
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard
  2018-11-10 21:13 [Qemu-devel] [PATCH for-4 0/2] decodetree: Support multiple inclusion Philippe Mathieu-Daudé
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section Philippe Mathieu-Daudé
@ 2018-11-10 21:13 ` Philippe Mathieu-Daudé
  2018-11-11 11:26   ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-10 21:13 UTC (permalink / raw)
  To: Richard Henderson
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, Peter Crosthwaite, Paolo Bonzini, Eduardo Habkost,
	Cleber Rosa

It is necessary when splitting an ISA, or when using multiple ISAs.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 scripts/decodetree.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 0bc73b5990..5dea15e7a5 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1030,7 +1030,11 @@ def main():
     else:
         output_fd = sys.stdout
 
+    hdr_guard = filename.split(os.path.sep)[-1].upper().replace('.', '_') + "_H"
+
     output_autogen()
+    output('#ifndef ' + hdr_guard + '\n')
+    output('#define ' + hdr_guard + '\n')
     for n in sorted(arguments.keys()):
         f = arguments[n]
         f.output_def()
@@ -1066,6 +1070,7 @@ def main():
     t.output_code(4, False, 0, 0)
 
     output('}\n')
+    output('#endif /* ' + hdr_guard + ' */\n')
 
     if output_file:
         output_fd.close()
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard Philippe Mathieu-Daudé
@ 2018-11-11 11:26   ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2018-11-11 11:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Richard Henderson
  Cc: Eduardo Habkost, Peter Crosthwaite, qemu-devel, Cleber Rosa,
	Paolo Bonzini

On 11/10/18 10:13 PM, Philippe Mathieu-Daudé wrote:
> It is necessary when splitting an ISA, or when using multiple ISAs.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  scripts/decodetree.py | 5 +++++
>  1 file changed, 5 insertions(+)

I guess I have no problems with this, but can you explain
when these headers get included more than once?


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section
  2018-11-10 21:13 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section Philippe Mathieu-Daudé
@ 2018-11-11 11:27   ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2018-11-11 11:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Richard Henderson; +Cc: qemu-devel

On 11/10/18 10:13 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)

Queued, thanks.

r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-11 11:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10 21:13 [Qemu-devel] [PATCH for-4 0/2] decodetree: Support multiple inclusion Philippe Mathieu-Daudé
2018-11-10 21:13 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section Philippe Mathieu-Daudé
2018-11-11 11:27   ` Richard Henderson
2018-11-10 21:13 ` [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard Philippe Mathieu-Daudé
2018-11-11 11:26   ` Richard Henderson

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.