All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings
@ 2020-11-17 10:30 ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

	Hi all,

This long-overdue patch series gets rid of the last remaining users of
the legacy IOMEM() macro and the needed static mappings on Renesas ARM
SoCs.

Ideally, all addresses used should be obtained from DT, but given the
maintenance status of R-Car Gen1 and SH-Mobile SoCs, it is very unlikely
the needed DT bindings will ever be written, and the needed DT nodes
will ever be added.

This has been tested on r8a7778/bockw, r8a7779/marzen, and sh73a0/kzm9g.
I plan to queue this series in renesas-devel for v5.11.

Thanks for your comments!

Geert Uytterhoeven (7):
  ARM: shmobile: r8a7778: Introduce HPBREG_BASE
  ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  ARM: shmobile: r8a7779: Use ioremap() to map SMP registers
  ARM: shmobile: r8a7779: Remove obsolete static mappings
  ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  ARM: shmobile: sh73a0: Use ioremap() to map SMP registers
  ARM: shmobile: sh73a0: Remove obsolete static mapping

 arch/arm/mach-shmobile/setup-r8a7778.c |  4 +-
 arch/arm/mach-shmobile/setup-r8a7779.c | 56 +++++++++-----------------
 arch/arm/mach-shmobile/setup-sh73a0.c  | 21 +---------
 arch/arm/mach-shmobile/smp-r8a7779.c   | 12 ++++--
 arch/arm/mach-shmobile/smp-sh73a0.c    | 33 ++++++++++-----
 5 files changed, 54 insertions(+), 72 deletions(-)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings
@ 2020-11-17 10:30 ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

	Hi all,

This long-overdue patch series gets rid of the last remaining users of
the legacy IOMEM() macro and the needed static mappings on Renesas ARM
SoCs.

Ideally, all addresses used should be obtained from DT, but given the
maintenance status of R-Car Gen1 and SH-Mobile SoCs, it is very unlikely
the needed DT bindings will ever be written, and the needed DT nodes
will ever be added.

This has been tested on r8a7778/bockw, r8a7779/marzen, and sh73a0/kzm9g.
I plan to queue this series in renesas-devel for v5.11.

Thanks for your comments!

Geert Uytterhoeven (7):
  ARM: shmobile: r8a7778: Introduce HPBREG_BASE
  ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  ARM: shmobile: r8a7779: Use ioremap() to map SMP registers
  ARM: shmobile: r8a7779: Remove obsolete static mappings
  ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  ARM: shmobile: sh73a0: Use ioremap() to map SMP registers
  ARM: shmobile: sh73a0: Remove obsolete static mapping

 arch/arm/mach-shmobile/setup-r8a7778.c |  4 +-
 arch/arm/mach-shmobile/setup-r8a7779.c | 56 +++++++++-----------------
 arch/arm/mach-shmobile/setup-sh73a0.c  | 21 +---------
 arch/arm/mach-shmobile/smp-r8a7779.c   | 12 ++++--
 arch/arm/mach-shmobile/smp-sh73a0.c    | 33 ++++++++++-----
 5 files changed, 54 insertions(+), 72 deletions(-)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/7] ARM: shmobile: r8a7778: Introduce HPBREG_BASE
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Replace the hardcoded address of the HPB Register block by a macro.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7778.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 2bc93f391bcf8e5d..819dbda47298ae88 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -14,6 +14,8 @@
 
 #include "common.h"
 
+#define HPBREG_BASE	0xfe700000
+
 #define INT2SMSKCR0	0x82288 /* 0xfe782288 */
 #define INT2SMSKCR1	0x8228c /* 0xfe78228c */
 
