Skip to contentSkip to conversation

Hi,

PATCH In review Michal Simek 5 participants 22 messages Feb 12, 2020 – Jun 1, 2020

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover Hi,

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

There could be some optimization added based on
https://lkml.org/lkml/2020/2/10/1528

Thanks,
Michal

Michal Simek (6):
microblaze: Convert headers to SPDX license
microblaze: Remove architecture tlb.h and use generic one
microblaze: Remove early printk setup
microblaze: Remove empty headers
microblaze: Remove unused boot_cpuid variable
microblaze: Use asm generic cmpxchg.h for !SMP case

Stefan Asserhall (4):
microblaze: Define microblaze barrier
microblaze: Add sync to tlb operations
microblaze: Add missing irqflags.h header
microblaze: Define percpu sestion in linker file

 arch/microblaze/include/asm/Kbuild            |  4 +-
 arch/microblaze/include/asm/barrier.h         | 13 ++++++
 arch/microblaze/include/asm/cache.h           |  5 +--
 arch/microblaze/include/asm/cacheflush.h      |  6 +--
 arch/microblaze/include/asm/checksum.h        |  5 +--
 arch/microblaze/include/asm/cmpxchg.h         | 40 ++-----------------
 arch/microblaze/include/asm/cpuinfo.h         |  5 +--
 arch/microblaze/include/asm/cputable.h        |  1 -
 arch/microblaze/include/asm/current.h         |  5 +--
 arch/microblaze/include/asm/delay.h           |  7 +---
 arch/microblaze/include/asm/dma.h             |  5 +--
 arch/microblaze/include/asm/elf.h             |  5 +--
 arch/microblaze/include/asm/entry.h           |  5 +--
 arch/microblaze/include/asm/exceptions.h      |  5 +--
 arch/microblaze/include/asm/fixmap.h          |  5 +--
 arch/microblaze/include/asm/flat.h            |  5 +--
 arch/microblaze/include/asm/hw_irq.h          |  1 -
 arch/microblaze/include/asm/io.h              |  5 +--
 arch/microblaze/include/asm/irq.h             |  5 +--
 arch/microblaze/include/asm/irqflags.h        |  5 +--
 arch/microblaze/include/asm/mmu.h             |  5 +--
 arch/microblaze/include/asm/mmu_context_mm.h  |  5 +--
 arch/microblaze/include/asm/module.h          |  5 +--
 arch/microblaze/include/asm/page.h            |  5 +--
 arch/microblaze/include/asm/pgalloc.h         |  5 +--
 arch/microblaze/include/asm/pgtable.h         |  5 +--
 arch/microblaze/include/asm/processor.h       |  5 +--
 arch/microblaze/include/asm/ptrace.h          |  5 +--
 arch/microblaze/include/asm/pvr.h             |  5 +--
 arch/microblaze/include/asm/registers.h       |  5 +--
 arch/microblaze/include/asm/sections.h        |  5 +--
 arch/microblaze/include/asm/setup.h           |  7 +---
 arch/microblaze/include/asm/string.h          |  5 +--
 arch/microblaze/include/asm/switch_to.h       |  5 +--
 arch/microblaze/include/asm/thread_info.h     |  5 +--
 arch/microblaze/include/asm/timex.h           |  5 +--
 arch/microblaze/include/asm/tlb.h             | 17 --------
 arch/microblaze/include/asm/tlbflush.h        |  5 +--
 arch/microblaze/include/asm/uaccess.h         |  5 +--
 arch/microblaze/include/asm/unaligned.h       |  5 +--
 arch/microblaze/include/asm/unistd.h          |  5 +--
 arch/microblaze/include/asm/unwind.h          |  5 +--
 arch/microblaze/include/asm/user.h            |  1 -
 arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c |  7 +---
 arch/microblaze/kernel/cpu/pvr.c              |  1 +
 arch/microblaze/kernel/misc.S                 |  3 +-
 arch/microblaze/kernel/setup.c                |  1 -
 arch/microblaze/kernel/vmlinux.lds.S          |  3 ++
 48 files changed, 62 insertions(+), 215 deletions(-)
 create mode 100644 arch/microblaze/include/asm/barrier.h
 delete mode 100644 arch/microblaze/include/asm/cputable.h
 delete mode 100644 arch/microblaze/include/asm/hw_irq.h
 delete mode 100644 arch/microblaze/include/asm/tlb.h
 delete mode 100644 arch/microblaze/include/asm/user.h
Signature · 1 line
2.25.0
#2 lore raw

PATCH 2/10 microblaze: Remove architecture tlb.h and use generic one

There is no reason to have this empty file if it is just link to asm-generic/tlb.h.

