All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	julien.grall@arm.com, sstabellini@kernel.org
Subject: [PATCH V1 0/2] Add ability to handle nodes with interrupts-extended property
Date: Tue, 21 May 2019 20:37:32 +0300	[thread overview]
Message-ID: <1558460254-7127-1-git-send-email-olekstysh@gmail.com> (raw)

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

Hello, all.

The purpose of this small series is to add minimal required support for Xen to be able
to handle device-tree nodes with "interrupts-extended" property [1].

The "interrupts-extended" property is a special form for use when a node needs
to reference multiple interrupt parents.

But, there are cases when "interrupts-extended" property is used for "outside /soc node"
with a single interrupt parent as an equivalent of pairs ("interrupt-parent" + "interrupts").

----------
Tested on R-Car Gen2 based board using current staging (commit 91f86f8634f99abd8f242943e62452211a09fa0a).
Log (with debug enabled) shows that Xen recognized ARCH timer interrupts represented with "interrupts-extended" property:

timer {
	compatible = "arm,armv7-timer";
	interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
};

Xen 4.13-unstable
(XEN) Xen version 4.13-unstable (otyshchenko@) (arm-linux-gnueabi-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]) debug=y  Tue May 21 17:08:47 E9
(XEN) Latest ChangeSet: Thu Feb 2 11:59:05 2017 +0200 git:85faf88
(XEN) build-id: f0739ad25a57b50d508afd5e22e93af3d052acbf
(XEN) Processor: 413fc0f2: "ARM Limited", variant: 0x3, part 0xc0f, rev 0x2
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00001131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01240000 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 11112131 10011142 00000000
(XEN) Using SMC Calling Convention v1.0
(XEN) Using PSCI v1.0
(XEN) SMP: Allowing 8 CPUs
(XEN) dt_device_get_raw_irq: dev=/timer, index=0
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000d...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=1
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000e...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=2
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000b...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=3
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000a...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 10000 KHz
----------

[1] https://elixir.bootlin.com/linux/v5.2-rc1/source/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Oleksandr Tyshchenko (2):
  xen/device-tree: Add dt_count_phandle_with_args helper
  xen/device-tree: Add ability to handle nodes with interrupts-extended
    prop

 xen/common/device_tree.c      | 43 ++++++++++++++++++++++++++++++++++++++++---
 xen/include/xen/device_tree.h | 19 +++++++++++++++++++
 2 files changed, 59 insertions(+), 3 deletions(-)

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	julien.grall@arm.com, sstabellini@kernel.org
Subject: [Xen-devel] [PATCH V1 0/2] Add ability to handle nodes with interrupts-extended property
Date: Tue, 21 May 2019 20:37:32 +0300	[thread overview]
Message-ID: <1558460254-7127-1-git-send-email-olekstysh@gmail.com> (raw)
Message-ID: <20190521173732.vKKIVWEnNOXI5-SgJOC5AZ0laz3vaxeqjQ6oYwB9n00@z> (raw)

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

Hello, all.

The purpose of this small series is to add minimal required support for Xen to be able
to handle device-tree nodes with "interrupts-extended" property [1].

The "interrupts-extended" property is a special form for use when a node needs
to reference multiple interrupt parents.

But, there are cases when "interrupts-extended" property is used for "outside /soc node"
with a single interrupt parent as an equivalent of pairs ("interrupt-parent" + "interrupts").

----------
Tested on R-Car Gen2 based board using current staging (commit 91f86f8634f99abd8f242943e62452211a09fa0a).
Log (with debug enabled) shows that Xen recognized ARCH timer interrupts represented with "interrupts-extended" property:

timer {
	compatible = "arm,armv7-timer";
	interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
			      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
};

Xen 4.13-unstable
(XEN) Xen version 4.13-unstable (otyshchenko@) (arm-linux-gnueabi-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]) debug=y  Tue May 21 17:08:47 E9
(XEN) Latest ChangeSet: Thu Feb 2 11:59:05 2017 +0200 git:85faf88
(XEN) build-id: f0739ad25a57b50d508afd5e22e93af3d052acbf
(XEN) Processor: 413fc0f2: "ARM Limited", variant: 0x3, part 0xc0f, rev 0x2
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00001131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01240000 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 11112131 10011142 00000000
(XEN) Using SMC Calling Convention v1.0
(XEN) Using PSCI v1.0
(XEN) SMP: Allowing 8 CPUs
(XEN) dt_device_get_raw_irq: dev=/timer, index=0
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000d...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=1
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000e...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=2
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000b...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) dt_device_get_raw_irq: dev=/timer, index=3
(XEN)  using 'interrupts-extended' property
(XEN)  intspec=1 intsize=3
(XEN) dt_irq_map_raw: par=/soc/interrupt-controller@f1001000,intspec=[0x00000001 0x0000000a...],ointsize=3
(XEN) dt_irq_map_raw: ipar=/soc/interrupt-controller@f1001000, size=3
(XEN)  -> addrsize=0
(XEN)  -> got it !
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 10000 KHz
----------

[1] https://elixir.bootlin.com/linux/v5.2-rc1/source/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Oleksandr Tyshchenko (2):
  xen/device-tree: Add dt_count_phandle_with_args helper
  xen/device-tree: Add ability to handle nodes with interrupts-extended
    prop

 xen/common/device_tree.c      | 43 ++++++++++++++++++++++++++++++++++++++++---
 xen/include/xen/device_tree.h | 19 +++++++++++++++++++
 2 files changed, 59 insertions(+), 3 deletions(-)

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-05-21 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 17:37 Oleksandr Tyshchenko [this message]
2019-05-21 17:37 ` [Xen-devel] [PATCH V1 0/2] Add ability to handle nodes with interrupts-extended property Oleksandr Tyshchenko
2019-05-21 17:37 ` [PATCH V1 1/2] xen/device-tree: Add dt_count_phandle_with_args helper Oleksandr Tyshchenko
2019-05-21 17:37   ` [Xen-devel] " Oleksandr Tyshchenko
2019-05-29 17:34   ` Julien Grall
2019-05-29 17:34     ` [Xen-devel] " Julien Grall
2019-05-21 17:37 ` [PATCH V1 2/2] xen/device-tree: Add ability to handle nodes with interrupts-extended prop Oleksandr Tyshchenko
2019-05-21 17:37   ` [Xen-devel] " Oleksandr Tyshchenko
2019-05-29 17:44   ` Julien Grall
2019-05-29 17:44     ` [Xen-devel] " Julien Grall
2019-05-29 17:58     ` Oleksandr
2019-05-29 17:58       ` [Xen-devel] " Oleksandr
2019-05-29 18:18       ` Julien Grall
2019-05-29 18:18         ` [Xen-devel] " Julien Grall
2019-06-10 19:45         ` Julien Grall
2019-06-11 16:15           ` Oleksandr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558460254-7127-1-git-send-email-olekstysh@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.