[PATCH 3/3] powerpc: mpc83xx_defconfig: enable math emulation and ucc_geth

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6734d

10 messages, 7 authors, 2008-03-10 · open the first message on its own page

[PATCH 3/3] powerpc: mpc83xx_defconfig: enable math emulation and ucc_geth

From: Kim Phillips <hidden>
Date: 2008-02-02 00:10:10

and some PHYs mpc83xx boards use.

Signed-off-by: Kim Phillips <redacted>
---
 arch/powerpc/configs/mpc83xx_defconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 31bdbf3..a9807f0 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -186,7 +186,7 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
-# CONFIG_MATH_EMULATION is not set
+CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -416,14 +416,14 @@ CONFIG_PHYLIB=y
 # MII PHY device drivers
 #
 CONFIG_MARVELL_PHY=y
-# CONFIG_DAVICOM_PHY is not set
+CONFIG_DAVICOM_PHY=y
 # CONFIG_QSEMI_PHY is not set
 # CONFIG_LXT_PHY is not set
 # CONFIG_CICADA_PHY is not set
-# CONFIG_VITESSE_PHY is not set
+CONFIG_VITESSE_PHY=y
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
+CONFIG_ICPLUS_PHY=y
 # CONFIG_FIXED_PHY is not set
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
@@ -436,7 +436,7 @@ CONFIG_MII=y
 CONFIG_NETDEV_1000=y
 CONFIG_GIANFAR=y
 # CONFIG_GFAR_NAPI is not set
-# CONFIG_UCC_GETH is not set
+CONFIG_UCC_GETH=y
 CONFIG_NETDEV_10000=y
 
 #
-- 
1.5.2.2

[PATCH 1/1] [PPC] 8xx swap bug-fix

From: Yuri Tikhonov <hidden>
Date: 2008-02-02 07:47:26

 Hello,

 Here is the patch which makes Linux-2.6 swap routines operate correctly on
the ppc-8xx-based machines.

Signed-off-by: Yuri Tikhonov <redacted>
--
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index eb8d26f..321bda2 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -329,8 +329,18 @@ InstructionTLBMiss:
 	mfspr	r11, SPRN_MD_TWC	/* ....and get the pte address */
 	lwz	r10, 0(r11)	/* Get the pte */
 
+#ifdef CONFIG_SWAP
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
+	stw	r10, 0(r11)
+4:
+#else
 	ori	r10, r10, _PAGE_ACCESSED
 	stw	r10, 0(r11)
+#endif
 
 	/* The Linux PTE won't go exactly into the MMU TLB.
 	 * Software indicator bits 21, 22 and 28 must be clear.
@@ -395,8 +405,17 @@ DataStoreTLBMiss:
 	DO_8xx_CPU6(0x3b80, r3)
 	mtspr	SPRN_MD_TWC, r11
 
-	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
+#ifdef CONFIG_SWAP
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+4:
+	/* and update pte in table */
+#else
 	ori	r10, r10, _PAGE_ACCESSED
+#endif
+	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
 	stw	r10, 0(r11)
 
 	/* The Linux PTE won't go exactly into the MMU TLB.
@@ -575,7 +594,16 @@ DataTLBError:
 
 	/* Update 'changed', among others.
 	*/
+#ifdef CONFIG_SWAP
+	ori	r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+4:
+#else
 	ori	r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+#endif
 	mfspr	r11, SPRN_MD_TWC		/* Get pte address again */
 	stw	r10, 0(r11)		/* and update pte in table */
 
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index c159315..76717ff 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -341,14 +341,6 @@ extern unsigned long ioremap_bot, ioremap_base;
 #define _PMD_PAGE_MASK	0x000c
 #define _PMD_PAGE_8M	0x000c
 
-/*
- * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
- * for an address even if _PAGE_PRESENT is not set, as a performance
- * optimization.  This is a bug if you ever want to use swap unless
- * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
- * definitions for __swp_entry etc. below, which would be gross.
- *  -- paulus
- */
 #define _PTE_NONE_MASK _PAGE_ACCESSED
 
 #else /* CONFIG_6xx */
-- 
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Jochen Friedrich <jochen@scram.de>
Date: 2008-02-02 11:21:36

Hi Yuri,
 Here is the patch which makes Linux-2.6 swap routines operate correctly on
the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?

Thanks,
Jochen 

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Yuri Tikhonov <hidden>
Date: 2008-02-02 11:30:52

 Hi Jochen,

 The board for which this fix was developed is one of these (ivms8). Here are 
some other: rpxlite, TQM860L, rpxcllf, bseip, FADS, and etc...

  Just do grep -r "CONFIG_8xx=y" arch/ppc/configs/ and grep -r "CONFIG_8xx=y" 
arch/powerpc/configs/ :)

 Regards, Yuri

On Saturday 02 February 2008 14:22, you wrote:
...
quoted
 Here is the patch which makes Linux-2.6 swap routines operate correctly 
on
quoted
the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?

Thanks,
Jochen 
-- 
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Scott Wood <hidden>
Date: 2008-02-04 18:25:19

On Sat, Feb 02, 2008 at 12:22:17PM +0100, Jochen Friedrich wrote:
Hi Yuri,
quoted
 Here is the patch which makes Linux-2.6 swap routines operate correctly on
the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?
More importantly, is this something that is also broken in arch/powerpc?  It
looks like it has the same code...