---

 arch/microblaze/include/asm/Kbuild |  1 +
 arch/microblaze/include/asm/tlb.h  | 17 -----------------
 2 files changed, 1 insertion(+), 17 deletions(-)
 delete mode 100644 arch/microblaze/include/asm/tlb.h
arch/microblaze/include/asm/Kbuild +1 -0
index e5c9170a07fc..7ae427f73105 100644
@@ -31,6 +31,7 @@ generic-y += preempt.h
 generic-y += serial.h
 generic-y += shmparam.h
 generic-y += syscalls.h
+generic-y += tlb.h
 generic-y += topology.h
 generic-y += trace_clock.h
 generic-y += vga.h
arch/microblaze/include/asm/tlb.h deleted +0 -17
deleted file mode 100644
index 628a78ee0a72..000000000000
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Michal Simek <[email protected]>
- * Copyright (C) 2008-2009 PetaLogix
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#ifndef _ASM_MICROBLAZE_TLB_H
-#define _ASM_MICROBLAZE_TLB_H
-
-#include <linux/pagemap.h>
-#include <asm-generic/tlb.h>
-
-#endif /* _ASM_MICROBLAZE_TLB_H */
Signature · 1 line
2.25.0
#4 lore raw

PATCH 4/10 microblaze: Remove empty headers

In reply to Michal Simek

There is no reason to keep empty headers if asm-generic one can be used instead. That's why remove empty file and use asm-generic equivalent. cputable.h is completely unused that's why remove it.

---

 arch/microblaze/include/asm/Kbuild     | 2 ++
 arch/microblaze/include/asm/cputable.h | 1 -
 arch/microblaze/include/asm/hw_irq.h   | 1 -
 arch/microblaze/include/asm/user.h     | 1 -
 4 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 100644 arch/microblaze/include/asm/cputable.h
 delete mode 100644 arch/microblaze/include/asm/hw_irq.h
 delete mode 100644 arch/microblaze/include/asm/user.h
arch/microblaze/include/asm/Kbuild +2 -0
index 7ae427f73105..a11407112e9a 100644
@@ -13,6 +13,7 @@ generic-y += exec.h
 generic-y += extable.h
 generic-y += fb.h
 generic-y += hardirq.h
+generic-y += hw_irq.h
 generic-y += irq_regs.h
 generic-y += irq_work.h
 generic-y += kdebug.h
@@ -34,6 +35,7 @@ generic-y += syscalls.h
 generic-y += tlb.h
 generic-y += topology.h
 generic-y += trace_clock.h
+generic-y += user.h
 generic-y += vga.h
 generic-y += word-at-a-time.h
 generic-y += xor.h
arch/microblaze/include/asm/cputable.h deleted +0 -1
deleted file mode 100644
index 8b137891791f..000000000000
@@ -1 +0,0 @@
-
arch/microblaze/include/asm/hw_irq.h deleted +0 -1
deleted file mode 100644
index 8b137891791f..000000000000
@@ -1 +0,0 @@
-
arch/microblaze/include/asm/user.h deleted +0 -1
deleted file mode 100644
index 8b137891791f..000000000000
@@ -1 +0,0 @@
-
Signature · 1 line
2.25.0
#5 lore raw

PATCH 5/10 microblaze: Define microblaze barrier

In reply to Michal Simek

From: Stefan Asserhall <[email protected]>

Define microblaze barrier.

---

 arch/microblaze/include/asm/Kbuild    |  1 -
 arch/microblaze/include/asm/barrier.h | 13 +++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 arch/microblaze/include/asm/barrier.h
arch/microblaze/include/asm/Kbuild +0 -1
index a11407112e9a..abb33619299b 100644
@@ -1,6 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 generated-y += syscall_table.h
-generic-y += barrier.h
 generic-y += bitops.h
 generic-y += bug.h
 generic-y += bugs.h
arch/microblaze/include/asm/barrier.h new file +13 -0
new file mode 100644
index 000000000000..70b0a017781b
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2015 - 2020 Xilinx, Inc. All rights reserved.
+ */
+
+#ifndef _ASM_MICROBLAZE_BARRIER_H
+#define _ASM_MICROBLAZE_BARRIER_H
+
+#define mb()	__asm__ __volatile__ ("mbar 1" : : : "memory")
+
+#include <asm-generic/barrier.h>
+
+#endif /* _ASM_MICROBLAZE_BARRIER_H */
Signature · 1 line
2.25.0
#6 lore raw

PATCH 6/10 microblaze: Add sync to tlb operations

In reply to Michal Simek

From: Stefan Asserhall <[email protected]>

Do the real sync by using mbar instruction.

---

 arch/microblaze/kernel/misc.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/microblaze/kernel/misc.S +2 -1