@@ -22,7 +24,7 @@
 
 static void __init r8a7778_init_irq_dt(void)
 {
-	void __iomem *base = ioremap(0xfe700000, 0x00100000);
+	void __iomem *base = ioremap(HPBREG_BASE, 0x00100000);
 
 	BUG_ON(!base);
 
-- 
2.25.1


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

* [PATCH 1/7] ARM: shmobile: r8a7778: Introduce HPBREG_BASE
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

Replace the hardcoded address of the HPB Register block by a macro.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7778.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 2bc93f391bcf8e5d..819dbda47298ae88 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -14,6 +14,8 @@
 
 #include "common.h"
 
+#define HPBREG_BASE	0xfe700000
+
 #define INT2SMSKCR0	0x82288 /* 0xfe782288 */
 #define INT2SMSKCR1	0x8228c /* 0xfe78228c */
 
@@ -22,7 +24,7 @@
 
 static void __init r8a7778_init_irq_dt(void)
 {
-	void __iomem *base = ioremap(0xfe700000, 0x00100000);
+	void __iomem *base = ioremap(HPBREG_BASE, 0x00100000);
 
 	BUG_ON(!base);
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Replace using the legacy IOMEM() macro to map various registers related
to INTC2 configuration by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7779.c | 34 +++++++++++++++-----------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 86406e3f9b22e31f..07c1bc96d4d9767f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -38,30 +38,36 @@ static void __init r8a7779_map_io(void)
 	iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
 }
 
+#define HPBREG_BASE	0xfe700000
+
 /* IRQ */
-#define INT2SMSKCR0 IOMEM(0xfe7822a0)
-#define INT2SMSKCR1 IOMEM(0xfe7822a4)
-#define INT2SMSKCR2 IOMEM(0xfe7822a8)
-#define INT2SMSKCR3 IOMEM(0xfe7822ac)
-#define INT2SMSKCR4 IOMEM(0xfe7822b0)
+#define INT2SMSKCR0	0x822a0	/* Interrupt Submask Clear Register 0 */
+#define INT2SMSKCR1	0x822a4	/* Interrupt Submask Clear Register 1 */
+#define INT2SMSKCR2	0x822a8	/* Interrupt Submask Clear Register 2 */
+#define INT2SMSKCR3	0x822ac	/* Interrupt Submask Clear Register 3 */
+#define INT2SMSKCR4	0x822b0	/* Interrupt Submask Clear Register 4 */
 
-#define INT2NTSR0 IOMEM(0xfe700060)
-#define INT2NTSR1 IOMEM(0xfe700064)
+#define INT2NTSR0	0x00060	/* Interrupt Notification Select Register 0 */
+#define INT2NTSR1	0x00064	/* Interrupt Notification Select Register 1 */
 
 static void __init r8a7779_init_irq_dt(void)
 {
+	void __iomem *base = ioremap(HPBREG_BASE, 0x00100000);
+
 	irqchip_init();
 
 	/* route all interrupts to ARM */
-	__raw_writel(0xffffffff, INT2NTSR0);
-	__raw_writel(0x3fffffff, INT2NTSR1);
+	__raw_writel(0xffffffff, base + INT2NTSR0);
+	__raw_writel(0x3fffffff, base + INT2NTSR1);
 
 	/* unmask all known interrupts in INTCS2 */
-	__raw_writel(0xfffffff0, INT2SMSKCR0);
-	__raw_writel(0xfff7ffff, INT2SMSKCR1);
-	__raw_writel(0xfffbffdf, INT2SMSKCR2);
-	__raw_writel(0xbffffffc, INT2SMSKCR3);
-	__raw_writel(0x003fee3f, INT2SMSKCR4);
+	__raw_writel(0xfffffff0, base + INT2SMSKCR0);
+	__raw_writel(0xfff7ffff, base + INT2SMSKCR1);
+	__raw_writel(0xfffbffdf, base + INT2SMSKCR2);
+	__raw_writel(0xbffffffc, base + INT2SMSKCR3);
+	__raw_writel(0x003fee3f, base + INT2SMSKCR4);
+
+	iounmap(base);
 }
 
 static const char *const r8a7779_compat_dt[] __initconst = {
-- 
2.25.1


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

* [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

Replace using the legacy IOMEM() macro to map various registers related
to INTC2 configuration by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7779.c | 34 +++++++++++++++-----------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 86406e3f9b22e31f..07c1bc96d4d9767f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -38,30 +38,36 @@ static void __init r8a7779_map_io(void)
 	iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
 }
 
+#define HPBREG_BASE	0xfe700000
+
 /* IRQ */
-#define INT2SMSKCR0 IOMEM(0xfe7822a0)
-#define INT2SMSKCR1 IOMEM(0xfe7822a4)
-#define INT2SMSKCR2 IOMEM(0xfe7822a8)
-#define INT2SMSKCR3 IOMEM(0xfe7822ac)
-#define INT2SMSKCR4 IOMEM(0xfe7822b0)
+#define INT2SMSKCR0	0x822a0	/* Interrupt Submask Clear Register 0 */
+#define INT2SMSKCR1	0x822a4	/* Interrupt Submask Clear Register 1 */
+#define INT2SMSKCR2	0x822a8	/* Interrupt Submask Clear Register 2 */
+#define INT2SMSKCR3	0x822ac	/* Interrupt Submask Clear Register 3 */
+#define INT2SMSKCR4	0x822b0	/* Interrupt Submask Clear Register 4 */
 
-#define INT2NTSR0 IOMEM(0xfe700060)
-#define INT2NTSR1 IOMEM(0xfe700064)
+#define INT2NTSR0	0x00060	/* Interrupt Notification Select Register 0 */
+#define INT2NTSR1	0x00064	/* Interrupt Notification Select Register 1 */
 
 static void __init r8a7779_init_irq_dt(void)
 {
+	void __iomem *base = ioremap(HPBREG_BASE, 0x00100000);
+
 	irqchip_init();
 
 	/* route all interrupts to ARM */
-	__raw_writel(0xffffffff, INT2NTSR0);
-	__raw_writel(0x3fffffff, INT2NTSR1);
+	__raw_writel(0xffffffff, base + INT2NTSR0);
+	__raw_writel(0x3fffffff, base + INT2NTSR1);
 
 	/* unmask all known interrupts in INTCS2 */
-	__raw_writel(0xfffffff0, INT2SMSKCR0);
-	__raw_writel(0xfff7ffff, INT2SMSKCR1);
-	__raw_writel(0xfffbffdf, INT2SMSKCR2);
-	__raw_writel(0xbffffffc, INT2SMSKCR3);
-	__raw_writel(0x003fee3f, INT2SMSKCR4);
+	__raw_writel(0xfffffff0, base + INT2SMSKCR0);
+	__raw_writel(0xfff7ffff, base + INT2SMSKCR1);
+	__raw_writel(0xfffbffdf, base + INT2SMSKCR2);
+	__raw_writel(0xbffffffc, base + INT2SMSKCR3);
+	__raw_writel(0x003fee3f, base + INT2SMSKCR4);
+
+	iounmap(base);
 }
 
 static const char *const r8a7779_compat_dt[] __initconst = {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/7] ARM: shmobile: r8a7779: Use ioremap() to map SMP registers
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Replace using the legacy IOMEM() macro to map the ARM Reset Vector
Address Register (AVECR) by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/smp-r8a7779.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 0ed73b650c141e58..f6713886ee16b279 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -20,8 +20,10 @@
 #include "common.h"
 #include "r8a7779.h"
 
-#define AVECR IOMEM(0xfe700040)
-#define R8A7779_SCU_BASE 0xf0000000
+#define HPBREG_BASE		0xfe700000
+#define AVECR			0x0040	/* ARM Reset Vector Address Register */
+
+#define R8A7779_SCU_BASE	0xf0000000
 
 static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
@@ -36,11 +38,15 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 
 static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
 {
+	void __iomem *base = ioremap(HPBREG_BASE, 0x1000);
+
 	/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
-	__raw_writel(__pa(shmobile_boot_vector), AVECR);
+	__raw_writel(__pa(shmobile_boot_vector), base + AVECR);
 
 	/* setup r8a7779 specific SCU bits */
 	shmobile_smp_scu_prepare_cpus(R8A7779_SCU_BASE, max_cpus);
+
+	iounmap(base);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-- 
2.25.1


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

* [PATCH 3/7] ARM: shmobile: r8a7779: Use ioremap() to map SMP registers
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

Replace using the legacy IOMEM() macro to map the ARM Reset Vector
Address Register (AVECR) by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/smp-r8a7779.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 0ed73b650c141e58..f6713886ee16b279 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -20,8 +20,10 @@
 #include "common.h"
 #include "r8a7779.h"
 
-#define AVECR IOMEM(0xfe700040)
-#define R8A7779_SCU_BASE 0xf0000000
+#define HPBREG_BASE		0xfe700000
+#define AVECR			0x0040	/* ARM Reset Vector Address Register */
+
+#define R8A7779_SCU_BASE	0xf0000000
 
 static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
@@ -36,11 +38,15 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 
 static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
 {
+	void __iomem *base = ioremap(HPBREG_BASE, 0x1000);
+
 	/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
-	__raw_writel(__pa(shmobile_boot_vector), AVECR);
+	__raw_writel(__pa(shmobile_boot_vector), base + AVECR);
 
 	/* setup r8a7779 specific SCU bits */
 	shmobile_smp_scu_prepare_cpus(R8A7779_SCU_BASE, max_cpus);
+
+	iounmap(base);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/7] ARM: shmobile: r8a7779: Remove obsolete static mappings
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

There are no more users of the statically mapped IOMEM regions on R-Car
H1.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7779.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 07c1bc96d4d9767f..446d40b50b7b784b 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -15,29 +15,6 @@
 #include "common.h"
 #include "r8a7779.h"
 
-static struct map_desc r8a7779_io_desc[] __initdata = {
-	/* 2M identity mapping for 0xf0000000 (MPCORE) */
-	{
-		.virtual	= 0xf0000000,
-		.pfn		= __phys_to_pfn(0xf0000000),
-		.length		= SZ_2M,
-		.type		= MT_DEVICE_NONSHARED
-	},
-	/* 16M identity mapping for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */
-	{
-		.virtual	= 0xfe000000,
-		.pfn		= __phys_to_pfn(0xfe000000),
-		.length		= SZ_16M,
-		.type		= MT_DEVICE_NONSHARED
-	},
-};
-
-static void __init r8a7779_map_io(void)
-{
-	debug_ll_io_init();
-	iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
-}
-
 #define HPBREG_BASE	0xfe700000
 
 /* IRQ */
@@ -77,7 +54,6 @@ static const char *const r8a7779_compat_dt[] __initconst = {
 
 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.smp		= smp_ops(r8a7779_smp_ops),
-	.map_io		= r8a7779_map_io,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7779_compat_dt,
-- 
2.25.1


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

* [PATCH 4/7] ARM: shmobile: r8a7779: Remove obsolete static mappings
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

There are no more users of the statically mapped IOMEM regions on R-Car
H1.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-r8a7779.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 07c1bc96d4d9767f..446d40b50b7b784b 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -15,29 +15,6 @@
 #include "common.h"
 #include "r8a7779.h"
 
-static struct map_desc r8a7779_io_desc[] __initdata = {
-	/* 2M identity mapping for 0xf0000000 (MPCORE) */
-	{
-		.virtual	= 0xf0000000,
-		.pfn		= __phys_to_pfn(0xf0000000),
-		.length		= SZ_2M,
-		.type		= MT_DEVICE_NONSHARED
-	},
-	/* 16M identity mapping for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */
-	{
-		.virtual	= 0xfe000000,
-		.pfn		= __phys_to_pfn(0xfe000000),
-		.length		= SZ_16M,
-		.type		= MT_DEVICE_NONSHARED
-	},
-};
-
-static void __init r8a7779_map_io(void)
-{
-	debug_ll_io_init();
-	iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
-}
-
 #define HPBREG_BASE	0xfe700000
 
 /* IRQ */
@@ -77,7 +54,6 @@ static const char *const r8a7779_compat_dt[] __initconst = {
 
 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.smp		= smp_ops(r8a7779_smp_ops),
-	.map_io		= r8a7779_map_io,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7779_compat_dt,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Replace using the legacy IOMEM() macro to map the L2C registers by
ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index cac92edd2b8879cc..d626bce83462c86e 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -44,7 +44,7 @@ static void __init sh73a0_generic_init(void)
 {
 #ifdef CONFIG_CACHE_L2X0
 	/* Shared attribute override enable, 64K*8way */
-	l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
+	l2x0_init(ioremap(0xf0100000, PAGE_SIZE), 0x00400000, 0xc20f0fff);
 #endif
 }

-- 
2.25.1


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

* [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

Replace using the legacy IOMEM() macro to map the L2C registers by
ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index cac92edd2b8879cc..d626bce83462c86e 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -44,7 +44,7 @@ static void __init sh73a0_generic_init(void)
 {
 #ifdef CONFIG_CACHE_L2X0
 	/* Shared attribute override enable, 64K*8way */
-	l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
+	l2x0_init(ioremap(0xf0100000, PAGE_SIZE), 0x00400000, 0xc20f0fff);
 #endif
 }

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/7] ARM: shmobile: sh73a0: Use ioremap() to map SMP registers
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Replace using the legacy IOMEM() macro to map various registers related
to secondary CPU bringup by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/smp-sh73a0.c | 33 +++++++++++++++++++----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 0403aa8629ddc10a..6d892d11d81c524d 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -16,31 +16,42 @@
 #include "common.h"
 #include "sh73a0.h"
 
-#define WUPCR		IOMEM(0xe6151010)
-#define SRESCR		IOMEM(0xe6151018)
-#define PSTR		IOMEM(0xe6151040)
-#define SBAR		IOMEM(0xe6180020)
-#define APARMBAREA	IOMEM(0xe6f10020)
+#define CPG_BASE2	0xe6151000
+#define WUPCR		0x10	/* System-CPU Wake Up Control Register */
+#define SRESCR		0x18	/* System-CPU Software Reset Control Register */
+#define PSTR		0x40	/* System-CPU Power Status Register */
+
+#define SYSC_BASE	0xe6180000
+#define SBAR		0x20	/* SYS Boot Address Register */
+
+#define AP_BASE		0xe6f10000
+#define APARMBAREA	0x20	/* Address Translation Area Register */
 
 #define SH73A0_SCU_BASE 0xf0000000
 
 static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned int lcpu = cpu_logical_map(cpu);
+	void __iomem *cpg2 = ioremap(CPG_BASE2, PAGE_SIZE);
 
-	if (((__raw_readl(PSTR) >> (4 * lcpu)) & 3) == 3)
-		__raw_writel(1 << lcpu, WUPCR);	/* wake up */
+	if (((__raw_readl(cpg2 + PSTR) >> (4 * lcpu)) & 3) == 3)
+		__raw_writel(1 << lcpu, cpg2 + WUPCR);	/* wake up */
 	else
-		__raw_writel(1 << lcpu, SRESCR);	/* reset */
-
+		__raw_writel(1 << lcpu, cpg2 + SRESCR);	/* reset */
+	iounmap(cpg2);
 	return 0;
 }
 
 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 {
+	void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE);
+	void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE);
+
 	/* Map the reset vector (in headsmp.S) */
-	__raw_writel(0, APARMBAREA);      /* 4k */
-	__raw_writel(__pa(shmobile_boot_vector), SBAR);
+	__raw_writel(0, ap + APARMBAREA);      /* 4k */
+	__raw_writel(__pa(shmobile_boot_vector), sysc + SBAR);
+	iounmap(sysc);
+	iounmap(ap);
 
 	/* setup sh73a0 specific SCU bits */
 	shmobile_smp_scu_prepare_cpus(SH73A0_SCU_BASE, max_cpus);
-- 
2.25.1


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

* [PATCH 6/7] ARM: shmobile: sh73a0: Use ioremap() to map SMP registers
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

Replace using the legacy IOMEM() macro to map various registers related
to secondary CPU bringup by ioremap().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/smp-sh73a0.c | 33 +++++++++++++++++++----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 0403aa8629ddc10a..6d892d11d81c524d 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -16,31 +16,42 @@
 #include "common.h"
 #include "sh73a0.h"
 
-#define WUPCR		IOMEM(0xe6151010)
-#define SRESCR		IOMEM(0xe6151018)
-#define PSTR		IOMEM(0xe6151040)
-#define SBAR		IOMEM(0xe6180020)
-#define APARMBAREA	IOMEM(0xe6f10020)
+#define CPG_BASE2	0xe6151000
+#define WUPCR		0x10	/* System-CPU Wake Up Control Register */
+#define SRESCR		0x18	/* System-CPU Software Reset Control Register */
+#define PSTR		0x40	/* System-CPU Power Status Register */
+
+#define SYSC_BASE	0xe6180000
+#define SBAR		0x20	/* SYS Boot Address Register */
+
+#define AP_BASE		0xe6f10000
+#define APARMBAREA	0x20	/* Address Translation Area Register */
 
 #define SH73A0_SCU_BASE 0xf0000000
 
 static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned int lcpu = cpu_logical_map(cpu);
+	void __iomem *cpg2 = ioremap(CPG_BASE2, PAGE_SIZE);
 
-	if (((__raw_readl(PSTR) >> (4 * lcpu)) & 3) == 3)
-		__raw_writel(1 << lcpu, WUPCR);	/* wake up */
+	if (((__raw_readl(cpg2 + PSTR) >> (4 * lcpu)) & 3) == 3)
+		__raw_writel(1 << lcpu, cpg2 + WUPCR);	/* wake up */
 	else
-		__raw_writel(1 << lcpu, SRESCR);	/* reset */
-
+		__raw_writel(1 << lcpu, cpg2 + SRESCR);	/* reset */
+	iounmap(cpg2);
 	return 0;
 }
 
 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 {
+	void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE);
+	void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE);
+
 	/* Map the reset vector (in headsmp.S) */
-	__raw_writel(0, APARMBAREA);      /* 4k */
-	__raw_writel(__pa(shmobile_boot_vector), SBAR);
+	__raw_writel(0, ap + APARMBAREA);      /* 4k */
+	__raw_writel(__pa(shmobile_boot_vector), sysc + SBAR);
+	iounmap(sysc);
+	iounmap(ap);
 
 	/* setup sh73a0 specific SCU bits */
 	shmobile_smp_scu_prepare_cpus(SH73A0_SCU_BASE, max_cpus);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 7/7] ARM: shmobile: sh73a0: Remove obsolete static mapping
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

