All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Add ThunderX platform support
@ 2015-03-04  6:06 vijay.kilari
  2015-03-04  6:06 ` [PATCH v3 1/4] xen/arm: " vijay.kilari
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: vijay.kilari @ 2015-03-04  6:06 UTC (permalink / raw)
  To: Ian.Campbell, julien.grall, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, Vijaya Kumar K, manish.jaggi, vijay.kilari

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

Changes in v3:
 - Made ThunderX GSER region mapping as separate patch
 - Updated patch 3 commit message

Changes in v2:
 - Updated patch 3 commit message
 - Updated processor_implementers[] with implementor info
   in xen/arch/arm/setup.c

Changes in v1:
 - Add support for ThunderX platform
 - Add early printk support
 - Add psci-0.2 check while parsing dt node


Vijaya Kumar K (4):
  xen/arm: Add ThunderX platform support
  xen/arm: Add GSER region to ThunderX platform mapping
  xen/arm: Add early printk support for ThunderX platform
  xen/arm: Don't pass the PSCI-0.2 node to DOM0

 xen/arch/arm/Rules.mk             |    4 +++
 xen/arch/arm/domain_build.c       |    1 +
 xen/arch/arm/platforms/Makefile   |    1 +
 xen/arch/arm/platforms/thunderx.c |   67 +++++++++++++++++++++++++++++++++++++
 xen/arch/arm/setup.c              |    1 +
 5 files changed, 74 insertions(+)
 create mode 100644 xen/arch/arm/platforms/thunderx.c

-- 
1.7.9.5

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

* [PATCH v3 1/4] xen/arm: Add ThunderX platform support
  2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
@ 2015-03-04  6:06 ` vijay.kilari
  2015-03-04  6:06 ` [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping vijay.kilari
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: vijay.kilari @ 2015-03-04  6:06 UTC (permalink / raw)
  To: Ian.Campbell, julien.grall, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, Vijaya Kumar K, manish.jaggi, vijay.kilari

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

Add basic support for Cavium ThunderX platform

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
---
v3 changes:
 - Made Thunderx specific mappings as separate patch
 - Improved printk error message

v2 changes:
 - Update processor_implementers[]
---
 xen/arch/arm/platforms/Makefile   |    1 +
 xen/arch/arm/platforms/thunderx.c |   41 +++++++++++++++++++++++++++++++++++++
 xen/arch/arm/setup.c              |    1 +
 3 files changed, 43 insertions(+)

diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index e173fec..d9f98f9 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_ARM_32) += sunxi.o
 obj-$(CONFIG_ARM_32) += rcar2.o
 obj-$(CONFIG_ARM_64) += seattle.o
 obj-$(CONFIG_ARM_64) += xgene-storm.o
+obj-$(CONFIG_ARM_64) += thunderx.o
diff --git a/xen/arch/arm/platforms/thunderx.c b/xen/arch/arm/platforms/thunderx.c
new file mode 100644
index 0000000..be6f24f
--- /dev/null
+++ b/xen/arch/arm/platforms/thunderx.c
@@ -0,0 +1,41 @@
+/*
+ * xen/arch/arm/platforms/thunderx.c
+ *
+ * Cavium Thunder specific settings
+ *
+ * Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
+ * Copyright (c) 2015 Cavium Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <asm/platform.h>
+
+static const char * const thunderx_dt_compat[] __initconst =
+{
+    "cavium,thunder-88xx",
+    NULL
+};
+
+PLATFORM_START(thunderx, "THUNDERX")
+    .compatible = thunderx_dt_compat,
+    .dom0_gnttab_start = 0x40000000000,
+    .dom0_gnttab_size = 0x20000,
+PLATFORM_END
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 9a1c285..b905c9f 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -71,6 +71,7 @@ static void __init init_idle_domain(void)
 static const char * __initdata processor_implementers[] = {
     ['A'] = "ARM Limited",
     ['B'] = "Broadcom Corporation",
+    ['C'] = "Cavium Inc.",
     ['D'] = "Digital Equipment Corp",
     ['M'] = "Motorola, Freescale Semiconductor Inc.",
     ['P'] = "Applied Micro",
-- 
1.7.9.5

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

* [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
  2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
  2015-03-04  6:06 ` [PATCH v3 1/4] xen/arm: " vijay.kilari