index 6759af688451..1228a09d8109 100644
@@ -39,7 +39,7 @@ _tlbia_1:
 	rsubi	r11, r12, MICROBLAZE_TLB_SIZE - 1
 	bneid	r11, _tlbia_1 /* loop for all entries */
 	addik	r12, r12, 1
-	/* sync */
+	mbar	1 /* sync */
 	rtsd	r15, 8
 	nop
 	.size  _tlbia, . - _tlbia
@@ -58,6 +58,7 @@ _tlbie:
 	blti	r12, _tlbie_1 /* Check if found */
 	mts	rtlbhi, r0 /* flush: ensure V is clear */
 	nop
+	mbar	1 /* sync */
 _tlbie_1:
 	rtsd	r15, 8
 	nop
Signature · 1 line
2.25.0
#9 lore raw

PATCH 7/10 microblaze: Add missing irqflags.h header

In reply to Michal Simek

From: Stefan Asserhall <[email protected]>

Without this header local_save_flags() is not defined.

---

 arch/microblaze/kernel/cpu/pvr.c | 1 +
 1 file changed, 1 insertion(+)
arch/microblaze/kernel/cpu/pvr.c +1 -0
index 8d0dc6db48cf..f139052a39bd 100644
@@ -14,6 +14,7 @@
 #include <linux/compiler.h>
 #include <asm/exceptions.h>
 #include <asm/pvr.h>
+#include <linux/irqflags.h>
 
 /*
  * Until we get an assembler that knows about the pvr registers,
Signature · 1 line
2.25.0
#12 lore raw

PATCH 10/10 microblaze: Use asm generic cmpxchg.h for !SMP case

In reply to Michal Simek

The whole implementation is done in asm-generic/cmpxchg.h file and there is no reason to duplicate it.
Also do not include asm-generic/cmpxchg-local.h because it is already included from asm-generic/cmpxchg.h

---

 arch/microblaze/include/asm/cmpxchg.h | 40 ++-------------------------
 1 file changed, 3 insertions(+), 37 deletions(-)
arch/microblaze/include/asm/cmpxchg.h +3 -37
index 596300c74509..3523b51aab36 100644
@@ -2,42 +2,8 @@
 #ifndef _ASM_MICROBLAZE_CMPXCHG_H
 #define _ASM_MICROBLAZE_CMPXCHG_H
 
-#include <linux/irqflags.h>
-
-void __bad_xchg(volatile void *ptr, int size);
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
-								int size)
-{
-	unsigned long ret;
-	unsigned long flags;
-
-	switch (size) {
-	case 1:
-		local_irq_save(flags);
-		ret = *(volatile unsigned char *)ptr;
-		*(volatile unsigned char *)ptr = x;
-		local_irq_restore(flags);
-		break;
-
-	case 4:
-		local_irq_save(flags);
-		ret = *(volatile unsigned long *)ptr;
-		*(volatile unsigned long *)ptr = x;
-		local_irq_restore(flags);
-		break;
-	default:
-		__bad_xchg(ptr, size), ret = 0;
-		break;
-	}
-
-	return ret;
-}
-
-#define xchg(ptr, x) \
-	((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
-
-#include <asm-generic/cmpxchg.h>
-#include <asm-generic/cmpxchg-local.h>
+#ifndef CONFIG_SMP
+# include <asm-generic/cmpxchg.h>
+#endif
 
 #endif /* _ASM_MICROBLAZE_CMPXCHG_H */
Signature · 1 line
2.25.0
#10 lore raw

PATCH 8/10 microblaze: Remove unused boot_cpuid variable

In reply to Michal Simek

boot_cpuid is not used on uni processor system that's why can be removed.

---

 arch/microblaze/include/asm/setup.h | 2 --
 arch/microblaze/kernel/setup.c      | 1 -
 2 files changed, 3 deletions(-)
arch/microblaze/include/asm/setup.h +0 -2
index c209d5297029..be10da9d87cb 100644
@@ -10,8 +10,6 @@
 #include <uapi/asm/setup.h>
 
 # ifndef __ASSEMBLY__
-extern unsigned int boot_cpuid; /* move to smp.h */
-
 extern char cmd_line[COMMAND_LINE_SIZE];
 
 extern char *klimit;
arch/microblaze/kernel/setup.c +0 -1
index a8fc15ac4291..dd121e33b8e3 100644
@@ -41,7 +41,6 @@ DEFINE_PER_CPU(unsigned int, ENTRY_SP);	/* Saved SP on kernel entry */
 DEFINE_PER_CPU(unsigned int, R11_SAVE);	/* Temp variable for entry */
 DEFINE_PER_CPU(unsigned int, CURRENT_SAVE);	/* Saved current pointer */
 
