All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add ThunderX platform support
@ 2015-02-18 12:19 vijay.kilari
  2015-02-18 12:19 ` [PATCH v2 1/3] xen/arm: " vijay.kilari
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: vijay.kilari @ 2015-02-18 12:19 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 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 (3):
  xen/arm: Add ThunderX platform support
  xen/arm: Add early printk support for ThunderX platform
  xen/arm: Skip parsing psci-0.2 from host device tree

 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 |   66 +++++++++++++++++++++++++++++++++++++
 xen/arch/arm/setup.c              |    1 +
 5 files changed, 73 insertions(+)
 create mode 100644 xen/arch/arm/platforms/thunderx.c

-- 
1.7.9.5

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

* [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-02-18 12:19 [PATCH v2 0/3] Add ThunderX platform support vijay.kilari
@ 2015-02-18 12:19 ` vijay.kilari
  2015-02-18 12:38   ` Julien Grall
  2015-02-18 12:19 ` [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform vijay.kilari
  2015-02-18 12:19 ` [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree vijay.kilari
  2 siblings, 1 reply; 13+ messages in thread
From: vijay.kilari @ 2015-02-18 12:19 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>
---
 xen/arch/arm/platforms/Makefile   |    1 +
 xen/arch/arm/platforms/thunderx.c |   66 +++++++++++++++++++++++++++++++++++++
 xen/arch/arm/setup.c              |    1 +
 3 files changed, 68 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..96560e1
--- /dev/null
+++ b/xen/arch/arm/platforms/thunderx.c
@@ -0,0 +1,66 @@
+/*
+ * 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 int thunderx_specific_mapping(struct domain *d)
+{
+    uint64_t addr, size;
+    int res;
+
+    /* Mappings 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 to dom%d region"
+                " 0x%"PRIx64" - 0x%"PRIx64"\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",
+    NULL
+};
+
+PLATFORM_START(thunderx, "THUNDERX")
+    .compatible = thunderx_dt_compat,
+    .specific_mapping = thunderx_specific_mapping,
+    .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 a916ca6..43b626b 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -66,6 +66,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] 13+ messages in thread

* [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform
  2015-02-18 12:19 [PATCH v2 0/3] Add ThunderX platform support vijay.kilari
  2015-02-18 12:19 ` [PATCH v2 1/3] xen/arm: " vijay.kilari
@ 2015-02-18 12:19 ` vijay.kilari
  2015-02-23 17:51   ` Ian Campbell
  2015-02-18 12:19 ` [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree vijay.kilari
  2 siblings, 1 reply; 13+ messages in thread
From: vijay.kilari @ 2015-02-18 12:19 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>
---
 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] 13+ messages in thread

* [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree
  2015-02-18 12:19 [PATCH v2 0/3] Add ThunderX platform support vijay.kilari
  2015-02-18 12:19 ` [PATCH v2 1/3] xen/arm: " vijay.kilari
  2015-02-18 12:19 ` [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform vijay.kilari
@ 2015-02-18 12:19 ` vijay.kilari
  2015-02-23 17:52   ` Ian Campbell
  2 siblings, 1 reply; 13+ messages in thread
From: vijay.kilari @ 2015-02-18 12:19 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>
---
 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 c2dcb49..0be639b 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] 13+ messages in thread

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-02-18 12:19 ` [PATCH v2 1/3] xen/arm: " vijay.kilari
@ 2015-02-18 12:38   ` Julien Grall
  2015-02-23 17:51     ` Ian Campbell
  0 siblings, 1 reply; 13+ messages in thread
From: Julien Grall @ 2015-02-18 12:38 UTC (permalink / raw)
  To: vijay.kilari, Ian.Campbell, stefano.stabellini,
	stefano.stabellini, tim, xen-devel
  Cc: Prasun.Kapoor, vijaya.kumar, manish.jaggi

Hello Vijay,

On 18/02/2015 12:19, vijay.kilari@gmail.com wrote:
> 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>
> ---
>   xen/arch/arm/platforms/Makefile   |    1 +
>   xen/arch/arm/platforms/thunderx.c |   66 +++++++++++++++++++++++++++++++++++++
>   xen/arch/arm/setup.c              |    1 +
>   3 files changed, 68 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..96560e1
> --- /dev/null
> +++ b/xen/arch/arm/platforms/thunderx.c
> @@ -0,0 +1,66 @@
> +/*
> + * 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 int thunderx_specific_mapping(struct domain *d)
> +{
> +    uint64_t addr, size;
> +    int res;
> +
> +    /* Mappings GSER region required for dom0 */

Mapping

> +    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));