@ 2015-03-04  6:06 ` vijay.kilari
  2015-03-05 16:46   ` Ian Campbell
  2015-03-04  6:06 ` [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform vijay.kilari
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: vijay.kilari @ 2015-03-04  6:06 UTC (permalink / raw)
  To: Ian.Campbell, julien.grall, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, Vijaya Kumar K, manish.jaggi, vijay.kilari

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

Add GSER region to thunderx platfrom specific mappings.
This region is not mentioned in DT. This is required by
PCI driver to detect and configure pci devices attached.

In future we can remove this mapping, if pci driver
in Dom does not require this.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
---
 xen/arch/arm/platforms/thunderx.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/xen/arch/arm/platforms/thunderx.c b/xen/arch/arm/platforms/thunderx.c
index be6f24f..563d01b 100644
--- a/xen/arch/arm/platforms/thunderx.c
+++ b/xen/arch/arm/platforms/thunderx.c
@@ -19,6 +19,31 @@
 
 #include <asm/platform.h>
 
+static int thunderx_specific_mapping(struct domain *d)
+{
+    paddr_t addr;
+    u64 size;
+    int res;
+
+    /* Mapping GSER region required for Dom0 */
+    addr = 0x87e090000000;
+    size = 0xd000000;
+
+    res = map_mmio_regions(d,
+                           paddr_to_pfn(addr & PAGE_MASK),
+                           DIV_ROUND_UP(size, PAGE_SIZE),
+                           paddr_to_pfn(addr & PAGE_MASK));
+    if ( res )
+    {
+         printk(XENLOG_ERR "Unable to map GSER region to dom%d"
+                " 0x%"PRIpaddr" - 0x%"PRIpaddr"\n",
+                d->domain_id,
+                addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1);
+    }
+
+    return 0;
+}
+
 static const char * const thunderx_dt_compat[] __initconst =
 {
     "cavium,thunder-88xx",
@@ -27,6 +52,7 @@ static const char * const thunderx_dt_compat[] __initconst =
 
 PLATFORM_START(thunderx, "THUNDERX")
     .compatible = thunderx_dt_compat,
+    .specific_mapping = thunderx_specific_mapping,
     .dom0_gnttab_start = 0x40000000000,
     .dom0_gnttab_size = 0x20000,
 PLATFORM_END
-- 
1.7.9.5

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

* [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform
  2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
  2015-03-04  6:06 ` [PATCH v3 1/4] xen/arm: " vijay.kilari
  2015-03-04  6:06 ` [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping vijay.kilari
@ 2015-03-04  6:06 ` vijay.kilari
  2015-03-05  9:15   ` Julien Grall
  2015-03-04  6:06 ` [PATCH v3 4/4] xen/arm: Don't pass the PSCI-0.2 node to DOM0 vijay.kilari
  2015-03-05 17:26 ` [PATCH v3 0/4] Add ThunderX platform support Ian Campbell
  4 siblings, 1 reply; 12+ messages in thread
From: vijay.kilari @ 2015-03-04  6:06 UTC (permalink / raw)
  To: Ian.Campbell, julien.grall, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, Vijaya Kumar K, manish.jaggi, vijay.kilari

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

ThunderX platform uses pl011 uart.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/Rules.mk |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index c7bd227..54efa91 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -113,6 +113,10 @@ ifeq ($(CONFIG_EARLY_PRINTK), lager)
 EARLY_PRINTK_INC := scif
 EARLY_UART_BASE_ADDRESS := 0xe6e60000
 endif
+ifeq ($(CONFIG_EARLY_PRINTK), thunderx)
+EARLY_PRINTK_INC := pl011
+EARLY_UART_BASE_ADDRESS := 0x87e024000000
+endif
 
 ifneq ($(EARLY_PRINTK_INC),)
 EARLY_PRINTK := y
-- 
1.7.9.5

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

* [PATCH v3 4/4] xen/arm: Don't pass the PSCI-0.2 node to DOM0
  2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
                   ` (2 preceding siblings ...)
  2015-03-04  6:06 ` [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform vijay.kilari
@ 2015-03-04  6:06 ` vijay.kilari
  2015-03-05 17:26 ` [PATCH v3 0/4] Add ThunderX platform support Ian Campbell
  4 siblings, 0 replies; 12+ messages in thread
From: vijay.kilari @ 2015-03-04  6:06 UTC (permalink / raw)
  To: Ian.Campbell, julien.grall, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, Vijaya Kumar K, manish.jaggi, vijay.kilari

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

psci node is generated by xen for dom0.
if the host device tree has psci-0.2 skip parsing this node
and avoid copying from host device tree to dom0 device tree.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3 changes:
 - Updated commit message
---
 xen/arch/arm/domain_build.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 9f1f59f..4422cfb 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1029,6 +1029,7 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo,
         DT_MATCH_COMPATIBLE("xen,multiboot-module"),
         DT_MATCH_COMPATIBLE("multiboot,module"),
         DT_MATCH_COMPATIBLE("arm,psci"),
+        DT_MATCH_COMPATIBLE("arm,psci-0.2"),
         DT_MATCH_PATH("/cpus"),
         DT_MATCH_TYPE("memory"),
         /* The memory mapped timer is not supported by Xen. */
-- 
1.7.9.5

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

* Re: [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform
  2015-03-04  6:06 ` [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform vijay.kilari
@ 2015-03-05  9:15   ` Julien Grall
  2015-03-05 16:40     ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Julien Grall @ 2015-03-05  9:15 UTC (permalink / raw)
  To: Vijay Kilari
  Cc: Ian.Campbell, stefano.stabellini, Prasun.Kapoor, Vijaya Kumar K,
	tim, xen-devel, stefano.stabellini, manish.jaggi


[-- Attachment #1.1: Type: text/plain, Size: 914 bytes --]

Hello Vijay,

On 4 Mar 2015 06:06, <vijay.kilari@gmail.com> wrote:
>
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>
> ThunderX platform uses pl011 uart.

You need to update docs/misc/arm/early-printk.txt.

Regards,

> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  xen/arch/arm/Rules.mk |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index c7bd227..54efa91 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -113,6 +113,10 @@ ifeq ($(CONFIG_EARLY_PRINTK), lager)
>  EARLY_PRINTK_INC := scif
>  EARLY_UART_BASE_ADDRESS := 0xe6e60000
>  endif
> +ifeq ($(CONFIG_EARLY_PRINTK), thunderx)
> +EARLY_PRINTK_INC := pl011
> +EARLY_UART_BASE_ADDRESS := 0x87e024000000
> +endif
>
>  ifneq ($(EARLY_PRINTK_INC),)
>  EARLY_PRINTK := y
> --
> 1.7.9.5
>

[-- Attachment #1.2: Type: text/html, Size: 1461 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform
  2015-03-05  9:15   ` Julien Grall
@ 2015-03-05 16:40     ` Ian Campbell
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Campbell @ 2015-03-05 16:40 UTC (permalink / raw)
  To: Julien Grall
  Cc: Vijay Kilari, stefano.stabellini, Prasun.Kapoor, Vijaya Kumar K,
	tim, xen-devel, stefano.stabellini, manish.jaggi

On Thu, 2015-03-05 at 09:15 +0000, Julien Grall wrote:
> Hello Vijay,
> 
> 
> On 4 Mar 2015 06:06, <vijay.kilari@gmail.com> wrote:
> >
> > From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >
> > ThunderX platform uses pl011 uart.
> 
> You need to update docs/misc/arm/early-printk.txt.

I'll insert

"- thunderx: printk with pl011 for Cavium ThunderX processor."

as I commit. If that doesn't suit then please followup with a
correction ;-)

> 
> Regards,
> 
> 
> > Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> >  xen/arch/arm/Rules.mk |    4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> > index c7bd227..54efa91 100644
> > --- a/xen/arch/arm/Rules.mk
> > +++ b/xen/arch/arm/Rules.mk
> > @@ -113,6 +113,10 @@ ifeq ($(CONFIG_EARLY_PRINTK), lager)
> >  EARLY_PRINTK_INC := scif
> >  EARLY_UART_BASE_ADDRESS := 0xe6e60000
> >  endif
> > +ifeq ($(CONFIG_EARLY_PRINTK), thunderx)
> > +EARLY_PRINTK_INC := pl011
> > +EARLY_UART_BASE_ADDRESS := 0x87e024000000
> > +endif
> >
> >  ifneq ($(EARLY_PRINTK_INC),)
> >  EARLY_PRINTK := y
> > --
> > 1.7.9.5
> >
> 
> 

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

* Re: [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
  2015-03-04  6:06 ` [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping vijay.kilari
@ 2015-03-05 16:46   ` Ian Campbell
  2015-03-05 17:10     ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2015-03-05 16:46 UTC (permalink / raw)
  To: vijay.kilari
  Cc: stefano.stabellini, Prasun.Kapoor, vijaya.kumar, julien.grall,
	tim, xen-devel, stefano.stabellini, manish.jaggi

On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@gmail.com wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> 
> Add GSER region to thunderx platfrom specific mappings.
> This region is not mentioned in DT. This is required by
> PCI driver to detect and configure pci devices attached.
> 
> In future we can remove this mapping, if pci driver
> in Dom does not require this.

How do we know what the PCI driver in dom0 needs? I don't think we can,
so we can in effect never remove this specific mapping, which is a
shame.

Unless you have some scheme in mind which would allow us to do so?

IMHO by far the best solution would be to add this device to the DTB so
that it is correctly mapped. I'm not quite sure what that will look like
since thne mainline DTB doesn't have the PCI node at all.

> 
> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> ---
>  xen/arch/arm/platforms/thunderx.c |   26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/xen/arch/arm/platforms/thunderx.c b/xen/arch/arm/platforms/thunderx.c
> index be6f24f..563d01b 100644
> --- a/xen/arch/arm/platforms/thunderx.c
> +++ b/xen/arch/arm/platforms/thunderx.c
> @@ -19,6 +19,31 @@
>  
>  #include <asm/platform.h>
>  
> +static int thunderx_specific_mapping(struct domain *d)
> +{
> +    paddr_t addr;
> +    u64 size;
> +    int res;
> +
> +    /* Mapping GSER region required for Dom0 */
> +    addr = 0x87e090000000;
> +    size = 0xd000000;
> +
> +    res = map_mmio_regions(d,
> +                           paddr_to_pfn(addr & PAGE_MASK),
> +                           DIV_ROUND_UP(size, PAGE_SIZE),
> +                           paddr_to_pfn(addr & PAGE_MASK));
> +    if ( res )
> +    {
> +         printk(XENLOG_ERR "Unable to map GSER region to dom%d"
> +                " 0x%"PRIpaddr" - 0x%"PRIpaddr"\n",
> +                d->domain_id,
> +                addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1);
> +    }
> +
> +    return 0;
> +}
> +
>  static const char * const thunderx_dt_compat[] __initconst =
>  {
>      "cavium,thunder-88xx",
> @@ -27,6 +52,7 @@ static const char * const thunderx_dt_compat[] __initconst =
>  
>  PLATFORM_START(thunderx, "THUNDERX")
>      .compatible = thunderx_dt_compat,
> +    .specific_mapping = thunderx_specific_mapping,
>      .dom0_gnttab_start = 0x40000000000,
>      .dom0_gnttab_size = 0x20000,
>  PLATFORM_END

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

* Re: [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
  2015-03-05 16:46   ` Ian Campbell
@ 2015-03-05 17:10     ` Ian Campbell
  2015-03-17 13:02       ` Vijay Kilari
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2015-03-05 17:10 UTC (permalink / raw)
  To: vijay.kilari
  Cc: stefano.stabellini, Prasun.Kapoor, vijaya.kumar, julien.grall,
	tim, xen-devel, stefano.stabellini, manish.jaggi

On Thu, 2015-03-05 at 16:46 +0000, Ian Campbell wrote:
> On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@gmail.com wrote:
> > From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> > 
> > Add GSER region to thunderx platfrom specific mappings.
> > This region is not mentioned in DT. This is required by
> > PCI driver to detect and configure pci devices attached.
> > 
> > In future we can remove this mapping, if pci driver
> > in Dom does not require this.
> 
> How do we know what the PCI driver in dom0 needs? I don't think we can,
> so we can in effect never remove this specific mapping, which is a
> shame.
> 
> Unless you have some scheme in mind which would allow us to do so?
> 
> IMHO by far the best solution would be to add this device to the DTB so
> that it is correctly mapped. I'm not quite sure what that will look like
> since thne mainline DTB doesn't have the PCI node at all.

Looking at a more recent DTB which I have access to it seems like
0x87e090000000 is correctly covered by a ranges entry on the PCI
controller node.

So I think all which is needed is a) to use this updated DTB and b) my
series "xen: arm: Parse PCI DT nodes' ranges and interrupt-map" from
last October which, as it happens, I've been working on bringing up to
date yesterday and today (one more thing to clean up before I repost).