There are no more users of the statically mapped IOMEM region on
SH-Mobile AG5.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index d626bce83462c86e..405e1af68a684f9a 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -22,24 +22,6 @@
 #include "common.h"
 #include "sh73a0.h"
 
-static struct map_desc sh73a0_io_desc[] __initdata = {
-	/* create a 1:1 identity mapping for 0xe6xxxxxx
-	 * used by CPGA, INTC and PFC.
-	 */
-	{
-		.virtual	= 0xe6000000,
-		.pfn		= __phys_to_pfn(0xe6000000),
-		.length		= 256 << 20,
-		.type		= MT_DEVICE_NONSHARED
-	},
-};
-
-static void __init sh73a0_map_io(void)
-{
-	debug_ll_io_init();
-	iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
-}
-
 static void __init sh73a0_generic_init(void)
 {
 #ifdef CONFIG_CACHE_L2X0
@@ -56,7 +38,6 @@ static const char *const sh73a0_boards_compat_dt[] __initconst = {
 
 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
 	.smp		= smp_ops(sh73a0_smp_ops),
-	.map_io		= sh73a0_map_io,
 	.init_machine	= sh73a0_generic_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= sh73a0_boards_compat_dt,
-- 
2.25.1


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

* [PATCH 7/7] ARM: shmobile: sh73a0: Remove obsolete static mapping
@ 2020-11-17 10:30   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 10:30 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-renesas-soc, Geert Uytterhoeven, linux-arm-kernel, Arnd Bergmann

There are no more users of the statically mapped IOMEM region on
SH-Mobile AG5.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index d626bce83462c86e..405e1af68a684f9a 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -22,24 +22,6 @@
 #include "common.h"
 #include "sh73a0.h"
 
-static struct map_desc sh73a0_io_desc[] __initdata = {
-	/* create a 1:1 identity mapping for 0xe6xxxxxx
-	 * used by CPGA, INTC and PFC.
-	 */
-	{
-		.virtual	= 0xe6000000,
-		.pfn		= __phys_to_pfn(0xe6000000),
-		.length		= 256 << 20,
-		.type		= MT_DEVICE_NONSHARED
-	},
-};
-
-static void __init sh73a0_map_io(void)
-{
-	debug_ll_io_init();
-	iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
-}
-
 static void __init sh73a0_generic_init(void)
 {
 #ifdef CONFIG_CACHE_L2X0
@@ -56,7 +38,6 @@ static const char *const sh73a0_boards_compat_dt[] __initconst = {
 
 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
 	.smp		= smp_ops(sh73a0_smp_ops),
-	.map_io		= sh73a0_map_io,
 	.init_machine	= sh73a0_generic_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= sh73a0_boards_compat_dt,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 10:30   ` Geert Uytterhoeven
@ 2020-11-17 12:25     ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 12:25 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Replace using the legacy IOMEM() macro to map various registers related
> to INTC2 configuration by ioremap().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

The patch looks good, but since you are already touching these __raw_writel(),
could you turn them into normal writel() to have a chance that this works
on big-endian? It could be either a follow-up or merged into the same patch.

       Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 12:25     ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 12:25 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Replace using the legacy IOMEM() macro to map various registers related
> to INTC2 configuration by ioremap().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

The patch looks good, but since you are already touching these __raw_writel(),
could you turn them into normal writel() to have a chance that this works
on big-endian? It could be either a follow-up or merged into the same patch.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings
  2020-11-17 10:30 ` Geert Uytterhoeven
@ 2020-11-17 12:27   ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 12:27 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
>         Hi all,
>
> This long-overdue patch series gets rid of the last remaining users of
> the legacy IOMEM() macro and the needed static mappings on Renesas ARM
> SoCs.
>
> Ideally, all addresses used should be obtained from DT, but given the
> maintenance status of R-Car Gen1 and SH-Mobile SoCs, it is very unlikely
> the needed DT bindings will ever be written, and the needed DT nodes
> will ever be added.
>
> This has been tested on r8a7778/bockw, r8a7779/marzen, and sh73a0/kzm9g.
> I plan to queue this series in renesas-devel for v5.11.
>
> Thanks for your comments!

Nice cleanup! I looked over the patches and only had one comment,
but the same comment also applies to some of the other files.

As far as I can tell, the this in fact removes all the __raw_ MMIO
accessors in mach-shmobile.

     Arnd

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

* Re: [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings
@ 2020-11-17 12:27   ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 12:27 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
>         Hi all,
>
> This long-overdue patch series gets rid of the last remaining users of
> the legacy IOMEM() macro and the needed static mappings on Renesas ARM
> SoCs.
>
> Ideally, all addresses used should be obtained from DT, but given the
> maintenance status of R-Car Gen1 and SH-Mobile SoCs, it is very unlikely
> the needed DT bindings will ever be written, and the needed DT nodes
> will ever be added.
>
> This has been tested on r8a7778/bockw, r8a7779/marzen, and sh73a0/kzm9g.
> I plan to queue this series in renesas-devel for v5.11.
>
> Thanks for your comments!

Nice cleanup! I looked over the patches and only had one comment,
but the same comment also applies to some of the other files.

As far as I can tell, the this in fact removes all the __raw_ MMIO
accessors in mach-shmobile.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 12:25     ` Arnd Bergmann
@ 2020-11-17 14:19       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 14:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

Hi Arnd,

On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Replace using the legacy IOMEM() macro to map various registers related
> > to INTC2 configuration by ioremap().
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> The patch looks good, but since you are already touching these __raw_writel(),
> could you turn them into normal writel() to have a chance that this works
> on big-endian? It could be either a follow-up or merged into the same patch.

(Do you want us to support big-endian on these old platforms? ;-)

At your service. Seems to work well.

Note that there are a few more (arch/arm/mach-shmobile/platsmp-scu.c
and arch/arm/mach-shmobile/setup-r8a7778.c).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 14:19       ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 14:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Arnd,

On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Replace using the legacy IOMEM() macro to map various registers related
> > to INTC2 configuration by ioremap().
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> The patch looks good, but since you are already touching these __raw_writel(),
> could you turn them into normal writel() to have a chance that this works
> on big-endian? It could be either a follow-up or merged into the same patch.

(Do you want us to support big-endian on these old platforms? ;-)

At your service. Seems to work well.

Note that there are a few more (arch/arm/mach-shmobile/platsmp-scu.c
and arch/arm/mach-shmobile/setup-r8a7778.c).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 14:19       ` Geert Uytterhoeven
@ 2020-11-17 14:39         ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 14:39 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Arnd,
>
> On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > > Replace using the legacy IOMEM() macro to map various registers related
> > > to INTC2 configuration by ioremap().
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > The patch looks good, but since you are already touching these __raw_writel(),
> > could you turn them into normal writel() to have a chance that this works
> > on big-endian? It could be either a follow-up or merged into the same patch.
>
> (Do you want us to support big-endian on these old platforms? ;-)
>
> At your service. Seems to work well.

In general, my preference is that code is written in a portable way, to make
it at least plausible that it works. I don't expect anyone to actually run
big-endian code on it, but if you can confirm that it boots all the way
to not finding a compatible /sbin/init, that would be awesome.

I guess since the initialization writes (mostly) '1' bits into the irq
controller registers, it would (mostly) work even if endianness is
wrong ;-)

        Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 14:39         ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 14:39 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Arnd,
>
> On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > > Replace using the legacy IOMEM() macro to map various registers related
> > > to INTC2 configuration by ioremap().
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > The patch looks good, but since you are already touching these __raw_writel(),
> > could you turn them into normal writel() to have a chance that this works
> > on big-endian? It could be either a follow-up or merged into the same patch.
>
> (Do you want us to support big-endian on these old platforms? ;-)
>
> At your service. Seems to work well.

In general, my preference is that code is written in a portable way, to make
it at least plausible that it works. I don't expect anyone to actually run
big-endian code on it, but if you can confirm that it boots all the way
to not finding a compatible /sbin/init, that would be awesome.

I guess since the initialization writes (mostly) '1' bits into the irq
controller registers, it would (mostly) work even if endianness is
wrong ;-)

        Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 14:39         ` Arnd Bergmann
@ 2020-11-17 14:47           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 14:47 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

Hi Arnd,

On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > <geert+renesas@glider.be> wrote:
> > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > to INTC2 configuration by ioremap().
> > > >
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > >
> > > The patch looks good, but since you are already touching these __raw_writel(),
> > > could you turn them into normal writel() to have a chance that this works
> > > on big-endian? It could be either a follow-up or merged into the same patch.
> >
> > (Do you want us to support big-endian on these old platforms? ;-)
> >
> > At your service. Seems to work well.
>
> In general, my preference is that code is written in a portable way, to make
> it at least plausible that it works. I don't expect anyone to actually run
> big-endian code on it, but if you can confirm that it boots all the way
> to not finding a compatible /sbin/init, that would be awesome.

With "work well", I meant no regressions after converting from _raw_*()
to normal accessors.  No idea how to boot big-endian kernels on this
hardware ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 14:47           ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 14:47 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Arnd,

On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > <geert+renesas@glider.be> wrote:
> > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > to INTC2 configuration by ioremap().
> > > >
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > >
> > > The patch looks good, but since you are already touching these __raw_writel(),
> > > could you turn them into normal writel() to have a chance that this works
> > > on big-endian? It could be either a follow-up or merged into the same patch.
> >
> > (Do you want us to support big-endian on these old platforms? ;-)
> >
> > At your service. Seems to work well.
>
> In general, my preference is that code is written in a portable way, to make
> it at least plausible that it works. I don't expect anyone to actually run
> big-endian code on it, but if you can confirm that it boots all the way
> to not finding a compatible /sbin/init, that would be awesome.

With "work well", I meant no regressions after converting from _raw_*()
to normal accessors.  No idea how to boot big-endian kernels on this
hardware ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 14:47           ` Geert Uytterhoeven
@ 2020-11-17 15:05             ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 15:05 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > <geert+renesas@glider.be> wrote:
> > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > to INTC2 configuration by ioremap().
> > > > >
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > >
> > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > could you turn them into normal writel() to have a chance that this works
> > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > >
> > > (Do you want us to support big-endian on these old platforms? ;-)
> > >
> > > At your service. Seems to work well.
> >
> > In general, my preference is that code is written in a portable way, to make
> > it at least plausible that it works. I don't expect anyone to actually run
> > big-endian code on it, but if you can confirm that it boots all the way
> > to not finding a compatible /sbin/init, that would be awesome.
>
> With "work well", I meant no regressions after converting from _raw_*()
> to normal accessors.  No idea how to boot big-endian kernels on this
> hardware ;-)

There is no change when booting them, you just enable
CONFIG_CPU_BIG_ENDIAN and recompile the kernel.

The bootloader remains little-endian and the first instruction in
the image then changes into big-endian mode. The expected
behavior is that it crashes as soon as it tries to get into user
space. Recompiling that is significantly more work.

     Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 15:05             ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 15:05 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > <geert+renesas@glider.be> wrote:
> > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > to INTC2 configuration by ioremap().
> > > > >
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > >
> > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > could you turn them into normal writel() to have a chance that this works
> > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > >
> > > (Do you want us to support big-endian on these old platforms? ;-)
> > >
> > > At your service. Seems to work well.
> >
> > In general, my preference is that code is written in a portable way, to make
> > it at least plausible that it works. I don't expect anyone to actually run
> > big-endian code on it, but if you can confirm that it boots all the way
> > to not finding a compatible /sbin/init, that would be awesome.
>
> With "work well", I meant no regressions after converting from _raw_*()
> to normal accessors.  No idea how to boot big-endian kernels on this
> hardware ;-)

There is no change when booting them, you just enable
CONFIG_CPU_BIG_ENDIAN and recompile the kernel.

The bootloader remains little-endian and the first instruction in
the image then changes into big-endian mode. The expected
behavior is that it crashes as soon as it tries to get into user
space. Recompiling that is significantly more work.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 15:05             ` Arnd Bergmann
@ 2020-11-17 15:52               ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 15:52 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Arnd,

On Tue, Nov 17, 2020 at 4:06 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > > <geert+renesas@glider.be> wrote:
> > > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > > to INTC2 configuration by ioremap().
> > > > > >
> > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > >
> > > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > > could you turn them into normal writel() to have a chance that this works
> > > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > > >
> > > > (Do you want us to support big-endian on these old platforms? ;-)
> > > >
> > > > At your service. Seems to work well.
> > >
> > > In general, my preference is that code is written in a portable way, to make
> > > it at least plausible that it works. I don't expect anyone to actually run
> > > big-endian code on it, but if you can confirm that it boots all the way
> > > to not finding a compatible /sbin/init, that would be awesome.
> >
> > With "work well", I meant no regressions after converting from _raw_*()
> > to normal accessors.  No idea how to boot big-endian kernels on this
> > hardware ;-)
>
> There is no change when booting them, you just enable
> CONFIG_CPU_BIG_ENDIAN and recompile the kernel.

And have to select ARCH_SUPPORTS_BIG_ENDIAN first...

> The bootloader remains little-endian and the first instruction in
> the image then changes into big-endian mode. The expected
> behavior is that it crashes as soon as it tries to get into user

Cool!

SH-Mobile AG5 boots until trying to power off the A3R power domain.
After converting the __raw_*() accessors in
drivers/soc/renesas/rmobile-sysc.c and drivers/clk/renesas/clk-sh73a0.c
it continues until /sbin/init fails, as expected.

R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
the micrel PHY driver, or MDIO (replacing io{read,write}32() by
{read,write}l() in sh_eth.c doesn't help).

Note that drivers/tty/serial/8250/8250_dw.c, which is used on RZ/N1,
uses __raw_{write,read}q(), too.

So I guess it's a bit too early to enable ARCH_SUPPORTS_BIG_ENDIAN
unconditionally.

> space. Recompiling that is significantly more work.

Doh, and even Debian ports doesn't support armeb anymore, else it
would just be a debootstrap away...


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 15:52               ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 15:52 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

Hi Arnd,

On Tue, Nov 17, 2020 at 4:06 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > > <geert+renesas@glider.be> wrote:
> > > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > > to INTC2 configuration by ioremap().
> > > > > >
> > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > >
> > > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > > could you turn them into normal writel() to have a chance that this works
> > > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > > >
> > > > (Do you want us to support big-endian on these old platforms? ;-)
> > > >
> > > > At your service. Seems to work well.
> > >
> > > In general, my preference is that code is written in a portable way, to make
> > > it at least plausible that it works. I don't expect anyone to actually run
> > > big-endian code on it, but if you can confirm that it boots all the way
> > > to not finding a compatible /sbin/init, that would be awesome.
> >
> > With "work well", I meant no regressions after converting from _raw_*()
> > to normal accessors.  No idea how to boot big-endian kernels on this
> > hardware ;-)
>
> There is no change when booting them, you just enable
> CONFIG_CPU_BIG_ENDIAN and recompile the kernel.

And have to select ARCH_SUPPORTS_BIG_ENDIAN first...

> The bootloader remains little-endian and the first instruction in
> the image then changes into big-endian mode. The expected
> behavior is that it crashes as soon as it tries to get into user

Cool!

SH-Mobile AG5 boots until trying to power off the A3R power domain.
After converting the __raw_*() accessors in
drivers/soc/renesas/rmobile-sysc.c and drivers/clk/renesas/clk-sh73a0.c
it continues until /sbin/init fails, as expected.

R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
the micrel PHY driver, or MDIO (replacing io{read,write}32() by
{read,write}l() in sh_eth.c doesn't help).

Note that drivers/tty/serial/8250/8250_dw.c, which is used on RZ/N1,
uses __raw_{write,read}q(), too.

So I guess it's a bit too early to enable ARCH_SUPPORTS_BIG_ENDIAN
unconditionally.

> space. Recompiling that is significantly more work.

Doh, and even Debian ports doesn't support armeb anymore, else it
would just be a debootstrap away...


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 15:52               ` Geert Uytterhoeven
@ 2020-11-17 16:37                 ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 16:37 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 4:06 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > > > <geert+renesas@glider.be> wrote:
> > > > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > > > to INTC2 configuration by ioremap().
> > > > > > >
> > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > >
> > > > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > > > could you turn them into normal writel() to have a chance that this works
> > > > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > > > >
> > > > > (Do you want us to support big-endian on these old platforms? ;-)
> > > > >
> > > > > At your service. Seems to work well.
> > > >
> > > > In general, my preference is that code is written in a portable way, to make
> > > > it at least plausible that it works. I don't expect anyone to actually run
> > > > big-endian code on it, but if you can confirm that it boots all the way
> > > > to not finding a compatible /sbin/init, that would be awesome.
> > >
> > > With "work well", I meant no regressions after converting from _raw_*()
> > > to normal accessors.  No idea how to boot big-endian kernels on this
> > > hardware ;-)
> >
> > There is no change when booting them, you just enable
> > CONFIG_CPU_BIG_ENDIAN and recompile the kernel.
>
> And have to select ARCH_SUPPORTS_BIG_ENDIAN first...
>
> > The bootloader remains little-endian and the first instruction in
> > the image then changes into big-endian mode. The expected
> > behavior is that it crashes as soon as it tries to get into user
>
> Cool!
>
> SH-Mobile AG5 boots until trying to power off the A3R power domain.
> After converting the __raw_*() accessors in
> drivers/soc/renesas/rmobile-sysc.c and drivers/clk/renesas/clk-sh73a0.c
> it continues until /sbin/init fails, as expected.