OOI, why this region is not described in the DT? Is it a PCI device?

> +    if ( res )
> +    {
> +         printk(XENLOG_ERR "Unable to map to dom%d region"

It would be more clear to specify the name of the region i.e "GSER region"

Regards,

-- 
Julien Grall

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

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-02-18 12:38   ` Julien Grall
@ 2015-02-23 17:51     ` Ian Campbell
  2015-03-03  5:09       ` Vijay Kilari
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Campbell @ 2015-02-23 17:51 UTC (permalink / raw)
  To: Julien Grall
  Cc: vijay.kilari, stefano.stabellini, Prasun.Kapoor, vijaya.kumar,
	tim, xen-devel, stefano.stabellini, manish.jaggi

On Wed, 2015-02-18 at 12:38 +0000, Julien Grall wrote:
> > +    uint64_t addr, size;

Please use paddr_t and PRIpaddr etc.

> > +    res = map_mmio_regions(d,
> > +                           paddr_to_pfn(addr & PAGE_MASK),
> > +                           DIV_ROUND_UP(size, PAGE_SIZE),
> > +                           paddr_to_pfn(addr & PAGE_MASK));
> 
> OOI, why this region is not described in the DT? Is it a PCI device?

I'm curious too.

> > +    if ( res )
> > +    {
> > +         printk(XENLOG_ERR "Unable to map to dom%d region"
> 
> It would be more clear to specify the name of the region i.e "GSER region"

Agreed.

Ian.

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

* Re: [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform
  2015-02-18 12:19 ` [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform vijay.kilari
@ 2015-02-23 17:51   ` Ian Campbell
  0 siblings, 0 replies; 13+ messages in thread
From: Ian Campbell @ 2015-02-23 17:51 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-02-18 at 17:49 +0530, vijay.kilari@gmail.com wrote:
> 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

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

* Re: [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree
  2015-02-18 12:19 ` [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree vijay.kilari
@ 2015-02-23 17:52   ` Ian Campbell
  2015-02-23 21:43     ` Julien Grall
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Campbell @ 2015-02-23 17:52 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-02-18 at 17:49 +0530, vijay.kilari@gmail.com wrote:
> 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>

Seems like a candidate for backport to 4.5.

> ---
>  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 c2dcb49..0be639b 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. */

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

* Re: [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree
  2015-02-23 17:52   ` Ian Campbell
@ 2015-02-23 21:43     ` Julien Grall
  0 siblings, 0 replies; 13+ messages in thread
From: Julien Grall @ 2015-02-23 21:43 UTC (permalink / raw)
  To: Ian Campbell, vijay.kilari
  Cc: stefano.stabellini, Prasun.Kapoor, vijaya.kumar, tim, xen-devel,
	stefano.stabellini, manish.jaggi

I think the title of the commit message is misleading.

I gave the impression that we don't want to parse the PSCI-0.2 for Xen, 
which is obviously wrong.

A better title would be: "Don't pass the PSCI-0.2 node to the DOM0"

On 23/02/2015 17:52, Ian Campbell wrote:
> On Wed, 2015-02-18 at 17:49 +0530, vijay.kilari@gmail.com wrote:
>> 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

Missing "." at the end of the sentence.

>>
>> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

> Seems like a candidate for backport to 4.5.

I think so.

Regards,

-- 
Julien Grall

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

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-02-23 17:51     ` Ian Campbell
@ 2015-03-03  5:09       ` Vijay Kilari
  2015-03-03  9:03         ` Ian Campbell
  0 siblings, 1 reply; 13+ messages in thread
From: Vijay Kilari @ 2015-03-03  5:09 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Stefano Stabellini, Prasun Kapoor, Vijaya Kumar K, Julien Grall,
	Tim Deegan, xen-devel, Stefano Stabellini, manish.jaggi

On Mon, Feb 23, 2015 at 11:21 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> On Wed, 2015-02-18 at 12:38 +0000, Julien Grall wrote:
>> > +    uint64_t addr, size;
>
> Please use paddr_t and PRIpaddr etc.
>
>> > +    res = map_mmio_regions(d,
>> > +                           paddr_to_pfn(addr & PAGE_MASK),
>> > +                           DIV_ROUND_UP(size, PAGE_SIZE),
>> > +                           paddr_to_pfn(addr & PAGE_MASK));
>>
>> OOI, why this region is not described in the DT? Is it a PCI device?
>

 It is not PCI device. it is Global SerDes configuration region. It is not
mentioned in DT.

> I'm curious too.
>
>> > +    if ( res )
>> > +    {
>> > +         printk(XENLOG_ERR "Unable to map to dom%d region"
>>
>> It would be more clear to specify the name of the region i.e "GSER region"
>
> Agreed.

OK. will be fixed

Regards,
Vijay

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

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-03-03  5:09       ` Vijay Kilari
@ 2015-03-03  9:03         ` Ian Campbell
  2015-03-03  9:29           ` Vijay Kilari
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Campbell @ 2015-03-03  9:03 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-03 at 10:39 +0530, Vijay Kilari wrote:
> On Mon, Feb 23, 2015 at 11:21 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> > On Wed, 2015-02-18 at 12:38 +0000, Julien Grall wrote:
> >> > +    uint64_t addr, size;
> >
> > Please use paddr_t and PRIpaddr etc.
> >
> >> > +    res = map_mmio_regions(d,
> >> > +                           paddr_to_pfn(addr & PAGE_MASK),
> >> > +                           DIV_ROUND_UP(size, PAGE_SIZE),
> >> > +                           paddr_to_pfn(addr & PAGE_MASK));
> >>
> >> OOI, why this region is not described in the DT? Is it a PCI device?
> >
> 
>  It is not PCI device. it is Global SerDes configuration region. It is not
> mentioned in DT.

Why not? Should it be?

> 
> > I'm curious too.
> >
> >> > +    if ( res )
> >> > +    {
> >> > +         printk(XENLOG_ERR "Unable to map to dom%d region"
> >>
> >> It would be more clear to specify the name of the region i.e "GSER region"
> >
> > Agreed.
> 
> OK. will be fixed
> 
> Regards,
> Vijay

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

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-03-03  9:03         ` Ian Campbell
@ 2015-03-03  9:29           ` Vijay Kilari
  2015-03-03 10:18             ` Ian Campbell
  0 siblings, 1 reply; 13+ messages in thread
From: Vijay Kilari @ 2015-03-03  9:29 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Stefano Stabellini, Prasun Kapoor, Vijaya Kumar K, Julien Grall,
	Tim Deegan, xen-devel, Stefano Stabellini, manish.jaggi

On Tue, Mar 3, 2015 at 2:33 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2015-03-03 at 10:39 +0530, Vijay Kilari wrote:
>> On Mon, Feb 23, 2015 at 11:21 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
>> > On Wed, 2015-02-18 at 12:38 +0000, Julien Grall wrote:
>> >> > +    uint64_t addr, size;
>> >
>> > Please use paddr_t and PRIpaddr etc.
>> >
>> >> > +    res = map_mmio_regions(d,
>> >> > +                           paddr_to_pfn(addr & PAGE_MASK),
>> >> > +                           DIV_ROUND_UP(size, PAGE_SIZE),
>> >> > +                           paddr_to_pfn(addr & PAGE_MASK));
>> >>
>> >> OOI, why this region is not described in the DT? Is it a PCI device?
>> >
>>
>>  It is not PCI device. it is Global SerDes configuration region. It is not
>> mentioned in DT.
>
> Why not? Should it be?

There is no specific driver in dom0 for this.
It is only used by thunder pci driver in dom0 to configure serdes. In
future we plan to
get rid of this. But for now we can have this mapping.

>
>>
>> > I'm curious too.
>> >
>> >> > +    if ( res )
>> >> > +    {
>> >> > +         printk(XENLOG_ERR "Unable to map to dom%d region"
>> >>
>> >> It would be more clear to specify the name of the region i.e "GSER region"
>> >
>> > Agreed.
>>
>> OK. will be fixed
>>
>> Regards,
>> Vijay
>
>

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

* Re: [PATCH v2 1/3] xen/arm: Add ThunderX platform support
  2015-03-03  9:29           ` Vijay Kilari
@ 2015-03-03 10:18             ` Ian Campbell
  0 siblings, 0 replies; 13+ messages in thread
From: Ian Campbell @ 2015-03-03 10:18 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-03 at 14:59 +0530, Vijay Kilari wrote:
> On Tue, Mar 3, 2015 at 2:33 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Tue, 2015-03-03 at 10:39 +0530, Vijay Kilari wrote:
> >> On Mon, Feb 23, 2015 at 11:21 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> >> > On Wed, 2015-02-18 at 12:38 +0000, Julien Grall wrote:
> >> >> > +    uint64_t addr, size;
> >> >
> >> > Please use paddr_t and PRIpaddr etc.
> >> >
> >> >> > +    res = map_mmio_regions(d,
> >> >> > +                           paddr_to_pfn(addr & PAGE_MASK),
> >> >> > +                           DIV_ROUND_UP(size, PAGE_SIZE),
> >> >> > +                           paddr_to_pfn(addr & PAGE_MASK));
> >> >>
> >> >> OOI, why this region is not described in the DT? Is it a PCI device?
> >> >
> >>
> >>  It is not PCI device. it is Global SerDes configuration region. It is not
> >> mentioned in DT.
> >
> > Why not? Should it be?
> 
> There is no specific driver in dom0 for this.
> It is only used by thunder pci driver in dom0 to configure serdes.

A DT is supposed to describe the hardware, so the presence or absence of
a driver in the kernel doesn't really come in to it.

> In future we plan to get rid of this. But for now we can have this
> mapping.

The problem is that removing this mapping in the future may, depending
on how it is all done, break compatibility with older kernels.

Could you describe how you plan to get rid of it please so I can see if
we need to worry about that sort of thing here?

To avoid blocking the rest of the series it might be a good idea to
factor out this specific mapping into a separate patch, then the rest
can go in, plus you can then use the commit message to explain what the
plan is etc.

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

end of thread, other threads:[~2015-03-03 10:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 12:19 [PATCH v2 0/3] Add ThunderX platform support vijay.kilari
2015-02-18 12:19 ` [PATCH v2 1/3] xen/arm: " vijay.kilari
2015-02-18 12:38   ` Julien Grall
2015-02-23 17:51     ` Ian Campbell
2015-03-03  5:09       ` Vijay Kilari
2015-03-03  9:03         ` Ian Campbell
2015-03-03  9:29           ` Vijay Kilari
2015-03-03 10:18             ` Ian Campbell
2015-02-18 12:19 ` [PATCH v2 2/3] xen/arm: Add early printk support for ThunderX platform vijay.kilari
2015-02-23 17:51   ` Ian Campbell
2015-02-18 12:19 ` [PATCH v2 3/3] xen/arm: Skip parsing psci-0.2 from host device tree vijay.kilari
2015-02-23 17:52   ` Ian Campbell
2015-02-23 21:43     ` Julien Grall

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.