Ian.

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

* Re: [PATCH v3 0/4] Add ThunderX platform support
  2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
                   ` (3 preceding siblings ...)
  2015-03-04  6:06 ` [PATCH v3 4/4] xen/arm: Don't pass the PSCI-0.2 node to DOM0 vijay.kilari
@ 2015-03-05 17:26 ` Ian Campbell
  4 siblings, 0 replies; 12+ messages in thread
From: Ian Campbell @ 2015-03-05 17:26 UTC (permalink / raw)
  To: vijay.kilari
  Cc: stefano.stabellini, Prasun.Kapoor, vijaya.kumar, julien.grall,
	tim, xen-devel, stefano.stabellini, manish.jaggi

On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@gmail.com wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

Thanks, applied all but the GSER one, which I had a comment on.

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

* Re: [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
  2015-03-05 17:10     ` Ian Campbell
@ 2015-03-17 13:02       ` Vijay Kilari
  2015-03-17 13:53         ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Vijay Kilari @ 2015-03-17 13:02 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Stefano Stabellini, Prasun Kapoor, Vijaya Kumar K, Julien Grall,
	Tim Deegan, xen-devel, Stefano Stabellini, manish.jaggi

Hi Ian,

On Thu, Mar 5, 2015 at 10:40 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> On Thu, 2015-03-05 at 16:46 +0000, Ian Campbell wrote:
>> On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@gmail.com wrote:
>> > From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>> >
>> > Add GSER region to thunderx platfrom specific mappings.
>> > This region is not mentioned in DT. This is required by
>> > PCI driver to detect and configure pci devices attached.
>> >
>> > In future we can remove this mapping, if pci driver
>> > in Dom does not require this.
>>
>> How do we know what the PCI driver in dom0 needs? I don't think we can,
>> so we can in effect never remove this specific mapping, which is a
>> shame.
>>
>> Unless you have some scheme in mind which would allow us to do so?
>>
>> IMHO by far the best solution would be to add this device to the DTB so
>> that it is correctly mapped. I'm not quite sure what that will look like
>> since thne mainline DTB doesn't have the PCI node at all.
>
> Looking at a more recent DTB which I have access to it seems like
> 0x87e090000000 is correctly covered by a ranges entry on the PCI
> controller node.

Where did you find recent DTB?.  AFAIK, this region does not fall
under any pci controller range.

>
> So I think all which is needed is a) to use this updated DTB and b) my
> series "xen: arm: Parse PCI DT nodes' ranges and interrupt-map" from
> last October which, as it happens, I've been working on bringing up to
> date yesterday and today (one more thing to clean up before I repost).

Because it is not covered under any PCI ranges, your patch series
still does not help.
Infact, this is common region for SERDES configuration so cannot bind
to any particular pci controller range.

Regards
Vijay

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

* Re: [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
  2015-03-17 13:02       ` Vijay Kilari
