powerpc: mpc83xx_defconfig: enable math emulation and ucc_geth
PATCH 3/3 powerpc: mpc83xx_defconfig: enable math emulation and ucc_geth
and some PHYs mpc83xx boards use.
--- arch/powerpc/configs/mpc83xx_defconfig | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
arch/powerpc/configs/mpc83xx_defconfig +5 -5
@@ -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 #
Signature · 1 line
1.5.2.2
PATCH 1/1 8xx swap bug-fix
Hello,
Here is the patch which makes Linux-2.6 swap routines operate correctly on
the ppc-8xx-based machines.
--
arch/ppc/kernel/head_8xx.S +29 -1
@@ -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 */
include/asm-ppc/pgtable.h +0 -8
@@ -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 */
Signature · 2 lines
Yuri Tikhonov, Senior Software Engineer Emcraft Systems, www.emcraft.com
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
Hi Yuri,
Quoted 2 lines
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
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 1 line
Quoted 1 line
Here is the patch which makes Linux-2.6 swap routines operate correctly
on
Quoted 7 lines
Quoted 1 line
the ppc-8xx-based machines.
is there any 8xx board left which isn't ported to ARCH=powerpc?
Thanks,
Jochen
Signature · 2 lines
Yuri Tikhonov, Senior Software Engineer Emcraft Systems, www.emcraft.com
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
In reply to Jochen FriedrichQuoted 6 lines · Jochen Friedrich
Hi Yuri,
Quoted 2 lines
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
Quoted 11 lines · On Mon, 4 Feb 2008 12:24:21 -0600 Scott Wood wrote:
Quoted 6 lines · Jochen Friedrich
Hi Yuri,
Quoted 2 lines
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.
Signature · 1 line
Sincerely, Vitaly
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
Dear Vitaly,
Quoted 9 lines · in message <[email protected]> you wrote:
Quoted 6 lines · On Mon, 4 Feb 2008 12:24:21 -0600 Scott Wood wrote:
Quoted 5 lines · Jochen Friedrich
Hi Yuri,
Quoted 2 lines
Here is the patch which makes Linux-2.6 swap routines operate
correctly on the ppc-8xx-based machines.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
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.
Have you been able to check if arch/powerpc needs similar fixing?
Also, what is the current state of this patch? I would like to avoid that it get's lost completeley.
BenH commented on Tue, 05 Feb 2008 18:37:07 +1100:
Quoted 2 lines
Best is to just remove writeback completely and let the generic code handle it.
Has this been considered / tested by anybody?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Man did not weave the web of life; he is merely a strand in it. Whatever he does to the web, he does to himself. - Seattle [1854]
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
Quoted 21 lines · On Thu, 21 Feb 2008 13:21:58 +0100 Wolfgang Denk wrote:
Dear Vitaly,
Quoted 9 lines · in message <[email protected]> you wrote:
Quoted 6 lines · On Mon, 4 Feb 2008 12:24:21 -0600 Scott Wood wrote:
Quoted 5 lines · Jochen Friedrich
Hi Yuri,
Quoted 2 lines
Here is the patch which makes Linux-2.6 swap routines operate
correctly on the ppc-8xx-based machines.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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.
Quoted 6 lines
Have you been able to check if
arch/powerpcneeds similar fixing?Also, what is the current state of this patch? I would like to avoid that it get's lost completeley.
I have revalidated it (version modded to fit powerpc) with pretty tight stressing and can conclude this is good enough for mainline (it gets things much better than they are now,
in case of swap enabled).
I'll follow-up with relevant patch shortly.
Quoted 12 lines
BenH commented on Tue, 05 Feb 2008 18:37:07 +1100:
Quoted 2 lines
Best is to just remove writeback completely and let the generic code handle it.
Has this been considered / tested by anybody?
Best regards,
Wolfgang Denk
Signature · 1 line
Sincerely, Vitaly
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
In reply to Scott WoodHi Scott,
You are right. The TLB handlers for 8xx in arch/powerpc branch set thePAGE_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
Quoted 4 lines · Scott Wood
Quoted 3 lines · Jochen Friedrich
Hi Yuri,
Quoted 1 line
Here is the patch which makes Linux-2.6 swap routines operate correctly
on
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
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
Signature · 2 lines
Yuri Tikhonov, Senior Software Engineer Emcraft Systems, www.emcraft.com
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
Hi Yuri,
Quoted 2 lines
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:
Thanks,
Jochen
Re: [PATCH 1/1] [PPC] 8xx swap bug-fix
In reply to Yuri TikhonovQuoted 4 lines · Yuri Tikhonov
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 81 lines
Signed-off-by Yuri Tikhonov <[email protected]>--
arch/ppc/kernel/head_8xx.S +29
-1@@ -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 */include/asm-ppc/pgtable.h +0
-8@@ -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 */
Kumar Gala
AppliedRe: [PATCH 1/1] [PPC] 8xx swap bug-fix
In reply to Yuri TikhonovQuoted 7 lines · Yuri Tikhonov
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 <[email protected]>
applied.
- k