-unsigned int boot_cpuid;
 /*
  * Placed cmd_line to .data section because can be initialized from
  * ASM code. Default position is BSS section which is cleared
Signature · 1 line
2.25.0
#11 lore raw

PATCH 9/10 microblaze: Define percpu sestion in linker file

In reply to Michal Simek

From: Stefan Asserhall <[email protected]>

Adding SMP requires to have percpu section defined.

---

 arch/microblaze/kernel/vmlinux.lds.S | 3 +++
 1 file changed, 3 insertions(+)
arch/microblaze/kernel/vmlinux.lds.S +3 -0
index 2c09fa3a8a01..df07b3d06cd6 100644
@@ -13,6 +13,7 @@ ENTRY(microblaze_start)
 
 #define RO_EXCEPTION_TABLE_ALIGN	16
 
+#include <asm/cache.h>
 #include <asm/page.h>
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/thread_info.h>
@@ -89,6 +90,8 @@ SECTIONS {
 		_KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
 	}
 
+	PERCPU_SECTION(L1_CACHE_BYTES)
+
 	. = ALIGN(PAGE_SIZE);
 	__init_begin = .;
 
Signature · 1 line
2.25.0
#1 lore raw

PATCH 1/10 microblaze: Convert headers to SPDX license

In reply to Michal Simek

Covert all headers to SPDX.

---

 arch/microblaze/include/asm/cache.h          | 5 +----
 arch/microblaze/include/asm/cacheflush.h     | 6 +-----
 arch/microblaze/include/asm/checksum.h       | 5 +----
 arch/microblaze/include/asm/cpuinfo.h        | 5 +----
 arch/microblaze/include/asm/current.h        | 5 +----
 arch/microblaze/include/asm/delay.h          | 7 +------
 arch/microblaze/include/asm/dma.h            | 5 +----
 arch/microblaze/include/asm/elf.h            | 5 +----
 arch/microblaze/include/asm/entry.h          | 5 +----
 arch/microblaze/include/asm/exceptions.h     | 5 +----
 arch/microblaze/include/asm/fixmap.h         | 5 +----
 arch/microblaze/include/asm/flat.h           | 5 +----
 arch/microblaze/include/asm/io.h             | 5 +----
 arch/microblaze/include/asm/irq.h            | 5 +----
 arch/microblaze/include/asm/irqflags.h       | 5 +----
 arch/microblaze/include/asm/mmu.h            | 5 +----
 arch/microblaze/include/asm/mmu_context_mm.h | 5 +----
 arch/microblaze/include/asm/module.h         | 5 +----
 arch/microblaze/include/asm/page.h           | 5 +----
 arch/microblaze/include/asm/pgalloc.h        | 5 +----
 arch/microblaze/include/asm/pgtable.h        | 5 +----
 arch/microblaze/include/asm/processor.h      | 5 +----
 arch/microblaze/include/asm/ptrace.h         | 5 +----
 arch/microblaze/include/asm/pvr.h            | 5 +----
 arch/microblaze/include/asm/registers.h      | 5 +----
 arch/microblaze/include/asm/sections.h       | 5 +----
 arch/microblaze/include/asm/setup.h          | 5 +----
 arch/microblaze/include/asm/string.h         | 5 +----
 arch/microblaze/include/asm/switch_to.h      | 5 +----
 arch/microblaze/include/asm/thread_info.h    | 5 +----
 arch/microblaze/include/asm/timex.h          | 5 +----
 arch/microblaze/include/asm/tlbflush.h       | 5 +----
 arch/microblaze/include/asm/uaccess.h        | 5 +----
 arch/microblaze/include/asm/unaligned.h      | 5 +----
 arch/microblaze/include/asm/unistd.h         | 5 +----
 arch/microblaze/include/asm/unwind.h         | 5 +----
 36 files changed, 36 insertions(+), 147 deletions(-)
arch/microblaze/include/asm/cache.h +1 -4
index 4efe96a036f7..a149b3e711ec 100644
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Cache operations
  *
  * Copyright (C) 2007-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
  * Copyright (C) 2003 John Williams <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_CACHE_H
arch/microblaze/include/asm/cacheflush.h +1 -5
index b091de77b15b..11f56c85056b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2007-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
@@ -5,11 +6,6 @@
  * based on v850 version which was
  * Copyright (C) 2001,02,03 NEC Electronics Corporation
  * Copyright (C) 2001,02,03 Miles Bader <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
- *
  */
 
 #ifndef _ASM_MICROBLAZE_CACHEFLUSH_H
arch/microblaze/include/asm/checksum.h +1 -4
index adeecebbb0d1..2e5ebd599943 100644
@@ -1,10 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008 Michal Simek <[email protected]>
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_CHECKSUM_H
arch/microblaze/include/asm/cpuinfo.h +1 -4
index 8f4996730552..786ffa669bf1 100644
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generic support for queying CPU info
  *
  * Copyright (C) 2007-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
  * Copyright (C) 2007 John Williams <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_CPUINFO_H