Ok, great!

> R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
> the micrel PHY driver, or MDIO (replacing io{read,write}32() by
> {read,write}l() in sh_eth.c doesn't help).

My guess would be that the sh_eth_soft_swap() logic is wrong
there, it seems to have been written in the SuperH days.

> Note that drivers/tty/serial/8250/8250_dw.c, which is used on RZ/N1,
> uses __raw_{write,read}q(), too.

This one is only used for octeon, which like superh has different
rules for endianness compared to everything else.

> So I guess it's a bit too early to enable ARCH_SUPPORTS_BIG_ENDIAN
> unconditionally.

The ARCH_SUPPORTS_BIG_ENDIAN logic is rather broken, as
it lets you build a big-endian kernel if any enabled platform sets it.
What we should probably have instead is 'depends on !CPU_BIG_ENDIAN'
in the platforms that do not support it.

> > space. Recompiling that is significantly more work.
>
> Doh, and even Debian ports doesn't support armeb anymore, else it
> would just be a debootstrap away...

Debian actually dropped all big-endian platforms other than s390
now, the last other one was mips32 (mips32el is still there for the
moment).

      Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 16:37                 ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-17 16:37 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 4:06 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 3:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Tue, Nov 17, 2020 at 3:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > > On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > > > > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > > > > > <geert+renesas@glider.be> wrote:
> > > > > > > Replace using the legacy IOMEM() macro to map various registers related
> > > > > > > to INTC2 configuration by ioremap().
> > > > > > >
> > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > >
> > > > > > The patch looks good, but since you are already touching these __raw_writel(),
> > > > > > could you turn them into normal writel() to have a chance that this works
> > > > > > on big-endian? It could be either a follow-up or merged into the same patch.
> > > > >
> > > > > (Do you want us to support big-endian on these old platforms? ;-)
> > > > >
> > > > > At your service. Seems to work well.
> > > >
> > > > In general, my preference is that code is written in a portable way, to make
> > > > it at least plausible that it works. I don't expect anyone to actually run
> > > > big-endian code on it, but if you can confirm that it boots all the way
> > > > to not finding a compatible /sbin/init, that would be awesome.
> > >
> > > With "work well", I meant no regressions after converting from _raw_*()
> > > to normal accessors.  No idea how to boot big-endian kernels on this
> > > hardware ;-)
> >
> > There is no change when booting them, you just enable
> > CONFIG_CPU_BIG_ENDIAN and recompile the kernel.
>
> And have to select ARCH_SUPPORTS_BIG_ENDIAN first...
>
> > The bootloader remains little-endian and the first instruction in
> > the image then changes into big-endian mode. The expected
> > behavior is that it crashes as soon as it tries to get into user
>
> Cool!
>
> SH-Mobile AG5 boots until trying to power off the A3R power domain.
> After converting the __raw_*() accessors in
> drivers/soc/renesas/rmobile-sysc.c and drivers/clk/renesas/clk-sh73a0.c
> it continues until /sbin/init fails, as expected.

