All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/6] powerpc: AMP support for 47x
@ 2011-02-01 18:48 Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

These patches add Asynchonous MultiProcessing support for the 47x chipset.
This allows independent OS instances to run on separate cores.

V2:
 1. Replace ugly hack in boot wrapper with generic solution

Dave Kleikamp (6):
  powerpc: Move udbg_early_init() after early_init_devtree()
  powerpc/44x: allow override to hard-coded uart address
  powerpc/47x: allow kernel to be loaded in higher physical memory
  powerpc/44x: don't use tlbivax on AMP systems
  powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  powerpc/476: Create a dts files for two 476 AMP instances under ISS

 arch/powerpc/Kconfig                          |    2 +-
 arch/powerpc/boot/Makefile                    |    6 +-
 arch/powerpc/boot/dts/iss476-amp1.dts         |  119 ++++++++++++++++++++++++
 arch/powerpc/boot/dts/iss476-amp2.dts         |  120 +++++++++++++++++++++++++
 arch/powerpc/boot/treeboot-iss4xx.c           |   22 +++++-
 arch/powerpc/boot/wrapper                     |    7 ++
 arch/powerpc/configs/44x/iss476-smp_defconfig |    6 +-
 arch/powerpc/include/asm/mmu.h                |    2 +-
 arch/powerpc/kernel/head_44x.S                |   42 +++++++--
 arch/powerpc/kernel/setup_32.c                |    6 +-
 arch/powerpc/kernel/udbg_16550.c              |   17 +++-
 arch/powerpc/mm/44x_mmu.c                     |   13 ++-
 arch/powerpc/mm/tlb_nohash.c                  |   21 ++++-
 13 files changed, 359 insertions(+), 24 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/iss476-amp1.dts
 create mode 100644 arch/powerpc/boot/dts/iss476-amp2.dts

-- 
1.7.3.4

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