-Scott

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Vitaly Bordug <hidden>
Date: 2008-02-04 22:39:14

On Mon, 4 Feb 2008 12:24:21 -0600
Scott Wood wrote:
On Sat, Feb 02, 2008 at 12:22:17PM +0100, Jochen Friedrich wrote:
quoted
Hi Yuri,
quoted
 Here is the patch which makes Linux-2.6 swap routines operate
correctly on the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?
More importantly, is this something that is also broken in
arch/powerpc?  It looks like it has the same code...
yes, it is. Though there is currently no best-at-all solution, this looks worth trying.
I'll have a look how the 8xx feels under load and report back.

-- 
Sincerely, Vitaly

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Yuri Tikhonov <hidden>
Date: 2008-02-05 06:46:34

 Hi Scott,

 You are right. The TLB handlers for 8xx in arch/powerpc branch set the 
PAGE_ACCESSED flag unconditionally too. And the 
include/asm-powerpc/pgtable-ppc32.h file still includes the comment that this 
is the bug. So, probably the corresponding patch for powerpc branch will be 
usefull. Does anybody use swap with some of the 8xx-based boards supported in 
powerpc branch ?

 Regards, Yuri

On Monday 04 February 2008 21:24, Scott Wood wrote:
On Sat, Feb 02, 2008 at 12:22:17PM +0100, Jochen Friedrich wrote:
quoted
Hi Yuri,
quoted
 Here is the patch which makes Linux-2.6 swap routines operate correctly 
on
quoted
quoted
the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?
More importantly, is this something that is also broken in arch/powerpc?  It
looks like it has the same code...

-Scott
-- 
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-02-05 07:37:34

On Sat, 2008-02-02 at 10:47 +0300, Yuri Tikhonov wrote:
Hello,

 Here is the patch which makes Linux-2.6 swap routines operate correctly on
the ppc-8xx-based machines.
Best is to just remove writeback completely and let the generic
code handle it.

Ben.
quoted hunk
Signed-off-by: Yuri Tikhonov <redacted>
--
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index eb8d26f..321bda2 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -329,8 +329,18 @@ InstructionTLBMiss:
 	mfspr	r11, SPRN_MD_TWC	/* ....and get the pte address */
 	lwz	r10, 0(r11)	/* Get the pte */
 
+#ifdef CONFIG_SWAP
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
+	stw	r10, 0(r11)
+4:
+#else
 	ori	r10, r10, _PAGE_ACCESSED
 	stw	r10, 0(r11)
+#endif
 
 	/* The Linux PTE won't go exactly into the MMU TLB.
 	 * Software indicator bits 21, 22 and 28 must be clear.
@@ -395,8 +405,17 @@ DataStoreTLBMiss:
 	DO_8xx_CPU6(0x3b80, r3)
 	mtspr	SPRN_MD_TWC, r11
 
-	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
+#ifdef CONFIG_SWAP
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+4:
+	/* and update pte in table */
+#else
 	ori	r10, r10, _PAGE_ACCESSED
+#endif
+	mfspr	r11, SPRN_MD_TWC	/* get the pte address again */
 	stw	r10, 0(r11)
 
 	/* The Linux PTE won't go exactly into the MMU TLB.
@@ -575,7 +594,16 @@ DataTLBError:
 
 	/* Update 'changed', among others.
 	*/
+#ifdef CONFIG_SWAP
+	ori	r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE
+	/* do not set the _PAGE_ACCESSED bit of a non-present page */
+	andi.	r11, r10, _PAGE_PRESENT
+	beq	4f
+	ori	r10, r10, _PAGE_ACCESSED
+4:
+#else
 	ori	r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+#endif
 	mfspr	r11, SPRN_MD_TWC		/* Get pte address again */
 	stw	r10, 0(r11)		/* and update pte in table */
 
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index c159315..76717ff 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -341,14 +341,6 @@ extern unsigned long ioremap_bot, ioremap_base;
 #define _PMD_PAGE_MASK	0x000c
 #define _PMD_PAGE_8M	0x000c
 
-/*
- * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
- * for an address even if _PAGE_PRESENT is not set, as a performance
- * optimization.  This is a bug if you ever want to use swap unless
- * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
- * definitions for __swp_entry etc. below, which would be gross.
- *  -- paulus
- */
 #define _PTE_NONE_MASK _PAGE_ACCESSED
 
 #else /* CONFIG_6xx */

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Jochen Friedrich <jochen@scram.de>
Date: 2008-02-05 10:01:57

Hi Yuri,
Does anybody use swap with some of the 8xx-based boards supported in 
powerpc branch ?
modded DBox2 boxes do. Unfortunately, i don't have such a modded box.
The tuxbox project currently uses a really ugly hack to support swapping:

http://git.bocc.de/cgi-bin/gitweb.cgi?p=dbox2.git;a=commitdiff;h=fc9d6ed33d85933f3900718a118a0cc2b776f067

Thanks,
Jochen

Re: [PATCH 1/1] [PPC] 8xx swap bug-fix

From: Kumar Gala <hidden>
Date: 2008-03-10 14:40:08

On Feb 2, 2008, at 1:47 AM, Yuri Tikhonov wrote:
Hello,

Here is the patch which makes Linux-2.6 swap routines operate  
correctly on
the ppc-8xx-based machines.

Signed-off-by: Yuri Tikhonov <redacted>
applied.

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help