arch/microblaze/include/asm/current.h +1 -4
index 29303ed825cc..a4bb45be30e6 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_CURRENT_H
arch/microblaze/include/asm/delay.h +1 -6
index ea2a9cd9b159..05fe9e3e0039 100644
@@ -1,10 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
- * include/asm-microblaze/delay.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
  * Copyright (C) 2008 Michal Simek
  * Copyright (C) 2007 John Williams
  * Copyright (C) 2006 Atmark Techno, Inc.
arch/microblaze/include/asm/dma.h +1 -4
index 0d73d0c6de37..e6cb6d0725af 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_DMA_H
arch/microblaze/include/asm/elf.h +1 -4
index 659024449064..5331a8473a46 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 #ifndef _ASM_MICROBLAZE_ELF_H
 #define _ASM_MICROBLAZE_ELF_H
arch/microblaze/include/asm/entry.h +1 -4
index 596e485ae707..6c42bed41166 100644
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions used by low-level trap handlers
  *
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
  * Copyright (C) 2007 John Williams <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_ENTRY_H
arch/microblaze/include/asm/exceptions.h +1 -4
index e6a8ddea1dca..d67e65b72215 100644
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Preliminary support for HW exception handing for Microblaze
  *
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2005 John Williams <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_EXCEPTIONS_H
arch/microblaze/include/asm/fixmap.h +1 -4
index 06c0e2b1883f..0379ce5229e3 100644
@@ -1,10 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fixmap.h: compile-time virtual memory allocation
  *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
  * Copyright (C) 1998 Ingo Molnar
  *
  * Copyright 2008 Freescale Semiconductor Inc.
arch/microblaze/include/asm/flat.h +1 -4
index 1ab86770eaee..79a749f4ad04 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * uClinux flat-format executables
  *
  * Copyright (C) 2005 John Williams <[email protected]>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_FLAT_H
arch/microblaze/include/asm/io.h +1 -4
index d33c61737b8b..1dd6fae41897 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2007-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_IO_H
arch/microblaze/include/asm/irq.h +1 -4
index 5166f0893e2b..cb6ab55d1d01 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_IRQ_H
arch/microblaze/include/asm/irqflags.h +1 -4
index c9a6262832c4..818c6c9f550d 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_IRQFLAGS_H
arch/microblaze/include/asm/mmu.h +1 -4
index 1f9edddf7f4b..97f1243101cc 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_MMU_H
arch/microblaze/include/asm/mmu_context_mm.h +1 -4
index 97559fe0b953..a1c7dd48454c 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H
arch/microblaze/include/asm/module.h +1 -4
index 7be1347fce42..eda1c183b6c7 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_MODULE_H
arch/microblaze/include/asm/page.h +1 -4
index f4b44b24b02e..ae7215c94706 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * VM ops
  *
@@ -6,10 +7,6 @@
  * Copyright (C) 2006 Atmark Techno, Inc.
  * Changes for MMU support:
  *    Copyright (C) 2007 Xilinx, Inc.  All rights reserved.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_PAGE_H
arch/microblaze/include/asm/pgalloc.h +1 -4
index fcf1e23f2e0a..1d7a91252d03 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_PGALLOC_H
arch/microblaze/include/asm/pgtable.h +1 -4
index 2def331f9e2c..45b30878fc17 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_PGTABLE_H
arch/microblaze/include/asm/processor.h +1 -4
index 66b537b8d138..1ff5a82b76b6 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_PROCESSOR_H
arch/microblaze/include/asm/ptrace.h +1 -4
index 5b18ec124e51..bfcb89df5e26 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 #ifndef _ASM_MICROBLAZE_PTRACE_H
 #define _ASM_MICROBLAZE_PTRACE_H
arch/microblaze/include/asm/pvr.h +1 -4
index 4bbdb4c03b57..186ee8c3c818 100644
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Support for the MicroBlaze PVR (Processor Version Register)
  *
  * Copyright (C) 2009 - 2011 Michal Simek <[email protected]>
  * Copyright (C) 2007 John Williams <[email protected]>
  * Copyright (C) 2007 - 2011 PetaLogix
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_PVR_H
arch/microblaze/include/asm/registers.h +1 -4
index 68c3afb73877..ee81e1cba008 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_REGISTERS_H
arch/microblaze/include/asm/sections.h +1 -4
index 1b281d3ea734..a9311ad84a67 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_SECTIONS_H
arch/microblaze/include/asm/setup.h +1 -4
index ce9b7b786156..c209d5297029 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2007-2009 Michal Simek <[email protected]>
  * Copyright (C) 2007-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 #ifndef _ASM_MICROBLAZE_SETUP_H
 #define _ASM_MICROBLAZE_SETUP_H