Ok, great!

> R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
> the micrel PHY driver, or MDIO (replacing io{read,write}32() by
> {read,write}l() in sh_eth.c doesn't help).

My guess would be that the sh_eth_soft_swap() logic is wrong
there, it seems to have been written in the SuperH days.

> Note that drivers/tty/serial/8250/8250_dw.c, which is used on RZ/N1,
> uses __raw_{write,read}q(), too.

This one is only used for octeon, which like superh has different
rules for endianness compared to everything else.

> So I guess it's a bit too early to enable ARCH_SUPPORTS_BIG_ENDIAN
> unconditionally.

The ARCH_SUPPORTS_BIG_ENDIAN logic is rather broken, as
it lets you build a big-endian kernel if any enabled platform sets it.
What we should probably have instead is 'depends on !CPU_BIG_ENDIAN'
in the platforms that do not support it.

> > space. Recompiling that is significantly more work.
>
> Doh, and even Debian ports doesn't support armeb anymore, else it
> would just be a debootstrap away...

Debian actually dropped all big-endian platforms other than s390
now, the last other one was mips32 (mips32el is still there for the
moment).

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 16:37                 ` Arnd Bergmann
@ 2020-11-17 16:49                   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 16:49 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Arnd,

On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Doh, and even Debian ports doesn't support armeb anymore, else it
> > would just be a debootstrap away...
>
> Debian actually dropped all big-endian platforms other than s390
> now, the last other one was mips32 (mips32el is still there for the
> moment).

I did mean "Debian Ports", which still supports a few more. But no
armeb.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-17 16:49                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-17 16:49 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

Hi Arnd,

On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Doh, and even Debian ports doesn't support armeb anymore, else it
> > would just be a debootstrap away...
>
> Debian actually dropped all big-endian platforms other than s390
> now, the last other one was mips32 (mips32el is still there for the
> moment).

I did mean "Debian Ports", which still supports a few more. But no
armeb.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 16:49                   ` Geert Uytterhoeven
@ 2020-11-18  8:26                     ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18  8:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > Doh, and even Debian ports doesn't support armeb anymore, else it
> > > would just be a debootstrap away...
> >
> > Debian actually dropped all big-endian platforms other than s390
> > now, the last other one was mips32 (mips32el is still there for the
> > moment).
>
> I did mean "Debian Ports", which still supports a few more. But no
> armeb.

Ok, got it. I guess the old armeb ports was never in Debian, and predated
the debian-ports system.

Debian ports indeed still contain packages for big-endian m68k (obviously)
as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
sparc64). I'm surprised nobody so far tried restarting the openrisc port,
which got dropped when it appeared the corresponding gcc port would not
be upstreamed.

        Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18  8:26                     ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18  8:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > Doh, and even Debian ports doesn't support armeb anymore, else it