@ 2015-03-17 13:53         ` Ian Campbell
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Campbell @ 2015-03-17 13:53 UTC (permalink / raw)
  To: Vijay Kilari
  Cc: Stefano Stabellini, Prasun Kapoor, Vijaya Kumar K, Julien Grall,
	Tim Deegan, xen-devel, Stefano Stabellini, manish.jaggi

On Tue, 2015-03-17 at 18:32 +0530, Vijay Kilari wrote:
> Hi Ian,
> 
> On Thu, Mar 5, 2015 at 10:40 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> > On Thu, 2015-03-05 at 16:46 +0000, Ian Campbell wrote:
> >> On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@gmail.com wrote:
> >> > From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >> >
> >> > Add GSER region to thunderx platfrom specific mappings.
> >> > This region is not mentioned in DT. This is required by
> >> > PCI driver to detect and configure pci devices attached.
> >> >
> >> > In future we can remove this mapping, if pci driver
> >> > in Dom does not require this.
> >>
> >> How do we know what the PCI driver in dom0 needs? I don't think we can,
> >> so we can in effect never remove this specific mapping, which is a
> >> shame.
> >>
> >> Unless you have some scheme in mind which would allow us to do so?
> >>
> >> IMHO by far the best solution would be to add this device to the DTB so
> >> that it is correctly mapped. I'm not quite sure what that will look like
> >> since thne mainline DTB doesn't have the PCI node at all.
> >
> > Looking at a more recent DTB which I have access to it seems like
> > 0x87e090000000 is correctly covered by a ranges entry on the PCI
> > controller node.
> 
> Where did you find recent DTB?.  AFAIK, this region does not fall
> under any pci controller range.

It was in the tree you guys sent me a little while back.
ThunderX_Release_v0.3.tar.gz IIRC.

thunder-88xx-2n.dtsi in that contains a PCI node "pcie0:
pcie0@0x8480,00000000" with ranges containing this entry:
                         <0x03000000 0x87e0 0x00000000 0x87e0 0x00000000 0x01 0x00000000>,

Which covers the range from 0x87e000000000 to 0xe7f00000000, i.e.
covering this region at 0x87e090000000.

> > So I think all which is needed is a) to use this updated DTB and b) my
> > series "xen: arm: Parse PCI DT nodes' ranges and interrupt-map" from
> > last October which, as it happens, I've been working on bringing up to
> > date yesterday and today (one more thing to clean up before I repost).
> 
> Because it is not covered under any PCI ranges, your patch series
> still does not help.
> Infact, this is common region for SERDES configuration so cannot bind
> to any particular pci controller range.

Even if that turns out to be the case then surely this regions needs to
be defined somehow in the DT else how could it be discovered.

Ian.

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

end of thread, other threads:[~2015-03-17 13:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04  6:06 [PATCH v3 0/4] Add ThunderX platform support vijay.kilari
2015-03-04  6:06 ` [PATCH v3 1/4] xen/arm: " vijay.kilari
2015-03-04  6:06 ` [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping vijay.kilari
2015-03-05 16:46   ` Ian Campbell
2015-03-05 17:10     ` Ian Campbell
2015-03-17 13:02       ` Vijay Kilari
2015-03-17 13:53         ` Ian Campbell
2015-03-04  6:06 ` [PATCH v3 3/4] xen/arm: Add early printk support for ThunderX platform vijay.kilari
2015-03-05  9:15   ` Julien Grall
2015-03-05 16:40     ` Ian Campbell
2015-03-04  6:06 ` [PATCH v3 4/4] xen/arm: Don't pass the PSCI-0.2 node to DOM0 vijay.kilari
2015-03-05 17:26 ` [PATCH v3 0/4] Add ThunderX platform support Ian Campbell

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.