arch/microblaze/include/asm/string.h +1 -4
index aec2f59298b8..34071a848b6a 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_STRING_H
arch/microblaze/include/asm/switch_to.h +1 -4
index f45baa2c5e09..5afd6d9977b2 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_SWITCH_TO_H
arch/microblaze/include/asm/thread_info.h +1 -4
index 9afe4b5bd6c8..ad8e8fcb90d3 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_THREAD_INFO_H
arch/microblaze/include/asm/timex.h +1 -4
index befcf3de5532..e99cc29cbe57 100644
@@ -1,9 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_TIMEX_H
arch/microblaze/include/asm/tlbflush.h +1 -4
index 2e1353c2d18d..6f8f5c77a050 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_TLBFLUSH_H
arch/microblaze/include/asm/uaccess.h +1 -4
index a1f206b90753..09498fe1ab98 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  * Copyright (C) 2008-2009 PetaLogix
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_UACCESS_H
arch/microblaze/include/asm/unaligned.h +1 -4
index b162ed880495..448299beab69 100644
@@ -1,10 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008 Michal Simek <[email protected]>
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef _ASM_MICROBLAZE_UNALIGNED_H
arch/microblaze/include/asm/unistd.h +1 -4
index d79d35ac6253..cfe3f888b432 100644
@@ -1,10 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2007-2008 Michal Simek <[email protected]>
  * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 #ifndef _ASM_MICROBLAZE_UNISTD_H
 #define _ASM_MICROBLAZE_UNISTD_H
arch/microblaze/include/asm/unwind.h +1 -4
index d248b7de4b13..c327d673622a 100644
@@ -1,11 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Backtrace support for Microblaze
  *
  * Copyright (C) 2010  Digital Design Corporation
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
  */
 
 #ifndef __MICROBLAZE_UNWIND_H
Signature · 1 line
2.25.0
#3 lore raw

PATCH 3/10 microblaze: Remove early printk setup

In reply to Michal Simek

Early printk has been removed already that's why this setting doesn't make any sense. Also change printk level from pr_info to pr_err.

Fixes 96f0e6fcc9ad ("microblaze: remove redundant early_printk support")

---

 arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c +1 -6
index a32daec96c12..c7ee51b0900e 100644
@@ -22,13 +22,8 @@
 
 #define CI(c, p) { ci->c = PVR_##p(pvr); }
 
-#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
 #define err_printk(x) \