> > > would just be a debootstrap away...
> >
> > Debian actually dropped all big-endian platforms other than s390
> > now, the last other one was mips32 (mips32el is still there for the
> > moment).
>
> I did mean "Debian Ports", which still supports a few more. But no
> armeb.

Ok, got it. I guess the old armeb ports was never in Debian, and predated
the debian-ports system.

Debian ports indeed still contain packages for big-endian m68k (obviously)
as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
sparc64). I'm surprised nobody so far tried restarting the openrisc port,
which got dropped when it appeared the corresponding gcc port would not
be upstreamed.

        Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-17 16:37                 ` Arnd Bergmann
@ 2020-11-18  8:30                   ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18  8:30 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
> > the micrel PHY driver, or MDIO (replacing io{read,write}32() by
> > {read,write}l() in sh_eth.c doesn't help).
>
> My guess would be that the sh_eth_soft_swap() logic is wrong
> there, it seems to have been written in the SuperH days.

Coincidentally, we both got an email from the zero-day bot
today about sparse warnings in that driver:

https://lore.kernel.org/lkml/202011181609.lmqkyQnN-lkp@intel.com/

Some of these relate to suspicious endianness conversion, though
the email itself was about missing __iomem annotations.

       Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18  8:30                   ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18  8:30 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > R-Car M2-W boots until DHCP timeout.  Could be due to either sh_eth or
> > the micrel PHY driver, or MDIO (replacing io{read,write}32() by
> > {read,write}l() in sh_eth.c doesn't help).
>
> My guess would be that the sh_eth_soft_swap() logic is wrong
> there, it seems to have been written in the SuperH days.

Coincidentally, we both got an email from the zero-day bot
today about sparse warnings in that driver:

https://lore.kernel.org/lkml/202011181609.lmqkyQnN-lkp@intel.com/

Some of these relate to suspicious endianness conversion, though
the email itself was about missing __iomem annotations.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  2020-11-17 10:30   ` Geert Uytterhoeven
@ 2020-11-18  8:32     ` Sergei Shtylyov
  -1 siblings, 0 replies; 56+ messages in thread
From: Sergei Shtylyov @ 2020-11-18  8:32 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm
  Cc: Arnd Bergmann, linux-renesas-soc, linux-arm-kernel

Hello!

On 17.11.2020 13:30, Geert Uytterhoeven wrote:

> Replace using the legacy IOMEM() macro to map the L2C registers by

    Mapping? Else it doesn't rhyme. ;-)

> ioremap().
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[...]

MBR, Sergei

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
@ 2020-11-18  8:32     ` Sergei Shtylyov
  0 siblings, 0 replies; 56+ messages in thread
From: Sergei Shtylyov @ 2020-11-18  8:32 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm
  Cc: linux-renesas-soc, linux-arm-kernel, Arnd Bergmann

Hello!

On 17.11.2020 13:30, Geert Uytterhoeven wrote:

> Replace using the legacy IOMEM() macro to map the L2C registers by

    Mapping? Else it doesn't rhyme. ;-)

> ioremap().
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[...]

MBR, Sergei

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-18  8:26                     ` Arnd Bergmann
@ 2020-11-18  8:40                       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  8:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann,
	John Paul Adrian Glaubitz

CC Adrian

On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > Doh, and even Debian ports doesn't support armeb anymore, else it
> > > > would just be a debootstrap away...
> > >
> > > Debian actually dropped all big-endian platforms other than s390
> > > now, the last other one was mips32 (mips32el is still there for the
> > > moment).
> >
> > I did mean "Debian Ports", which still supports a few more. But no
> > armeb.
>
> Ok, got it. I guess the old armeb ports was never in Debian, and predated
> the debian-ports system.
>
> Debian ports indeed still contain packages for big-endian m68k (obviously)
> as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
> sparc64). I'm surprised nobody so far tried restarting the openrisc port,
> which got dropped when it appeared the corresponding gcc port would not
> be upstreamed.

I guess that is partly due to the limited availability of OpenRISC
hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
no Ethernet doesn't bring you far...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18  8:40                       ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  8:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM,
	John Paul Adrian Glaubitz

CC Adrian

On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
> On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
> > > On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > Doh, and even Debian ports doesn't support armeb anymore, else it
> > > > would just be a debootstrap away...
> > >
> > > Debian actually dropped all big-endian platforms other than s390
> > > now, the last other one was mips32 (mips32el is still there for the
> > > moment).
> >
> > I did mean "Debian Ports", which still supports a few more. But no
> > armeb.
>
> Ok, got it. I guess the old armeb ports was never in Debian, and predated
> the debian-ports system.
>
> Debian ports indeed still contain packages for big-endian m68k (obviously)
> as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
> sparc64). I'm surprised nobody so far tried restarting the openrisc port,
> which got dropped when it appeared the corresponding gcc port would not
> be upstreamed.

I guess that is partly due to the limited availability of OpenRISC
hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
no Ethernet doesn't bring you far...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  2020-11-18  8:32     ` Sergei Shtylyov
@ 2020-11-18  8:44       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  8:44 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

Hi Sergei,

On Wed, Nov 18, 2020 at 9:32 AM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
> On 17.11.2020 13:30, Geert Uytterhoeven wrote:
>
> > Replace using the legacy IOMEM() macro to map the L2C registers by
>
>     Mapping? Else it doesn't rhyme. ;-)

Can you please elaborate?

> > ioremap().

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
@ 2020-11-18  8:44       ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  8:44 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Sergei,

On Wed, Nov 18, 2020 at 9:32 AM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
> On 17.11.2020 13:30, Geert Uytterhoeven wrote:
>
> > Replace using the legacy IOMEM() macro to map the L2C registers by
>
>     Mapping? Else it doesn't rhyme. ;-)

Can you please elaborate?