* [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-02 23:06   ` David Gibson
  2011-02-01 18:48 ` [PATCH V2 2/6] powerpc/44x: allow override to hard-coded uart address Dave Kleikamp
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

so that it can use information from the device tree.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kernel/setup_32.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 1d2fbc9..d1ca976 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -120,12 +120,12 @@ notrace void __init machine_init(unsigned long dt_ptr)
 {
 	lockdep_init();
 
-	/* Enable early debugging if any specified (see udbg.h) */
-	udbg_early_init();
-
 	/* Do some early initialization based on the flat device tree */
 	early_init_devtree(__va(dt_ptr));
 
+	/* Enable early debugging if any specified (see udbg.h) */
+	udbg_early_init();
+
 	probe_machine();
 
 	setup_kdump_trampoline();
-- 
1.7.3.4

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

* [PATCH V2 2/6] powerpc/44x: allow override to hard-coded uart address
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory Dave Kleikamp
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

Allow the early debug uart address to be overridden from the kernel
command line.

I would have preferred use the uart's virtual-reg property, but the device
tree hasn't been unflatted yet, and I don't know a reliable way to find it.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kernel/udbg_16550.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index b4b167b..d36021a 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -219,6 +219,19 @@ void udbg_init_pas_realmode(void)
 #ifdef CONFIG_PPC_EARLY_DEBUG_44x
 #include <platforms/44x/44x.h>
 
+static unsigned long udbg_44x_comport = PPC44x_EARLY_DEBUG_VIRTADDR;
+
+static int __init early_parse_comport(char *p)
+{
+	if (!p || !(*p))
+		return 0;
+
+	udbg_44x_comport = simple_strtoul(p, 0, 16);
+
+	return 0;
+}
+early_param("uart_addr", early_parse_comport);
+
 static void udbg_44x_as1_flush(void)
 {
 	if (udbg_comport) {
@@ -249,9 +262,7 @@ static int udbg_44x_as1_getc(void)
 
 void __init udbg_init_44x_as1(void)
 {
-	udbg_comport =
-		(struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
-
+	udbg_comport = (struct NS16550 __iomem *)udbg_44x_comport;
 	udbg_putc = udbg_44x_as1_putc;
 	udbg_flush = udbg_44x_as1_flush;
 	udbg_getc = udbg_44x_as1_getc;
-- 
1.7.3.4

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

* [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 2/6] powerpc/44x: allow override to hard-coded uart address Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-02  7:45   ` Kumar Gala
  2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/Kconfig                          |    2 +-
 arch/powerpc/configs/44x/iss476-smp_defconfig |    6 ++--
 arch/powerpc/kernel/head_44x.S                |   42 ++++++++++++++++++++-----
 arch/powerpc/mm/44x_mmu.c                     |   13 ++++++--
 4 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 7d69e9b..fa41026 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -827,7 +827,7 @@ config LOWMEM_CAM_NUM
 
 config RELOCATABLE
 	bool "Build a relocatable kernel (EXPERIMENTAL)"
-	depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
+	depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || PPC_47x)
 	help
 	  This builds a kernel image that is capable of running at the
 	  location the kernel is loaded at (some alignment restrictions may
diff --git a/arch/powerpc/configs/44x/iss476-smp_defconfig b/arch/powerpc/configs/44x/iss476-smp_defconfig
index 92f863a..a6eb6ad 100644
--- a/arch/powerpc/configs/44x/iss476-smp_defconfig
+++ b/arch/powerpc/configs/44x/iss476-smp_defconfig
@@ -3,8 +3,8 @@ CONFIG_SMP=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EXPERT=y
@@ -21,10 +21,11 @@ CONFIG_ISS4xx=y
 CONFIG_HZ_100=y
 CONFIG_MATH_EMULATION=y
 CONFIG_IRQ_ALL_CPUS=y
-CONFIG_SPARSE_IRQ=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="root=/dev/issblk0"
 # CONFIG_PCI is not set
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_RELOCATABLE=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -67,7 +68,6 @@ CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
-CONFIG_INOTIFY=y
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
 CONFIG_CRAMFS=y
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index cbb3436..1da9b7e 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -93,6 +93,30 @@ _ENTRY(_start);
 
 	bl	early_init
 
+#ifdef CONFIG_RELOCATABLE
+	/*
+	 * r25 will contain RPN/ERPN for the start address of memory
+	 *
+	 * Add the difference between KERNELBASE and PAGE_OFFSET to the
+	 * start of physical memory to get kernstart_addr.
+	 */
+	lis	r3,kernstart_addr@ha
+	la	r3,kernstart_addr@l(r3)
+
+	lis	r4,KERNELBASE@h
+	ori	r4,r4,KERNELBASE@l
+	lis	r5,PAGE_OFFSET@h
+	ori	r5,r5,PAGE_OFFSET@l
+	subf	r4,r5,r4
+
+	rlwinm	r6,r25,0,28,31	/* ERPN */
+	rlwinm	r7,r25,0,0,3	/* RPN - assuming 256 MB page size */
+	add	r7,r7,r4
+
+	stw	r6,0(r3)
+	stw	r7,4(r3)
+#endif
+
 /*
  * Decide what sort of machine this is and initialize the MMU.
  */
@@ -1001,9 +1025,6 @@ clear_utlb_entry:
 	lis	r3,PAGE_OFFSET@h
 	ori	r3,r3,PAGE_OFFSET@l
 
-	/* Kernel is at the base of RAM */
-	li r4, 0			/* Load the kernel physical address */
-
 	/* Load the kernel PID = 0 */
 	li	r0,0
 	mtspr	SPRN_PID,r0
@@ -1013,9 +1034,8 @@ clear_utlb_entry:
 	clrrwi	r3,r3,12		/* Mask off the effective page number */
 	ori	r3,r3,PPC47x_TLB0_VALID | PPC47x_TLB0_256M
 
-	/* Word 1 */
-	clrrwi	r4,r4,12		/* Mask off the real page number */
-					/* ERPN is 0 for first 4GB page */
+	/* Word 1 - use r25.  RPN is the same as the original entry */
+
 	/* Word 2 */
 	li	r5,0
 	ori	r5,r5,PPC47x_TLB2_S_RWX
@@ -1026,7 +1046,7 @@ clear_utlb_entry:
 	/* We write to way 0 and bolted 0 */
 	lis	r0,0x8800
 	tlbwe	r3,r0,0
-	tlbwe	r4,r0,1
+	tlbwe	r25,r0,1
 	tlbwe	r5,r0,2
 
 /*
@@ -1124,7 +1144,13 @@ head_start_common:
 	lis	r4,interrupt_base@h	/* IVPR only uses the high 16-bits */
 	mtspr	SPRN_IVPR,r4
 
-	addis	r22,r22,KERNELBASE@h
+	/*
+	 * If the kernel was loaded at a non-zero 256 MB page, we need to
+	 * mask off the most significant 4 bits to get the relative address
+	 * from the start of physical memory
+	 */
+	rlwinm	r22,r22,0,4,31
+	addis	r22,r22,PAGE_OFFSET@h
 	mtlr	r22
 	isync
 	blr
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 024acab..f60e006 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -186,10 +186,11 @@ void __init MMU_init_hw(void)
 unsigned long __init mmu_mapin_ram(unsigned long top)
 {
 	unsigned long addr;
+	unsigned long memstart = memstart_addr & ~(PPC_PIN_SIZE - 1);
 
 	/* Pin in enough TLBs to cover any lowmem not covered by the
 	 * initial 256M mapping established in head_44x.S */
-	for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr;
+	for (addr = memstart + PPC_PIN_SIZE; addr < lowmem_end_addr;
 	     addr += PPC_PIN_SIZE) {
 		if (mmu_has_feature(MMU_FTR_TYPE_47x))
 			ppc47x_pin_tlb(addr + PAGE_OFFSET, addr);
@@ -218,19 +219,25 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
 void setup_initial_memory_limit(phys_addr_t first_memblock_base,
 				phys_addr_t first_memblock_size)
 {
+	u64 size;
+
+#ifndef CONFIG_RELOCATABLE
 	/* We don't currently support the first MEMBLOCK not mapping 0
 	 * physical on those processors
 	 */
 	BUG_ON(first_memblock_base != 0);
+#endif
 
 	/* 44x has a 256M TLB entry pinned at boot */
-	memblock_set_current_limit(min_t(u64, first_memblock_size, PPC_PIN_SIZE));
+	size = (min_t(u64, first_memblock_size, PPC_PIN_SIZE));
+	memblock_set_current_limit(first_memblock_base + size);
 }
 
 #ifdef CONFIG_SMP
 void __cpuinit mmu_init_secondary(int cpu)
 {
 	unsigned long addr;
+	unsigned long memstart = memstart_addr & ~(PPC_PIN_SIZE - 1);
 
 	/* Pin in enough TLBs to cover any lowmem not covered by the
 	 * initial 256M mapping established in head_44x.S
@@ -241,7 +248,7 @@ void __cpuinit mmu_init_secondary(int cpu)
 	 * stack. current (r2) isn't initialized, smp_processor_id()
 	 * will not work, current thread info isn't accessible, ...
 	 */
-	for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr;
+	for (addr = memstart + PPC_PIN_SIZE; addr < lowmem_end_addr;
 	     addr += PPC_PIN_SIZE) {
 		if (mmu_has_feature(MMU_FTR_TYPE_47x))
 			ppc47x_pin_tlb(addr + PAGE_OFFSET, addr);
-- 
1.7.3.4

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

* [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
                   ` (2 preceding siblings ...)
  2011-02-01 18:48 ` [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-02  7:48   ` Kumar Gala
                     ` (2 more replies)
  2011-02-01 18:48 ` [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
  2011-02-01 18:48 ` [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS Dave Kleikamp
  5 siblings, 3 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

Since other OS's may be running on the other cores don't use tlbivax

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/include/asm/mmu.h |    2 +-
 arch/powerpc/kernel/setup_32.c |    2 ++
 arch/powerpc/mm/tlb_nohash.c   |   21 ++++++++++++++++++++-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index bb40a06..f3a7c65 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -80,7 +80,7 @@ static inline int mmu_has_feature(unsigned long feature)
 
 extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
 
-/* MMU initialization (64-bit only fo now) */
+/* MMU initialization */
 extern void early_init_mmu(void);
 extern void early_init_mmu_secondary(void);
 
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index d1ca976..e50ead7 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -126,6 +126,8 @@ notrace void __init machine_init(unsigned long dt_ptr)
 	/* Enable early debugging if any specified (see udbg.h) */
 	udbg_early_init();
 
+	early_init_mmu();
+
 	probe_machine();
 
 	setup_kdump_trampoline();
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 2a030d8..b33c5e6 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -35,6 +35,7 @@
 #include <linux/preempt.h>
 #include <linux/spinlock.h>
 #include <linux/memblock.h>
+#include <linux/of_fdt.h>
 
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
@@ -153,6 +154,17 @@ EXPORT_SYMBOL(local_flush_tlb_page);
  */
 #ifdef CONFIG_SMP
 
+static int amp;
+
+#ifdef CONFIG_44x
+void __init early_init_mmu_44x(void)
+{
+	unsigned long root = of_get_flat_dt_root();
+	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
+		amp = 1;
+}
+#endif /* CONFIG_44x */
+
 static DEFINE_RAW_SPINLOCK(tlbivax_lock);
 
 static int mm_is_core_local(struct mm_struct *mm)
@@ -232,7 +244,7 @@ void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
 	cpu_mask = mm_cpumask(mm);
 	if (!mm_is_core_local(mm)) {
 		/* If broadcast tlbivax is supported, use it */
-		if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
+		if (!amp && mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
 			int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
 			if (lock)
 				raw_spin_lock(&tlbivax_lock);
@@ -587,4 +599,11 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
 	/* Finally limit subsequent allocations */
 	memblock_set_current_limit(first_memblock_base + ppc64_rma_size);
 }
+#else /* ! CONFIG_PPC64 */
+void __init early_init_mmu(void)
+{
+#if defined(CONFIG_SMP) && defined(CONFIG_44x)
+	early_init_mmu_44x();
+#endif
+}
 #endif /* CONFIG_PPC64 */
-- 
1.7.3.4

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

* [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
                   ` (3 preceding siblings ...)
  2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-01 19:13   ` Scott Wood
  2011-02-04 14:07   ` Josh Boyer
  2011-02-01 18:48 ` [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS Dave Kleikamp
  5 siblings, 2 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

For AMP, different kernel instances load into separate memory regions.
Read the start of memory from the device tree and limit the memory to what's
specified in the device tree.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/boot/treeboot-iss4xx.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/treeboot-iss4xx.c b/arch/powerpc/boot/treeboot-iss4xx.c
index fcc4495..868c8b4 100644
--- a/arch/powerpc/boot/treeboot-iss4xx.c
+++ b/arch/powerpc/boot/treeboot-iss4xx.c
@@ -34,9 +34,28 @@
 
 BSS_STACK(4096);
 
+static ibm4xx_memstart;
+
 static void iss_4xx_fixups(void)
 {
-	ibm4xx_sdram_fixup_memsize();
+	void *memory;
+	u32 reg[3];
+
+	memory = finddevice("/memory");
+	if (!memory)
+		fatal("Can't find memory node\n");
+	getprop(memory, "reg", reg, sizeof(reg));
+	if (reg[1] || reg[2])
+		/* If the device tree specifies the memory range, use it */
+		ibm4xx_memstart = reg[1];
+	else
+		/* othersize, read it from the SDRAM controller */
+		ibm4xx_sdram_fixup_memsize();
+}
+
+static void *iss_4xx_vmlinux_alloc(unsigned long size)
+{
+	return ibm4xx_memstart;
 }
 
 #define SPRN_PIR	0x11E	/* Processor Indentification Register */
@@ -48,6 +67,7 @@ void platform_init(void)
 
 	simple_alloc_init(_end, avail_ram, 128, 64);
 	platform_ops.fixups = iss_4xx_fixups;
+	platform_ops.vmlinux_alloc = iss_4xx_vmlinux_alloc;
 	platform_ops.exit = ibm44x_dbcr_reset;
 	pir_reg = mfspr(SPRN_PIR);
 	fdt_set_boot_cpuid_phys(_dtb_start, pir_reg);
-- 
1.7.3.4

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

* [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS
  2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
                   ` (4 preceding siblings ...)
  2011-02-01 18:48 ` [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
@ 2011-02-01 18:48 ` Dave Kleikamp
  2011-02-02  2:43   ` David Gibson
  5 siblings, 1 reply; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 18:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Dave Kleikamp

These are completely independent OS instances, each running on 2 cores.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/boot/Makefile            |    6 ++-
 arch/powerpc/boot/dts/iss476-amp1.dts |  119 ++++++++++++++++++++++++++++++++
 arch/powerpc/boot/dts/iss476-amp2.dts |  120 +++++++++++++++++++++++++++++++++
 arch/powerpc/boot/wrapper             |    7 ++
 4 files changed, 251 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/iss476-amp1.dts
 create mode 100644 arch/powerpc/boot/dts/iss476-amp2.dts

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 8917816..99dbc39 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -45,6 +45,8 @@ $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
+$(obj)/treeboot-iss476-amp1.o: BOOTCFLAGS += -mcpu=405
+$(obj)/treeboot-iss476-amp2.o: BOOTCFLAGS += -mcpu=405
 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
 
 
@@ -208,7 +210,9 @@ image-$(CONFIG_KATMAI)			+= cuImage.katmai
 image-$(CONFIG_WARP)			+= cuImage.warp
 image-$(CONFIG_YOSEMITE)		+= cuImage.yosemite
 image-$(CONFIG_ISS4xx)			+= treeImage.iss4xx \
-					   treeImage.iss4xx-mpic
+					   treeImage.iss4xx-mpic \
+					   treeImage.iss476-amp1 \
+					   treeImage.iss476-amp2
 
 # Board ports in arch/powerpc/platform/8xx/Kconfig
 image-$(CONFIG_MPC86XADS)		+= cuImage.mpc866ads
diff --git a/arch/powerpc/boot/dts/iss476-amp1.dts b/arch/powerpc/boot/dts/iss476-amp1.dts
new file mode 100644
index 0000000..b503523
--- /dev/null
+++ b/arch/powerpc/boot/dts/iss476-amp1.dts
@@ -0,0 +1,119 @@
+/*
+ * Device Tree Source for IBM Embedded PPC 476 Platform
+ *
+ * Copyright 2010 Torez Smith, IBM Corporation.
+ *
+ * Based on earlier code:
+ *     Copyright (c) 2006, 2007 IBM Corp.
+ *     Josh Boyer <jwboyer@linux.vnet.ibm.com>, David Gibson <dwg@au1.ibm.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x01f00000 0x00100000;
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <1>;
+	model = "ibm,iss-4xx";
+	compatible = "ibm,iss-4xx", "ibm,47x-AMP";
+	dcr-parent = <&{/cpus/cpu@0}>;
+
+	aliases {
+		serial0 = &UART0;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			model = "PowerPC,4xx"; // real CPU changed in sim
+			reg = <0>;
+			clock-frequency = <100000000>; // 100Mhz :-)
+			timebase-frequency = <100000000>;
+			i-cache-line-size = <32>;
+			d-cache-line-size = <32>;
+			i-cache-size = <32768>;
+			d-cache-size = <32768>;
+			dcr-controller;
+			dcr-access-method = "native";
+			status = "ok";
+		};
+		cpu@1 {
+			device_type = "cpu";
+			model = "PowerPC,4xx"; // real CPU changed in sim
+			reg = <1>;
+			clock-frequency = <100000000>; // 100Mhz :-)
+			timebase-frequency = <100000000>;
+			i-cache-line-size = <32>;
+			d-cache-line-size = <32>;
+			i-cache-size = <32768>;
+			d-cache-size = <32768>;
+			dcr-controller;
+			dcr-access-method = "native";
+			status = "disabled";
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x01f00100>;
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg =  <0x00000000 0x00000000 0x02000000>;
+
+	};
+
+	MPIC: interrupt-controller {
+		compatible = "chrp,open-pic";
+		interrupt-controller;
+		dcr-reg = <0xffc00000 0x00030000>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+
+	};
+
+	plb {
+		compatible = "ibm,plb-4xx", "ibm,plb4"; /* Could be PLB6, doesn't matter */
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges;
+		clock-frequency = <0>; // Filled in by zImage
+
+		POB0: opb {
+			compatible = "ibm,opb-4xx", "ibm,opb";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			/* Wish there was a nicer way of specifying a full 32-bit
+			   range */
+			ranges = <0x00000000 0x00000001 0x00000000 0x80000000
+				  0x80000000 0x00000001 0x80000000 0x80000000>;
+			clock-frequency = <0>; // Filled in by zImage
+			UART0: serial@40000200 {
+				device_type = "serial";
+				compatible = "ns16550a";
+				reg = <0x40000200 0x00000008>;
+				virtual-reg = <0xe0000200>;
+				clock-frequency = <11059200>;
+				current-speed = <115200>;
+				interrupt-parent = <&MPIC>;
+				interrupts = <0x0 0x2>;
+			};
+		};
+	};
+
+	nvrtc {
+		compatible = "ds1743-nvram", "ds1743", "rtc-ds1743";
+		reg = <0 0xEF703000 0x2000>;
+	};
+
+	chosen {
+		linux,stdout-path = "/plb/opb/serial@40000200";
+	};
+};
diff --git a/arch/powerpc/boot/dts/iss476-amp2.dts b/arch/powerpc/boot/dts/iss476-amp2.dts
new file mode 100644
index 0000000..07aed7d
--- /dev/null
+++ b/arch/powerpc/boot/dts/iss476-amp2.dts
@@ -0,0 +1,120 @@
+/*
+ * Device Tree Source for IBM Embedded PPC 476 Platform
+ *
+ * Copyright 2010 Torez Smith, IBM Corporation.
+ *
+ * Based on earlier code:
+ *     Copyright (c) 2006, 2007 IBM Corp.
+ *     Josh Boyer <jwboyer@linux.vnet.ibm.com>, David Gibson <dwg@au1.ibm.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x11f00000 0x00100000;
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <1>;
+	model = "ibm,iss-4xx";
+	compatible = "ibm,iss-4xx", "ibm,47x-AMP";
+	dcr-parent = <&{/cpus/cpu@2}>;
+
+	aliases {
+		serial0 = &UART0;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@2 {
+			device_type = "cpu";
+			model = "PowerPC,4xx"; // real CPU changed in sim
+			reg = <2>;
+			clock-frequency = <100000000>; // 100Mhz :-)
+			timebase-frequency = <100000000>;
+			i-cache-line-size = <32>;
+			d-cache-line-size = <32>;
+			i-cache-size = <32768>;
+			d-cache-size = <32768>;
+			dcr-controller;
+			dcr-access-method = "native";
+			status = "ok";
+		};
+		cpu@3 {
+			device_type = "cpu";
+			model = "PowerPC,4xx"; // real CPU changed in sim
+			reg = <3>;
+			clock-frequency = <100000000>; // 100Mhz :-)
+			timebase-frequency = <100000000>;
+			i-cache-line-size = <32>;
+			d-cache-line-size = <32>;
+			i-cache-size = <32768>;
+			d-cache-size = <32768>;
+			dcr-controller;
+			dcr-access-method = "native";
+			status = "disabled";
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x11f00300>;
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = < 0x0 0x10000000 0x02000000 >;
+
+	};
+
+	MPIC: interrupt-controller {
+		compatible = "chrp,open-pic";
+		interrupt-controller;
+		dcr-reg = <0xffc00000 0x00030000>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+
+	};
+
+	plb {
+		compatible = "ibm,plb-4xx", "ibm,plb4"; /* Could be PLB6, doesn't matter */
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges;
+		clock-frequency = <0>; // Filled in by zImage
+
+		POB0: opb {
+			compatible = "ibm,opb-4xx", "ibm,opb";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			/* Wish there was a nicer way of specifying a full 32-bit
+			   range */
+			ranges = <0x00000000 0x00000001 0x00000000 0x80000000
+				  0x80000000 0x00000001 0x80000000 0x80000000>;
+			clock-frequency = <0>; // Filled in by zImage
+			UART0: serial@40001200 {
+				device_type = "serial";
+				compatible = "ns16550a";
+				reg = <0x40001200 0x00000008>;
+				virtual-reg = <0xe0001200>;
+				clock-frequency = <11059200>;
+				current-speed = <115200>;
+				interrupt-parent = <&MPIC>;
+				interrupts = <0x1 0x2>;
+			};
+		};
+	};
+
+	nvrtc {
+		compatible = "ds1743-nvram", "ds1743", "rtc-ds1743";
+		reg = <0 0xEF703000 0x2000>;
+	};
+
+	chosen {
+		bootargs = "uart_addr=0xf0001200";
+		linux,stdout-path = "/plb/opb/serial@40001200";
+	};
+};
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index cb97e75..8e6ca36 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -244,6 +244,13 @@ gamecube|wii)
 treeboot-iss4xx-mpic)
     platformo="$object/treeboot-iss4xx.o"
     ;;
+treeboot-iss476-amp1)
+    platformo="$object/treeboot-iss4xx.o"
+    ;;
+treeboot-iss476-amp2)
+    platformo="$object/treeboot-iss4xx.o"
+    link_address='0x10400000'
+    ;;
 esac
 
 vmz="$tmpdir/`basename \"$kernel\"`.$ext"
-- 
1.7.3.4

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

* Re: [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  2011-02-01 18:48 ` [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
@ 2011-02-01 19:13   ` Scott Wood
  2011-02-01 19:41     ` Dave Kleikamp
  2011-02-04 14:07   ` Josh Boyer
  1 sibling, 1 reply; 30+ messages in thread
From: Scott Wood @ 2011-02-01 19:13 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, 1 Feb 2011 12:48:45 -0600
Dave Kleikamp <shaggy@linux.vnet.ibm.com> wrote:

> For AMP, different kernel instances load into separate memory regions.
> Read the start of memory from the device tree and limit the memory to what's
> specified in the device tree.
> 
> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
>  arch/powerpc/boot/treeboot-iss4xx.c |   22 +++++++++++++++++++++-
>  1 files changed, 21 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/boot/treeboot-iss4xx.c b/arch/powerpc/boot/treeboot-iss4xx.c
> index fcc4495..868c8b4 100644
> --- a/arch/powerpc/boot/treeboot-iss4xx.c
> +++ b/arch/powerpc/boot/treeboot-iss4xx.c
> @@ -34,9 +34,28 @@
>  
>  BSS_STACK(4096);
>  
> +static ibm4xx_memstart;

type?

> +static void *iss_4xx_vmlinux_alloc(unsigned long size)
> +{
> +	return ibm4xx_memstart;
>  }

Doesn't this generate a warning for implicitly casting int to void *?

-Scott

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

* Re: [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  2011-02-01 19:13   ` Scott Wood
@ 2011-02-01 19:41     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-01 19:41 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev

On Tue, 2011-02-01 at 13:13 -0600, Scott Wood wrote:
> On Tue, 1 Feb 2011 12:48:45 -0600
> Dave Kleikamp <shaggy@linux.vnet.ibm.com> wrote:
> 
> > For AMP, different kernel instances load into separate memory regions.
> > Read the start of memory from the device tree and limit the memory to what's
> > specified in the device tree.
> > 
> > Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > ---
> >  arch/powerpc/boot/treeboot-iss4xx.c |   22 +++++++++++++++++++++-
> >  1 files changed, 21 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/powerpc/boot/treeboot-iss4xx.c b/arch/powerpc/boot/treeboot-iss4xx.c
> > index fcc4495..868c8b4 100644
> > --- a/arch/powerpc/boot/treeboot-iss4xx.c
> > +++ b/arch/powerpc/boot/treeboot-iss4xx.c
> > @@ -34,9 +34,28 @@
> >  
> >  BSS_STACK(4096);
> >  
> > +static ibm4xx_memstart;
> 
> type?

Oops, I'll fix this

> > +static void *iss_4xx_vmlinux_alloc(unsigned long size)
> > +{
> > +	return ibm4xx_memstart;
> >  }
> 
> Doesn't this generate a warning for implicitly casting int to void *?

Probably.  I could have missed it.  I'll fix this too.

> 
> -Scott
> 

Thanks,
Shaggy
-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS
  2011-02-01 18:48 ` [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS Dave Kleikamp
@ 2011-02-02  2:43   ` David Gibson
  2011-02-09 23:03     ` Dave Kleikamp
  0 siblings, 1 reply; 30+ messages in thread
From: David Gibson @ 2011-02-02  2:43 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, Feb 01, 2011 at 12:48:46PM -0600, Dave Kleikamp wrote:
> These are completely independent OS instances, each running on 2
> cores.

[snip]
> +/memreserve/ 0x01f00000 0x00100000;

A comment describing what this reserved section is for would be good.

> +/ {
> +	#address-cells = <2>;
> +	#size-cells = <1>;
> +	model = "ibm,iss-4xx";
> +	compatible = "ibm,iss-4xx", "ibm,47x-AMP";
> +	dcr-parent = <&{/cpus/cpu@0}>;
> +
> +	aliases {
> +		serial0 = &UART0;
> +	};
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			model = "PowerPC,4xx"; // real CPU changed in sim

If the comment is true, then it's probably simpler to just omit the
model property.  I'm pretty sure nothing will look at it.

> +			reg = <0>;
> +			clock-frequency = <100000000>; // 100Mhz :-)
> +			timebase-frequency = <100000000>;> +			i-cache-line-size = <32>;
> +			d-cache-line-size = <32>;
> +			i-cache-size = <32768>;
> +			d-cache-size = <32768>;
> +			dcr-controller;
> +			dcr-access-method = "native";
> +			status = "ok";

Should be "okay" rather than "ok".

[snip]
> +			UART0: serial@40000200 {
> +				device_type = "serial";
> +				compatible = "ns16550a";
> +				reg = <0x40000200 0x00000008>;
> +				virtual-reg = <0xe0000200>;
> +				clock-frequency = <11059200>;
> +				current-speed = <115200>;
> +				interrupt-parent = <&MPIC>;
> +				interrupts = <0x0 0x2>;
> +			};
> +		};
> +	};
> +
> +	nvrtc {
> +		compatible = "ds1743-nvram", "ds1743", "rtc-ds1743";
> +		reg = <0 0xEF703000 0x2000>;
> +	};
> +
> +	chosen {
> +		linux,stdout-path = "/plb/opb/serial@40000200";

You can use a string reference here:
	linux,stdout-path = &UART0;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory
  2011-02-01 18:48 ` [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory Dave Kleikamp
@ 2011-02-02  7:45   ` Kumar Gala
  2011-02-09 22:59     ` Dave Kleikamp
  0 siblings, 1 reply; 30+ messages in thread
From: Kumar Gala @ 2011-02-02  7:45 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev


On Feb 1, 2011, at 12:48 PM, Dave Kleikamp wrote:

> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
> arch/powerpc/Kconfig                          |    2 +-
> arch/powerpc/configs/44x/iss476-smp_defconfig |    6 ++--
> arch/powerpc/kernel/head_44x.S                |   42 =
++++++++++++++++++++-----
> arch/powerpc/mm/44x_mmu.c                     |   13 ++++++--
> 4 files changed, 48 insertions(+), 15 deletions(-)

Would be nice to expand in the commit message on what "higher physical" =
means.

- k=

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
@ 2011-02-02  7:48   ` Kumar Gala
  2011-02-02 13:19     ` Dave Kleikamp
  2011-02-02 23:08   ` David Gibson
  2011-02-04 13:56   ` Josh Boyer
  2 siblings, 1 reply; 30+ messages in thread
From: Kumar Gala @ 2011-02-02  7:48 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev


On Feb 1, 2011, at 12:48 PM, Dave Kleikamp wrote:

> Since other OS's may be running on the other cores don't use tlbivax

Are you guys building SMP kernel for use with AMP?  Just wondering why =
you'd be using tlbivax at all.

- k

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-02  7:48   ` Kumar Gala
@ 2011-02-02 13:19     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-02 13:19 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

On Wed, 2011-02-02 at 01:48 -0600, Kumar Gala wrote:
> On Feb 1, 2011, at 12:48 PM, Dave Kleikamp wrote:
> 
> > Since other OS's may be running on the other cores don't use tlbivax
> 
> Are you guys building SMP kernel for use with AMP?  Just wondering why you'd be using tlbivax at all.

Yes, for instance, a 4-core chip could run two 2-way instances.

Shaggy
-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-02-01 18:48 ` [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
@ 2011-02-02 23:06   ` David Gibson
  2011-02-03  0:00     ` Dave Kleikamp
  0 siblings, 1 reply; 30+ messages in thread
From: David Gibson @ 2011-02-02 23:06 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> so that it can use information from the device tree.

Hrm.  On the other hand this means that the early_init_devtree() code
can't benefit from hardcoded early debugging.  Since you don't
actually appear to use devtree information in udbg_early_init() in the
latest series, I'd suggest dropping this patch.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
  2011-02-02  7:48   ` Kumar Gala
@ 2011-02-02 23:08   ` David Gibson
  2011-02-02 23:53     ` Dave Kleikamp
  2011-02-04 13:56   ` Josh Boyer
  2 siblings, 1 reply; 30+ messages in thread
From: David Gibson @ 2011-02-02 23:08 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> Since other OS's may be running on the other cores don't use tlbivax

[snip]
> +#ifdef CONFIG_44x
> +void __init early_init_mmu_44x(void)
> +{
> +	unsigned long root = of_get_flat_dt_root();
> +	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> +		amp = 1;
> +}
> +#endif /* CONFIG_44x */

A test against a hardcoded compatible string seems a nasty way to do
this.  Maybe we should define a new boolean property for the root
node.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-02 23:08   ` David Gibson
@ 2011-02-02 23:53     ` Dave Kleikamp
  2011-02-03  5:03       ` David Gibson
  0 siblings, 1 reply; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-02 23:53 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Thu, 2011-02-03 at 10:08 +1100, David Gibson wrote:
> On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> > Since other OS's may be running on the other cores don't use tlbivax
> 
> [snip]
> > +#ifdef CONFIG_44x
> > +void __init early_init_mmu_44x(void)
> > +{
> > +	unsigned long root = of_get_flat_dt_root();
> > +	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> > +		amp = 1;
> > +}
> > +#endif /* CONFIG_44x */
> 
> A test against a hardcoded compatible string seems a nasty way to do
> this.  Maybe we should define a new boolean property for the root
> node.

I'm not crazy about this string, but I needed something in the device
tree to key off of.  Freescale has something similar (i.e.
MPC8572DS-CAMP), so I chose to follow their example.  I'd be happy to
replace it with a boolean property.  Any objection to just using "amp"?

Thanks,
Shaggy
-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-02-02 23:06   ` David Gibson
@ 2011-02-03  0:00     ` Dave Kleikamp
  2011-02-07  8:29       ` David Gibson
  0 siblings, 1 reply; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-03  0:00 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Thu, 2011-02-03 at 10:06 +1100, David Gibson wrote:
> On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> > so that it can use information from the device tree.
> 
> Hrm.  On the other hand this means that the early_init_devtree() code
> can't benefit from hardcoded early debugging.  Since you don't
> actually appear to use devtree information in udbg_early_init() in the
> latest series, I'd suggest dropping this patch.

Patch 2 depends on early_init_devtree() being run.  Until then, I don't
know of a way to get at the bootargs.
-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-02 23:53     ` Dave Kleikamp
@ 2011-02-03  5:03       ` David Gibson
  2011-02-03 23:15         ` Dave Kleikamp
  0 siblings, 1 reply; 30+ messages in thread
From: David Gibson @ 2011-02-03  5:03 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Wed, Feb 02, 2011 at 05:53:59PM -0600, Dave Kleikamp wrote:
> On Thu, 2011-02-03 at 10:08 +1100, David Gibson wrote:
> > On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> > > Since other OS's may be running on the other cores don't use tlbivax
> > 
> > [snip]
> > > +#ifdef CONFIG_44x
> > > +void __init early_init_mmu_44x(void)
> > > +{
> > > +	unsigned long root = of_get_flat_dt_root();
> > > +	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> > > +		amp = 1;
> > > +}
> > > +#endif /* CONFIG_44x */
> > 
> > A test against a hardcoded compatible string seems a nasty way to do
> > this.  Maybe we should define a new boolean property for the root
> > node.
> 
> I'm not crazy about this string, but I needed something in the device
> tree to key off of.  Freescale has something similar (i.e.
> MPC8572DS-CAMP), so I chose to follow their example.  I'd be happy to
> replace it with a boolean property.  Any objection to just using
> "amp"?

Bit too short, I think.  I'd suggest either spelling out
'asymmetric-multiprocessor' or 'cooperative-partition' (a more
accurate term, IMO).

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-03  5:03       ` David Gibson
@ 2011-02-03 23:15         ` Dave Kleikamp
  2011-02-04  2:22           ` Timur Tabi
  2011-02-07  8:30           ` David Gibson
  0 siblings, 2 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-03 23:15 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Thu, 2011-02-03 at 16:03 +1100, David Gibson wrote:
> On Wed, Feb 02, 2011 at 05:53:59PM -0600, Dave Kleikamp wrote:
> > On Thu, 2011-02-03 at 10:08 +1100, David Gibson wrote:
> > > On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> > > > Since other OS's may be running on the other cores don't use tlbivax
> > > 
> > > [snip]
> > > > +#ifdef CONFIG_44x
> > > > +void __init early_init_mmu_44x(void)
> > > > +{
> > > > +	unsigned long root = of_get_flat_dt_root();
> > > > +	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> > > > +		amp = 1;
> > > > +}
> > > > +#endif /* CONFIG_44x */
> > > 
> > > A test against a hardcoded compatible string seems a nasty way to do
> > > this.  Maybe we should define a new boolean property for the root
> > > node.
> > 
> > I'm not crazy about this string, but I needed something in the device
> > tree to key off of.  Freescale has something similar (i.e.
> > MPC8572DS-CAMP), so I chose to follow their example.  I'd be happy to
> > replace it with a boolean property.  Any objection to just using
> > "amp"?
> 
> Bit too short, I think.  I'd suggest either spelling out
> 'asymmetric-multiprocessor' or 'cooperative-partition' (a more
> accurate term, IMO).

I could be wrong, but I thought the A stands for Asynchronous, not
Asymmetric.  I thought Asymmetric means that different types of tasks
run on the secondary processors, as on the Cell.  Anyway, going with
'cooperative-partition' would avoid that confusion.

Shaggy
-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-03 23:15         ` Dave Kleikamp
@ 2011-02-04  2:22           ` Timur Tabi
  2011-02-07  8:30           ` David Gibson
  1 sibling, 0 replies; 30+ messages in thread
From: Timur Tabi @ 2011-02-04  2:22 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev, David Gibson

On Thu, Feb 3, 2011 at 5:15 PM, Dave Kleikamp <shaggy@linux.vnet.ibm.com> w=
rote:

>> Bit too short, I think. =A0I'd suggest either spelling out
>> 'asymmetric-multiprocessor' or 'cooperative-partition' (a more
>> accurate term, IMO).
>
> I could be wrong, but I thought the A stands for Asynchronous, not
> Asymmetric. =A0I thought Asymmetric means that different types of tasks
> run on the secondary processors, as on the Cell. =A0Anyway, going with
> 'cooperative-partition' would avoid that confusion.

Well, if we pretend that everyone already knows what the "A" stands
for, that's not going to avoid confusion.  Some people still are going
to be wrong.  It would be great if we could settle the matter once and
for all.

I've always thought the A stood for asymmetric, since you're running
multiple cores, but each OS is not aware of the others.  It doesn't
necessarily have to be two copies of Linux.  In fact, it usually
isn't.

As for "MPC8572DS-CAMP", I've always hated that.  A specific property
that defines an AMP environment is a much better idea.

--=20
Timur Tabi
Linux kernel developer at Freescale

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
  2011-02-02  7:48   ` Kumar Gala
  2011-02-02 23:08   ` David Gibson
@ 2011-02-04 13:56   ` Josh Boyer
  2011-02-04 14:44     ` Dave Kleikamp
  2 siblings, 1 reply; 30+ messages in thread
From: Josh Boyer @ 2011-02-04 13:56 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
>diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
>index 2a030d8..b33c5e6 100644
>--- a/arch/powerpc/mm/tlb_nohash.c
>+++ b/arch/powerpc/mm/tlb_nohash.c
>@@ -35,6 +35,7 @@
> #include <linux/preempt.h>
> #include <linux/spinlock.h>
> #include <linux/memblock.h>
>+#include <linux/of_fdt.h>
>
> #include <asm/tlbflush.h>
> #include <asm/tlb.h>
>@@ -153,6 +154,17 @@ EXPORT_SYMBOL(local_flush_tlb_page);
>  */
> #ifdef CONFIG_SMP
>
>+static int amp;
>+
>+#ifdef CONFIG_44x
>+void __init early_init_mmu_44x(void)
>+{
>+	unsigned long root = of_get_flat_dt_root();
>+	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
>+		amp = 1;
>+}
>+#endif /* CONFIG_44x */

Something aside from the property thing sits weirdly with me on this as
well.

We have this guarded by CONFIG_44x but also CONFIG_SMP, and we're doing
476 specific checks (for now).  There is at least one 44x board that has
dual-CPUs (AMCC Arches, iirc) that can theoretically be run in AMP mode.
However, it won't be using an SMP kernel because it's a single core per CPU.
Admittedly I don't think it supports the tlbivax instruction either so
the patch as it stands doesn't impact that theoretical scenario much.

I do wonder if we really need to guard the call to this behind
CONFIG_SMP though.  Maybe a slight performance increase I suppose, but
if we wind up using the AMP check elsewhere then it might be needed
anyway.  Something to think about.

Oh, and I agree 'cooperative-partition' or something would be a better
check.

josh

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

* Re: [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  2011-02-01 18:48 ` [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
  2011-02-01 19:13   ` Scott Wood
@ 2011-02-04 14:07   ` Josh Boyer
  2011-02-04 14:44     ` Dave Kleikamp
  1 sibling, 1 reply; 30+ messages in thread
From: Josh Boyer @ 2011-02-04 14:07 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Tue, Feb 01, 2011 at 12:48:45PM -0600, Dave Kleikamp wrote:
>+static ibm4xx_memstart;
>+
> static void iss_4xx_fixups(void)
> {
>-	ibm4xx_sdram_fixup_memsize();
>+	void *memory;
>+	u32 reg[3];
>+
>+	memory = finddevice("/memory");
>+	if (!memory)
>+		fatal("Can't find memory node\n");
>+	getprop(memory, "reg", reg, sizeof(reg));
>+	if (reg[1] || reg[2])

Wouldn't this test allow for a faulty device tree that specified a 0
size (0x0 in reg[2])?  Maybe just check reg[2] for non-zero instead?

josh

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-04 13:56   ` Josh Boyer
@ 2011-02-04 14:44     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-04 14:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, 2011-02-04 at 08:56 -0500, Josh Boyer wrote:
> On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> >diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
> >index 2a030d8..b33c5e6 100644
> >--- a/arch/powerpc/mm/tlb_nohash.c
> >+++ b/arch/powerpc/mm/tlb_nohash.c
> >@@ -35,6 +35,7 @@
> > #include <linux/preempt.h>
> > #include <linux/spinlock.h>
> > #include <linux/memblock.h>
> >+#include <linux/of_fdt.h>
> >
> > #include <asm/tlbflush.h>
> > #include <asm/tlb.h>
> >@@ -153,6 +154,17 @@ EXPORT_SYMBOL(local_flush_tlb_page);
> >  */
> > #ifdef CONFIG_SMP
> >
> >+static int amp;
> >+
> >+#ifdef CONFIG_44x
> >+void __init early_init_mmu_44x(void)
> >+{
> >+	unsigned long root = of_get_flat_dt_root();
> >+	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> >+		amp = 1;
> >+}
> >+#endif /* CONFIG_44x */
> 
> Something aside from the property thing sits weirdly with me on this as
> well.
> 
> We have this guarded by CONFIG_44x but also CONFIG_SMP, and we're doing
> 476 specific checks (for now).  There is at least one 44x board that has
> dual-CPUs (AMCC Arches, iirc) that can theoretically be run in AMP mode.
> However, it won't be using an SMP kernel because it's a single core per CPU.
> Admittedly I don't think it supports the tlbivax instruction either so
> the patch as it stands doesn't impact that theoretical scenario much.

I should have used CONFIG_PPC_47x here.

> I do wonder if we really need to guard the call to this behind
> CONFIG_SMP though.  Maybe a slight performance increase I suppose, but
> if we wind up using the AMP check elsewhere then it might be needed
> anyway.  Something to think about.

I agree that it's awkward.  The code affected by this is all behind
CONFIG_SMP.  There's no reason to use tlbivax, or the alternate ipi, in
a uni kernel.  An alternative would be to define early_init_mmu_44x (or
47x) outside of CONFIG_SMP, but the contents of the function would still
be inside CONFIG_SMP, and it would be an empty function otherwise.

> Oh, and I agree 'cooperative-partition' or something would be a better
> check.

I'm good with that then.

> 
> josh

-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
  2011-02-04 14:07   ` Josh Boyer
@ 2011-02-04 14:44     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-04 14:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, 2011-02-04 at 09:07 -0500, Josh Boyer wrote:
> On Tue, Feb 01, 2011 at 12:48:45PM -0600, Dave Kleikamp wrote:
> >+static ibm4xx_memstart;
> >+
> > static void iss_4xx_fixups(void)
> > {
> >-	ibm4xx_sdram_fixup_memsize();
> >+	void *memory;
> >+	u32 reg[3];
> >+
> >+	memory = finddevice("/memory");
> >+	if (!memory)
> >+		fatal("Can't find memory node\n");
> >+	getprop(memory, "reg", reg, sizeof(reg));
> >+	if (reg[1] || reg[2])
> 
> Wouldn't this test allow for a faulty device tree that specified a 0
> size (0x0 in reg[2])?  Maybe just check reg[2] for non-zero instead?

That make sense.

> 
> josh

-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-02-03  0:00     ` Dave Kleikamp
@ 2011-02-07  8:29       ` David Gibson
  2011-03-02  3:37         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 30+ messages in thread
From: David Gibson @ 2011-02-07  8:29 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Wed, Feb 02, 2011 at 06:00:25PM -0600, Dave Kleikamp wrote:
> On Thu, 2011-02-03 at 10:06 +1100, David Gibson wrote:
> > On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> > > so that it can use information from the device tree.
> > 
> > Hrm.  On the other hand this means that the early_init_devtree() code
> > can't benefit from hardcoded early debugging.  Since you don't
> > actually appear to use devtree information in udbg_early_init() in the
> > latest series, I'd suggest dropping this patch.
> 
> Patch 2 depends on early_init_devtree() being run.  Until then, I don't
> know of a way to get at the bootargs.

Ah, yes.  Drat.


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
  2011-02-03 23:15         ` Dave Kleikamp
  2011-02-04  2:22           ` Timur Tabi
@ 2011-02-07  8:30           ` David Gibson
  1 sibling, 0 replies; 30+ messages in thread
From: David Gibson @ 2011-02-07  8:30 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev

On Thu, Feb 03, 2011 at 05:15:57PM -0600, Dave Kleikamp wrote:
> On Thu, 2011-02-03 at 16:03 +1100, David Gibson wrote:
> > On Wed, Feb 02, 2011 at 05:53:59PM -0600, Dave Kleikamp wrote:
> > > On Thu, 2011-02-03 at 10:08 +1100, David Gibson wrote:
> > > > On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> > > > > Since other OS's may be running on the other cores don't use tlbivax
> > > > 
> > > > [snip]
> > > > > +#ifdef CONFIG_44x
> > > > > +void __init early_init_mmu_44x(void)
> > > > > +{
> > > > > +	unsigned long root = of_get_flat_dt_root();
> > > > > +	if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> > > > > +		amp = 1;
> > > > > +}
> > > > > +#endif /* CONFIG_44x */
> > > > 
> > > > A test against a hardcoded compatible string seems a nasty way to do
> > > > this.  Maybe we should define a new boolean property for the root
> > > > node.
> > > 
> > > I'm not crazy about this string, but I needed something in the device
> > > tree to key off of.  Freescale has something similar (i.e.
> > > MPC8572DS-CAMP), so I chose to follow their example.  I'd be happy to
> > > replace it with a boolean property.  Any objection to just using
> > > "amp"?
> > 
> > Bit too short, I think.  I'd suggest either spelling out
> > 'asymmetric-multiprocessor' or 'cooperative-partition' (a more
> > accurate term, IMO).
> 
> I could be wrong, but I thought the A stands for Asynchronous, not
> Asymmetric.  I thought Asymmetric means that different types of tasks
> run on the secondary processors, as on the Cell.

Yeah, I thought so too, but Freescale at least seem to use it this
way.  'Asynchronous' would make even less sense.

>  Anyway, going with
> 'cooperative-partition' would avoid that confusion.
> 
> Shaggy

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory
  2011-02-02  7:45   ` Kumar Gala
@ 2011-02-09 22:59     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-09 22:59 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

On Wed, 2011-02-02 at 01:45 -0600, Kumar Gala wrote:
> On Feb 1, 2011, at 12:48 PM, Dave Kleikamp wrote:
> 
> > Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > ---
> > arch/powerpc/Kconfig                          |    2 +-
> > arch/powerpc/configs/44x/iss476-smp_defconfig |    6 ++--
> > arch/powerpc/kernel/head_44x.S                |   42 ++++++++++++++++++++-----
> > arch/powerpc/mm/44x_mmu.c                     |   13 ++++++--
> > 4 files changed, 48 insertions(+), 15 deletions(-)
> 
> Would be nice to expand in the commit message on what "higher physical" means.

right.  should be clear in the next set

-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS
  2011-02-02  2:43   ` David Gibson
@ 2011-02-09 23:03     ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-02-09 23:03 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Wed, 2011-02-02 at 13:43 +1100, David Gibson wrote:
> On Tue, Feb 01, 2011 at 12:48:46PM -0600, Dave Kleikamp wrote:
> > These are completely independent OS instances, each running on 2
> > cores.
> 
> [snip]
> > +/memreserve/ 0x01f00000 0x00100000;
> 
> A comment describing what this reserved section is for would be good.

I with I knew what it was for.  I've blindly carried it along for a
while.  Removing it doesn't appear to do any harm.  Ben, any idea why
this was ever in here?

> > +/ {
> > +	#address-cells = <2>;
> > +	#size-cells = <1>;
> > +	model = "ibm,iss-4xx";
> > +	compatible = "ibm,iss-4xx", "ibm,47x-AMP";
> > +	dcr-parent = <&{/cpus/cpu@0}>;
> > +
> > +	aliases {
> > +		serial0 = &UART0;
> > +	};
> > +
> > +	cpus {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		cpu@0 {
> > +			device_type = "cpu";
> > +			model = "PowerPC,4xx"; // real CPU changed in sim
> 
> If the comment is true, then it's probably simpler to just omit the
> model property.  I'm pretty sure nothing will look at it.

It doesn't appear to be true.  Another bit I've been carrying along
without checking it.  Removing the comment.

> 
> > +			reg = <0>;
> > +			clock-frequency = <100000000>; // 100Mhz :-)
> > +			timebase-frequency = <100000000>;> +			i-cache-line-size = <32>;
> > +			d-cache-line-size = <32>;
> > +			i-cache-size = <32768>;
> > +			d-cache-size = <32768>;
> > +			dcr-controller;
> > +			dcr-access-method = "native";
> > +			status = "ok";
> 
> Should be "okay" rather than "ok".

okay :-)

> 
> [snip]
> > +			UART0: serial@40000200 {
> > +				device_type = "serial";
> > +				compatible = "ns16550a";
> > +				reg = <0x40000200 0x00000008>;
> > +				virtual-reg = <0xe0000200>;
> > +				clock-frequency = <11059200>;
> > +				current-speed = <115200>;
> > +				interrupt-parent = <&MPIC>;
> > +				interrupts = <0x0 0x2>;
> > +			};
> > +		};
> > +	};
> > +
> > +	nvrtc {
> > +		compatible = "ds1743-nvram", "ds1743", "rtc-ds1743";
> > +		reg = <0 0xEF703000 0x2000>;
> > +	};
> > +
> > +	chosen {
> > +		linux,stdout-path = "/plb/opb/serial@40000200";
> 
> You can use a string reference here:
> 	linux,stdout-path = &UART0;

no problem

Shaggy

-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-02-07  8:29       ` David Gibson
@ 2011-03-02  3:37         ` Benjamin Herrenschmidt
  2011-03-02 13:03           ` Dave Kleikamp
  0 siblings, 1 reply; 30+ messages in thread
From: Benjamin Herrenschmidt @ 2011-03-02  3:37 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Dave Kleikamp

On Mon, 2011-02-07 at 19:29 +1100, David Gibson wrote:
> On Wed, Feb 02, 2011 at 06:00:25PM -0600, Dave Kleikamp wrote:
> > On Thu, 2011-02-03 at 10:06 +1100, David Gibson wrote:
> > > On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> > > > so that it can use information from the device tree.
> > > 
> > > Hrm.  On the other hand this means that the early_init_devtree() code
> > > can't benefit from hardcoded early debugging.  Since you don't
> > > actually appear to use devtree information in udbg_early_init() in the
> > > latest series, I'd suggest dropping this patch.
> > 
> > Patch 2 depends on early_init_devtree() being run.  Until then, I don't
> > know of a way to get at the bootargs.
> 
> Ah, yes.  Drat.

Doesn't matter. _Early_ debug has (or should have) the address in
the .config file anyways, so it really shouldn't have to care about the
arguments.

So I'll drop this patch.

There are plenty of reasons why we want to be able to use the early
debug stuff to debug what's happening inside early_init_devtree() :-)

Cheers,
Ben.

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

* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
  2011-03-02  3:37         ` Benjamin Herrenschmidt
@ 2011-03-02 13:03           ` Dave Kleikamp
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Kleikamp @ 2011-03-02 13:03 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, David Gibson

On Wed, 2011-03-02 at 14:37 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2011-02-07 at 19:29 +1100, David Gibson wrote:
> > On Wed, Feb 02, 2011 at 06:00:25PM -0600, Dave Kleikamp wrote:
> > > On Thu, 2011-02-03 at 10:06 +1100, David Gibson wrote:
> > > > On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> > > > > so that it can use information from the device tree.
> > > > 
> > > > Hrm.  On the other hand this means that the early_init_devtree() code
> > > > can't benefit from hardcoded early debugging.  Since you don't
> > > > actually appear to use devtree information in udbg_early_init() in the
> > > > latest series, I'd suggest dropping this patch.
> > > 
> > > Patch 2 depends on early_init_devtree() being run.  Until then, I don't
> > > know of a way to get at the bootargs.
> > 
> > Ah, yes.  Drat.
> 
> Doesn't matter. _Early_ debug has (or should have) the address in
> the .config file anyways, so it really shouldn't have to care about the
> arguments.
> 
> So I'll drop this patch.
> 
> There are plenty of reasons why we want to be able to use the early
> debug stuff to debug what's happening inside early_init_devtree() :-)

Fair enough.  I wasn't sure this was the right thing to do.  It's either
turn off early debug for AMP, or build separate kernels with a different
address in .config.

Shaggy

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

end of thread, other threads:[~2011-03-02 13:03 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 18:48 [PATCH V2 0/6] powerpc: AMP support for 47x Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
2011-02-02 23:06   ` David Gibson
2011-02-03  0:00     ` Dave Kleikamp
2011-02-07  8:29       ` David Gibson
2011-03-02  3:37         ` Benjamin Herrenschmidt
2011-03-02 13:03           ` Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 2/6] powerpc/44x: allow override to hard-coded uart address Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory Dave Kleikamp
2011-02-02  7:45   ` Kumar Gala
2011-02-09 22:59     ` Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
2011-02-02  7:48   ` Kumar Gala
2011-02-02 13:19     ` Dave Kleikamp
2011-02-02 23:08   ` David Gibson
2011-02-02 23:53     ` Dave Kleikamp
2011-02-03  5:03       ` David Gibson
2011-02-03 23:15         ` Dave Kleikamp
2011-02-04  2:22           ` Timur Tabi
2011-02-07  8:30           ` David Gibson
2011-02-04 13:56   ` Josh Boyer
2011-02-04 14:44     ` Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
2011-02-01 19:13   ` Scott Wood
2011-02-01 19:41     ` Dave Kleikamp
2011-02-04 14:07   ` Josh Boyer
2011-02-04 14:44     ` Dave Kleikamp
2011-02-01 18:48 ` [PATCH V2 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS Dave Kleikamp
2011-02-02  2:43   ` David Gibson
2011-02-09 23:03     ` Dave Kleikamp

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.