-	early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n");
-#else
-#define err_printk(x) \
-	pr_info("ERROR: Microblaze " x "-different for PVR and DTS\n");
-#endif
+	pr_err("ERROR: Microblaze " x "-different for PVR and DTS\n");
 
 void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
 {
Signature · 1 line
2.25.0
maintainer
#7 lore raw

Re: [PATCH 06/10] microblaze: Add sync to tlb operations

In reply to Michal Simek

arch/microblaze/kernel/misc.S _tlbia_1: · line 45

Quoted 13 lines · Michal Simek
arch/microblaze/kernel/misc.S +1 -1
index 6759af688451..1228a09d8109 100644
@@ -39,7 +39,7 @@ _tlbia_1:
        rsubi   r11, r12, MICROBLAZE_TLB_SIZE - 1
        bneid   r11, _tlbia_1 /* loop for all entries */
        addik   r12, r12, 1
-       /* sync */
+       mbar    1 /* sync */
        rtsd    r15, 8
        nop
        .size  _tlbia, . - _tlbia

Is there any effect on non-SMP systems?

Arnd

#8 lore raw

Re: [PATCH 06/10] microblaze: Add sync to tlb operations

Quoted 16 lines · Arnd Bergmann

arch/microblaze/kernel/misc.S _tlbia_1: · line 45

Quoted 13 lines · Michal Simek
arch/microblaze/kernel/misc.S +1 -1
index 6759af688451..1228a09d8109 100644
@@ -39,7 +39,7 @@ _tlbia_1:
        rsubi   r11, r12, MICROBLAZE_TLB_SIZE - 1
        bneid   r11, _tlbia_1 /* loop for all entries */
        addik   r12, r12, 1
-       /* sync */
+       mbar    1 /* sync */
        rtsd    r15, 8
        nop
        .size  _tlbia, . - _tlbia

Is there any effect on non-SMP systems?

not - it is just nop.

M

maintainer Reviewed-by on the v1 series
#13 lore raw
In reply to Michal Simek
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Agreed.

I had one question about a detail, other than that:

#14 lore raw
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Quoted 5 lines

Agreed.

I had one question about a detail, other than that:

Thanks,
Michal

#15 lore raw
In reply to Michal Simek
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI platforms.

Rob

#16 lore raw

Hi Rob,

Quoted 11 lines · Rob Herring
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI platforms.

can you please suggest changes which could be done? I have CC Bharat and he could look at it.

Thanks,
Michal

maintainer
#21 lore raw
In reply to Michal Simek
Quoted 72 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

There could be some optimization added based on
https://lkml.org/lkml/2020/2/10/1528

Thanks,
Michal

Michal Simek (6):
microblaze: Convert headers to SPDX license
microblaze: Remove architecture tlb.h and use generic one
microblaze: Remove early printk setup
microblaze: Remove empty headers
microblaze: Remove unused boot_cpuid variable
microblaze: Use asm generic cmpxchg.h for !SMP case

Stefan Asserhall (4):
microblaze: Define microblaze barrier
microblaze: Add sync to tlb operations
microblaze: Add missing irqflags.h header
microblaze: Define percpu sestion in linker file

 arch/microblaze/include/asm/Kbuild            |  4 +-
 arch/microblaze/include/asm/barrier.h         | 13 ++++++
 arch/microblaze/include/asm/cache.h           |  5 +--
 arch/microblaze/include/asm/cacheflush.h      |  6 +--
 arch/microblaze/include/asm/checksum.h        |  5 +--
 arch/microblaze/include/asm/cmpxchg.h         | 40 ++-----------------
 arch/microblaze/include/asm/cpuinfo.h         |  5 +--
 arch/microblaze/include/asm/cputable.h        |  1 -
 arch/microblaze/include/asm/current.h         |  5 +--
 arch/microblaze/include/asm/delay.h           |  7 +---
 arch/microblaze/include/asm/dma.h             |  5 +--
 arch/microblaze/include/asm/elf.h             |  5 +--
 arch/microblaze/include/asm/entry.h           |  5 +--
 arch/microblaze/include/asm/exceptions.h      |  5 +--
 arch/microblaze/include/asm/fixmap.h          |  5 +--
 arch/microblaze/include/asm/flat.h            |  5 +--
 arch/microblaze/include/asm/hw_irq.h          |  1 -
 arch/microblaze/include/asm/io.h              |  5 +--
 arch/microblaze/include/asm/irq.h             |  5 +--
 arch/microblaze/include/asm/irqflags.h        |  5 +--
 arch/microblaze/include/asm/mmu.h             |  5 +--
 arch/microblaze/include/asm/mmu_context_mm.h  |  5 +--
 arch/microblaze/include/asm/module.h          |  5 +--
 arch/microblaze/include/asm/page.h            |  5 +--
 arch/microblaze/include/asm/pgalloc.h         |  5 +--
 arch/microblaze/include/asm/pgtable.h         |  5 +--
 arch/microblaze/include/asm/processor.h       |  5 +--
 arch/microblaze/include/asm/ptrace.h          |  5 +--
 arch/microblaze/include/asm/pvr.h             |  5 +--
 arch/microblaze/include/asm/registers.h       |  5 +--
 arch/microblaze/include/asm/sections.h        |  5 +--
 arch/microblaze/include/asm/setup.h           |  7 +---
 arch/microblaze/include/asm/string.h          |  5 +--
 arch/microblaze/include/asm/switch_to.h       |  5 +--
 arch/microblaze/include/asm/thread_info.h     |  5 +--
 arch/microblaze/include/asm/timex.h           |  5 +--
 arch/microblaze/include/asm/tlb.h             | 17 --------
 arch/microblaze/include/asm/tlbflush.h        |  5 +--
 arch/microblaze/include/asm/uaccess.h         |  5 +--
 arch/microblaze/include/asm/unaligned.h       |  5 +--
 arch/microblaze/include/asm/unistd.h          |  5 +--
 arch/microblaze/include/asm/unwind.h          |  5 +--
 arch/microblaze/include/asm/user.h            |  1 -
 arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c |  7 +---
 arch/microblaze/kernel/cpu/pvr.c              |  1 +
 arch/microblaze/kernel/misc.S                 |  3 +-
Quoted 9 lines
 arch/microblaze/kernel/setup.c                |  1 -
 arch/microblaze/kernel/vmlinux.lds.S          |  3 ++
 48 files changed, 62 insertions(+), 215 deletions(-)
 create mode 100644 arch/microblaze/include/asm/barrier.h
 delete mode 100644 arch/microblaze/include/asm/cputable.h
 delete mode 100644 arch/microblaze/include/asm/hw_irq.h
 delete mode 100644 arch/microblaze/include/asm/tlb.h
 delete mode 100644 arch/microblaze/include/asm/user.h

applied all.
M

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
#17 lore raw
In reply to Michal Simek
Quoted 11 lines · Michal Simek

Hi Rob,

Quoted 7 lines · Rob Herring
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Quoted 7 lines
Quoted 4 lines

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI platforms.

can you please suggest changes which could be done? I have CC Bharat and he could look at it.

Look at the host controller drivers in drivers/pci/controller/. pci-host-{generic,common}.c is a good template to start with as that's a controller with standard config space accesses and no h/w setup needed. Essentially you need to call devm_pci_alloc_host_bridge(), pci_parse_request_of_pci_ranges() and pci_host_probe() with whatever h/w setup you need in between those calls.

Looking at the microblaze PCI code, looks like you may need custom config space accessors which is quite common. Probably all the resource and device scanning can be removed. If you look at arm64, all the arch PCI code is just for ACPI.

Rob

#18 lore raw
Quoted 27 lines · Rob Herring
Quoted 11 lines · Michal Simek

Hi Rob,

Quoted 7 lines · Rob Herring
Quoted 5 lines · Michal Simek

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Quoted 7 lines
Quoted 4 lines

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI platforms.

can you please suggest changes which could be done? I have CC Bharat and he could look at it.

Look at the host controller drivers in drivers/pci/controller/. pci-host-{generic,common}.c is a good template to start with as that's a controller with standard config space accesses and no h/w setup needed. Essentially you need to call devm_pci_alloc_host_bridge(), pci_parse_request_of_pci_ranges() and pci_host_probe() with whatever h/w setup you need in between those calls.

Quoted 4 lines

Looking at the microblaze PCI code, looks like you may need custom config space accessors which is quite common. Probably all the resource and device scanning can be removed. If you look at arm64, all the arch PCI code is just for ACPI.

Thanks Rob.

Bharat: Can you please take a look?

Thanks,
Michal

#19 lore raw
Quoted 15 lines · Rob Herring
Quoted 1 line

On Mon, Feb 17, 2020 at 8:28 AM Michal Simek <[email protected]>

Quoted 5 lines · wrote:
Quoted 5 lines

Hi Rob,

Quoted 1 line · Rob Herring

On Wed, Feb 12, 2020 at 2:58 AM Michal Simek

Quoted 6 lines · <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI

platforms.

Quoted 15 lines
Quoted 3 lines

can you please suggest changes which could be done? I have CC Bharat and he could look at it.

Look at the host controller drivers in drivers/pci/controller/. pci-host-{generic,common}.c is a good template to start with as that's a controller with standard config space accesses and no h/w setup needed. Essentially you need to call devm_pci_alloc_host_bridge(), pci_parse_request_of_pci_ranges() and pci_host_probe() with whatever h/w setup you need in between those calls.

Looking at the microblaze PCI code, looks like you may need custom config space accessors which is quite common. Probably all the resource and device scanning can be removed. If you look at arm64, all the arch PCI code is just for ACPI.

Hi Rob,

Can you please let us know why we might need custom config space accessors ? We tested pci_generic_config_read/write accessors on microblaze, and we did not see any issues.

Regards,
Bharat

#20 lore raw
Quoted 36 lines · Bharat Kumar Gogada
Quoted 16 lines · Rob Herring
Quoted 1 line

On Mon, Feb 17, 2020 at 8:28 AM Michal Simek <[email protected]>

Quoted 5 lines · wrote:
Quoted 5 lines

Hi Rob,

Quoted 1 line · Rob Herring

On Wed, Feb 12, 2020 at 2:58 AM Michal Simek

Quoted 6 lines · <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

I am sending this series as before SMP support.
Most of these patches are clean ups and should be easy to review them. I expect there will be more discussions about SMP support.

Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

While not really related to adding SMP, any chance you or someone could look at moving microblaze PCI support to drivers/pci/? I suspect much of the code should drop out as we have common helpers for much of it now. That would leave only powerpc and mips for DT+PCI

platforms.

Quoted 15 lines
Quoted 3 lines

can you please suggest changes which could be done? I have CC Bharat and he could look at it.

Look at the host controller drivers in drivers/pci/controller/. pci-host-{generic,common}.c is a good template to start with as that's a controller with standard config space accesses and no h/w setup needed. Essentially you need to call devm_pci_alloc_host_bridge(), pci_parse_request_of_pci_ranges() and pci_host_probe() with whatever h/w setup you need in between those calls.

Looking at the microblaze PCI code, looks like you may need custom config space accessors which is quite common. Probably all the resource and device scanning can be removed. If you look at arm64, all the arch PCI code is just for ACPI.

Quoted 5 lines

Hi Rob,

Can you please let us know why we might need custom config space accessors ? We tested pci_generic_config_read/write accessors on microblaze, and we did not see any issues.

I was thinking maybe the indirect code might have to be custom, but maybe everything can be handled in .map_bus().

Rob