> > ioremap().

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  2020-11-18  8:44       ` Geert Uytterhoeven
@ 2020-11-18  8:49         ` Sergei Shtylyov
  -1 siblings, 0 replies; 56+ messages in thread
From: Sergei Shtylyov @ 2020-11-18  8:49 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

On 18.11.2020 11:44, Geert Uytterhoeven wrote:

[...]
>>> Replace using the legacy IOMEM() macro to map the L2C registers by
>>
>>      Mapping? Else it doesn't rhyme. ;-)
> 
> Can you please elaborate?

    Replace using ... to mapping ..., no? Or rather s/to/with/?

>>> ioremap().
> 
> Gr{oetje,eeting}s,
> 
>                          Geert

MBR, Sergei

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
@ 2020-11-18  8:49         ` Sergei Shtylyov
  0 siblings, 0 replies; 56+ messages in thread
From: Sergei Shtylyov @ 2020-11-18  8:49 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On 18.11.2020 11:44, Geert Uytterhoeven wrote:

[...]
>>> Replace using the legacy IOMEM() macro to map the L2C registers by
>>
>>      Mapping? Else it doesn't rhyme. ;-)
> 
> Can you please elaborate?

    Replace using ... to mapping ..., no? Or rather s/to/with/?

>>> ioremap().
> 
> Gr{oetje,eeting}s,
> 
>                          Geert

MBR, Sergei

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
  2020-11-18  8:49         ` Sergei Shtylyov
@ 2020-11-18  9:22           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  9:22 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Magnus Damm, Arnd Bergmann, Linux-Renesas, Linux ARM

Hi Sergei,

On Wed, Nov 18, 2020 at 9:50 AM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
> On 18.11.2020 11:44, Geert Uytterhoeven wrote:
>
> [...]
> >>> Replace using the legacy IOMEM() macro to map the L2C registers by
> >>
> >>      Mapping? Else it doesn't rhyme. ;-)
> >
> > Can you please elaborate?
>
>     Replace using ... to mapping ..., no? Or rather s/to/with/?
>
> >>> ioremap().

"to map" applies to "using".

"by" applies to "replace" (replace A by B).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
@ 2020-11-18  9:22           ` Geert Uytterhoeven
  0 siblings, 0 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2020-11-18  9:22 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Sergei,

On Wed, Nov 18, 2020 at 9:50 AM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
> On 18.11.2020 11:44, Geert Uytterhoeven wrote:
>
> [...]
> >>> Replace using the legacy IOMEM() macro to map the L2C registers by
> >>
> >>      Mapping? Else it doesn't rhyme. ;-)
> >
> > Can you please elaborate?
>
>     Replace using ... to mapping ..., no? Or rather s/to/with/?
>
> >>> ioremap().

"to map" applies to "using".

"by" applies to "replace" (replace A by B).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-18  8:40                       ` Geert Uytterhoeven
@ 2020-11-18 10:24                         ` John Paul Adrian Glaubitz
  -1 siblings, 0 replies; 56+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-11-18 10:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Arnd Bergmann
  Cc: Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

Hi Geert!

On 11/18/20 9:40 AM, Geert Uytterhoeven wrote:
> CC Adrian
> 
> On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
>> On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>>> On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>>> Doh, and even Debian ports doesn't support armeb anymore, else it
>>>>> would just be a debootstrap away...
>>>>
>>>> Debian actually dropped all big-endian platforms other than s390
>>>> now, the last other one was mips32 (mips32el is still there for the
>>>> moment).
>>>
>>> I did mean "Debian Ports", which still supports a few more. But no
>>> armeb.
>>
>> Ok, got it. I guess the old armeb ports was never in Debian, and predated
>> the debian-ports system.
>>
>> Debian ports indeed still contain packages for big-endian m68k (obviously)
>> as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
>> sparc64). I'm surprised nobody so far tried restarting the openrisc port,
>> which got dropped when it appeared the corresponding gcc port would not
>> be upstreamed.
> 
> I guess that is partly due to the limited availability of OpenRISC
> hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
> no Ethernet doesn't bring you far...

The Debian wiki has some information on armeb and OpenRISC:

> https://wiki.debian.org/ArmPorts
> https://wiki.debian.org/OpenRISC

Apparently, interest for armeb was lost after people realized the hardware
being used could run little-endian as well and OpenRISC apparently had
licensing issues.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18 10:24                         ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 56+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-11-18 10:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Arnd Bergmann
  Cc: Linux-Renesas, Magnus Damm, Arnd Bergmann, Linux ARM

Hi Geert!

On 11/18/20 9:40 AM, Geert Uytterhoeven wrote:
> CC Adrian
> 
> On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
>> On Tue, Nov 17, 2020 at 5:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> On Tue, Nov 17, 2020 at 5:37 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>>> On Tue, Nov 17, 2020 at 4:52 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>>> Doh, and even Debian ports doesn't support armeb anymore, else it
>>>>> would just be a debootstrap away...
>>>>
>>>> Debian actually dropped all big-endian platforms other than s390
>>>> now, the last other one was mips32 (mips32el is still there for the
>>>> moment).
>>>
>>> I did mean "Debian Ports", which still supports a few more. But no
>>> armeb.
>>
>> Ok, got it. I guess the old armeb ports was never in Debian, and predated
>> the debian-ports system.
>>
>> Debian ports indeed still contain packages for big-endian m68k (obviously)
>> as well as hppa, powerpc, ppc64 (in addition to the official ppc64le) and
>> sparc64). I'm surprised nobody so far tried restarting the openrisc port,
>> which got dropped when it appeared the corresponding gcc port would not
>> be upstreamed.
> 
> I guess that is partly due to the limited availability of OpenRISC
> hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
> no Ethernet doesn't bring you far...

The Debian wiki has some information on armeb and OpenRISC:

> https://wiki.debian.org/ArmPorts
> https://wiki.debian.org/OpenRISC

Apparently, interest for armeb was lost after people realized the hardware
being used could run little-endian as well and OpenRISC apparently had
licensing issues.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-18 10:24                         ` John Paul Adrian Glaubitz
@ 2020-11-18 10:48                           ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18 10:48 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Geert Uytterhoeven, Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Wed, Nov 18, 2020 at 11:24 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 11/18/20 9:40 AM, Geert Uytterhoeven wrote:
> > On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
> >>I'm surprised nobody so far tried restarting the openrisc port,
> >> which got dropped when it appeared the corresponding gcc port would not
> >> be upstreamed.
> >
> > I guess that is partly due to the limited availability of OpenRISC
> > hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
> > no Ethernet doesn't bring you far...
>
> The Debian wiki has some information on armeb and OpenRISC:
>
> > https://wiki.debian.org/ArmPorts
> > https://wiki.debian.org/OpenRISC
>
> Apparently, interest for armeb was lost after people realized the hardware
> being used could run little-endian as well and OpenRISC apparently had
> licensing issues.

Right, my point above was that the licensing issues were resolved last
year when the gcc port finally landed in gcc-9.

       Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18 10:48                           ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18 10:48 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Linux-Renesas, Magnus Damm, Geert Uytterhoeven, Arnd Bergmann, Linux ARM

On Wed, Nov 18, 2020 at 11:24 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 11/18/20 9:40 AM, Geert Uytterhoeven wrote:
> > On Wed, Nov 18, 2020 at 9:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
> >>I'm surprised nobody so far tried restarting the openrisc port,
> >> which got dropped when it appeared the corresponding gcc port would not
> >> be upstreamed.
> >
> > I guess that is partly due to the limited availability of OpenRISC
> > hardware?  I had it running on a DE0-NANO, but 32 MiB RAM and
> > no Ethernet doesn't bring you far...
>
> The Debian wiki has some information on armeb and OpenRISC:
>
> > https://wiki.debian.org/ArmPorts
> > https://wiki.debian.org/OpenRISC
>
> Apparently, interest for armeb was lost after people realized the hardware
> being used could run little-endian as well and OpenRISC apparently had
> licensing issues.

Right, my point above was that the licensing issues were resolved last
year when the gcc port finally landed in gcc-9.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-18 10:48                           ` Arnd Bergmann
@ 2020-11-18 10:57                             ` John Paul Adrian Glaubitz
  -1 siblings, 0 replies; 56+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-11-18 10:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Geert Uytterhoeven, Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On 11/18/20 11:48 AM, Arnd Bergmann wrote:
>>> https://wiki.debian.org/ArmPorts
>>> https://wiki.debian.org/OpenRISC
>>
>> Apparently, interest for armeb was lost after people realized the hardware
>> being used could run little-endian as well and OpenRISC apparently had
>> licensing issues.
> 
> Right, my point above was that the licensing issues were resolved last
> year when the gcc port finally landed in gcc-9.

Ah, right. dpkg still has support for or1k [1], so generally it should be possible
then to use the tool rebootstrap [2] to cross-build a Debian base system for OpenRISC
from source.

We could add it to Debian Ports if there is sufficient interest and usable hardware
available.

Adrian

> [1] https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/data/cputable?id=ee0855cc66076691de4796be48f8a0d889fde001
> [2] https://wiki.debian.org/HelmutGrohne/rebootstrap

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18 10:57                             ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 56+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-11-18 10:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Renesas, Magnus Damm, Geert Uytterhoeven, Arnd Bergmann, Linux ARM

On 11/18/20 11:48 AM, Arnd Bergmann wrote:
>>> https://wiki.debian.org/ArmPorts
>>> https://wiki.debian.org/OpenRISC
>>
>> Apparently, interest for armeb was lost after people realized the hardware
>> being used could run little-endian as well and OpenRISC apparently had
>> licensing issues.
> 
> Right, my point above was that the licensing issues were resolved last
> year when the gcc port finally landed in gcc-9.

Ah, right. dpkg still has support for or1k [1], so generally it should be possible
then to use the tool rebootstrap [2] to cross-build a Debian base system for OpenRISC
from source.

We could add it to Debian Ports if there is sufficient interest and usable hardware
available.

Adrian

> [1] https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/data/cputable?id=ee0855cc66076691de4796be48f8a0d889fde001
> [2] https://wiki.debian.org/HelmutGrohne/rebootstrap

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
  2020-11-18 10:57                             ` John Paul Adrian Glaubitz
@ 2020-11-18 12:57                               ` Arnd Bergmann
  -1 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18 12:57 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Geert Uytterhoeven, Linux-Renesas, Magnus Damm, Linux ARM, Arnd Bergmann

On Wed, Nov 18, 2020 at 11:57 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 11/18/20 11:48 AM, Arnd Bergmann wrote:
> >>> https://wiki.debian.org/ArmPorts
> >>> https://wiki.debian.org/OpenRISC
> >>
> >> Apparently, interest for armeb was lost after people realized the hardware
> >> being used could run little-endian as well and OpenRISC apparently had
> >> licensing issues.
> >
> > Right, my point above was that the licensing issues were resolved last
> > year when the gcc port finally landed in gcc-9.
>
> Ah, right. dpkg still has support for or1k [1], so generally it should be possible
> then to use the tool rebootstrap [2] to cross-build a Debian base system for OpenRISC
> from source.
>
> We could add it to Debian Ports if there is sufficient interest and usable hardware
> available.

I think hardware is mainly available in form of FPGAs, which means the hardware
capabilities are fairly limited. I only mentioned it because it was a
recent (from i.e.
this century) big-endian target that already had the beginnings of a
Debian port.

Otherwise it's probably similar to arc, microblaze, nios2, xtensa,
csky or nds32:
if someone really wanted a Debian port and is willing to do the work,
it could be
done, but in practice any of those would be better off a minimum
custom user space
(buildroot, yocto, ...) anyway.

In practice, new 32-bit ports may be limited to machines that can build packages
on 64-bit hardware with enough memory, as it is currently done on i386, mipsel,
armel, armhf, and the ports for hppa, powerpc, and x32. This means
arc, microblaze
and rv32 could still be supported once there is sufficient kernel
support for their
64-bit targets.

      Arnd

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

* Re: [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
@ 2020-11-18 12:57                               ` Arnd Bergmann
  0 siblings, 0 replies; 56+ messages in thread
From: Arnd Bergmann @ 2020-11-18 12:57 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Linux-Renesas, Magnus Damm, Geert Uytterhoeven, Arnd Bergmann, Linux ARM

On Wed, Nov 18, 2020 at 11:57 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 11/18/20 11:48 AM, Arnd Bergmann wrote:
> >>> https://wiki.debian.org/ArmPorts
> >>> https://wiki.debian.org/OpenRISC
> >>
> >> Apparently, interest for armeb was lost after people realized the hardware
> >> being used could run little-endian as well and OpenRISC apparently had
> >> licensing issues.
> >
> > Right, my point above was that the licensing issues were resolved last
> > year when the gcc port finally landed in gcc-9.
>
> Ah, right. dpkg still has support for or1k [1], so generally it should be possible
> then to use the tool rebootstrap [2] to cross-build a Debian base system for OpenRISC
> from source.
>
> We could add it to Debian Ports if there is sufficient interest and usable hardware
> available.

I think hardware is mainly available in form of FPGAs, which means the hardware
capabilities are fairly limited. I only mentioned it because it was a
recent (from i.e.
this century) big-endian target that already had the beginnings of a
Debian port.

Otherwise it's probably similar to arc, microblaze, nios2, xtensa,
csky or nds32:
if someone really wanted a Debian port and is willing to do the work,
it could be
done, but in practice any of those would be better off a minimum
custom user space
(buildroot, yocto, ...) anyway.

In practice, new 32-bit ports may be limited to machines that can build packages
on 64-bit hardware with enough memory, as it is currently done on i386, mipsel,
armel, armhf, and the ports for hppa, powerpc, and x32. This means
arc, microblaze
and rv32 could still be supported once there is sufficient kernel
support for their
64-bit targets.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-18 12:58 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 10:30 [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings Geert Uytterhoeven
2020-11-17 10:30 ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 1/7] ARM: shmobile: r8a7778: Introduce HPBREG_BASE Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 12:25   ` Arnd Bergmann
2020-11-17 12:25     ` Arnd Bergmann
2020-11-17 14:19     ` Geert Uytterhoeven
2020-11-17 14:19       ` Geert Uytterhoeven
2020-11-17 14:39       ` Arnd Bergmann
2020-11-17 14:39         ` Arnd Bergmann
2020-11-17 14:47         ` Geert Uytterhoeven
2020-11-17 14:47           ` Geert Uytterhoeven
2020-11-17 15:05           ` Arnd Bergmann
2020-11-17 15:05             ` Arnd Bergmann
2020-11-17 15:52             ` Geert Uytterhoeven
2020-11-17 15:52               ` Geert Uytterhoeven
2020-11-17 16:37               ` Arnd Bergmann
2020-11-17 16:37                 ` Arnd Bergmann
2020-11-17 16:49                 ` Geert Uytterhoeven
2020-11-17 16:49                   ` Geert Uytterhoeven
2020-11-18  8:26                   ` Arnd Bergmann
2020-11-18  8:26                     ` Arnd Bergmann
2020-11-18  8:40                     ` Geert Uytterhoeven
2020-11-18  8:40                       ` Geert Uytterhoeven
2020-11-18 10:24                       ` John Paul Adrian Glaubitz
2020-11-18 10:24                         ` John Paul Adrian Glaubitz
2020-11-18 10:48                         ` Arnd Bergmann
2020-11-18 10:48                           ` Arnd Bergmann
2020-11-18 10:57                           ` John Paul Adrian Glaubitz
2020-11-18 10:57                             ` John Paul Adrian Glaubitz
2020-11-18 12:57                             ` Arnd Bergmann
2020-11-18 12:57                               ` Arnd Bergmann
2020-11-18  8:30                 ` Arnd Bergmann
2020-11-18  8:30                   ` Arnd Bergmann
2020-11-17 10:30 ` [PATCH 3/7] ARM: shmobile: r8a7779: Use ioremap() to map SMP registers Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 4/7] ARM: shmobile: r8a7779: Remove obsolete static mappings Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 5/7] ARM: shmobile: sh73a0: Use ioremap() to map L2C registers Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-18  8:32   ` Sergei Shtylyov
2020-11-18  8:32     ` Sergei Shtylyov
2020-11-18  8:44     ` Geert Uytterhoeven
2020-11-18  8:44       ` Geert Uytterhoeven
2020-11-18  8:49       ` Sergei Shtylyov
2020-11-18  8:49         ` Sergei Shtylyov
2020-11-18  9:22         ` Geert Uytterhoeven
2020-11-18  9:22           ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 6/7] ARM: shmobile: sh73a0: Use ioremap() to map SMP registers Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 10:30 ` [PATCH 7/7] ARM: shmobile: sh73a0: Remove obsolete static mapping Geert Uytterhoeven
2020-11-17 10:30   ` Geert Uytterhoeven
2020-11-17 12:27 ` [PATCH 0/7] ARM: shmobile: Remove IOMEM and static mappings Arnd Bergmann
2020-11-17 12:27   ` Arnd Bergmann

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.