[kernel] r11105 - in dists/trunk/linux-2.6/debian: . patches/bugfix/arm patches/series

Martin Michlmayr tbm at alioth.debian.org
Sun Apr 20 12:28:38 UTC 2008


Author: tbm
Date: Sun Apr 20 12:28:37 2008
New Revision: 11105

Log:
Fix hang when Write Allocate is enabled (Lennert Buytenhek).


Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/arm/orion-enawrallo.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/1~experimental.1

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Sun Apr 20 12:28:37 2008
@@ -56,6 +56,7 @@
   * [arm/iop32x] Enable MACH_EM7210. (closes: #473136)
   * [arm/armel] Add patch to set the MAC address on QNAP TS-109/TS-209.
   * [arm] Add support for Buffalo Linkstation Pro/Live (Byron Bradley).
+  * [arm/orion] Fix hang when Write Allocate is enabled (Lennert Buytenhek).
 
   [ Daniel Baumann ]
   * Added patch from unionfs upstream to export release_open_intent symbol.

Added: dists/trunk/linux-2.6/debian/patches/bugfix/arm/orion-enawrallo.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/arm/orion-enawrallo.patch	Sun Apr 20 12:28:37 2008
@@ -0,0 +1,170 @@
+On Sun, Apr 06, 2008 at 01:38:18PM +0200, Martin Michlmayr wrote:
+
+> The QNAP TS-409 sets enaWrAllo=yes in u-boot which means that mainline
+> kernels hang when they reach userland.  Tzachi advised people to set
+> enaWrAllo=no and Lennert confirmed on IRC that this is still needed:
+> "it's necessary because the currently used copypage routines on orion
+> assume that you have a cache that doesn't allocate cache lines when
+> you do memory writes".
+> 
+> I was wondering if there are a) any plans to fix this assumption or b)
+> whether it's possible to have the kernel turn off write allocation for
+> now if it's set.
+
+Sorry for the delay.  Does this help?
+
+
+
+From: Lennert Buytenhek <buytenh at wantstofly.org>
+Subject: Feroceon: implement Feroceon-specific {copy,clear}_user_page()
+
+This patch implements a set of Feroceon-specific
+{copy,clear}_user_page() routines, which are mostly identical to
+the v4wb versions, but deal with write-allocate caches (Feroceon can
+run L1 D in WA mode), and the 4-word load/store multiple instructions
+have been replaced by 8-word variants to maximise memory bandwidth.
+
+Signed-off-by: Lennert Buytenhek <buytenh at marvell.com>
+
+Index: linux-2.6.25-rc8/arch/arm/mm/Kconfig
+===================================================================
+--- linux-2.6.25-rc8.orig/arch/arm/mm/Kconfig
++++ linux-2.6.25-rc8/arch/arm/mm/Kconfig
+@@ -351,7 +351,7 @@ config CPU_FEROCEON
+ 	select CPU_ABRT_EV5T
+ 	select CPU_CACHE_VIVT
+ 	select CPU_CP15_MMU
+-	select CPU_COPY_V4WB if MMU
++	select CPU_COPY_FEROCEON if MMU
+ 	select CPU_TLB_V4WBI if MMU
+ 
+ config CPU_FEROCEON_OLD_ID
+@@ -494,6 +494,9 @@ config CPU_COPY_V4WT
+ config CPU_COPY_V4WB
+ 	bool
+ 
++config CPU_COPY_FEROCEON
++	bool
++
+ config CPU_COPY_V6
+ 	bool
+ 
+Index: linux-2.6.25-rc8/arch/arm/mm/Makefile
+===================================================================
+--- linux-2.6.25-rc8.orig/arch/arm/mm/Makefile
++++ linux-2.6.25-rc8/arch/arm/mm/Makefile
+@@ -36,6 +36,7 @@ obj-$(CONFIG_CPU_CACHE_V7)	+= cache-v7.o
+ obj-$(CONFIG_CPU_COPY_V3)	+= copypage-v3.o
+ obj-$(CONFIG_CPU_COPY_V4WT)	+= copypage-v4wt.o
+ obj-$(CONFIG_CPU_COPY_V4WB)	+= copypage-v4wb.o
++obj-$(CONFIG_CPU_COPY_FEROCEON)	+= copypage-feroceon.o
+ obj-$(CONFIG_CPU_COPY_V6)	+= copypage-v6.o context.o
+ obj-$(CONFIG_CPU_SA1100)	+= copypage-v4mc.o
+ obj-$(CONFIG_CPU_XSCALE)	+= copypage-xscale.o
+Index: linux-2.6.25-rc8/arch/arm/mm/copypage-feroceon.S
+===================================================================
+--- /dev/null
++++ linux-2.6.25-rc8/arch/arm/mm/copypage-feroceon.S
+@@ -0,0 +1,62 @@
++/*
++ *  linux/arch/arm/lib/copypage-feroceon.S
++ *
++ *  Copyright (C) 1995-1999 Russell King
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This handles copy_user_page and clear_user_page on Feroceon.  This
++ * implementation is mostly copied from the v4wb implementation, but
++ * slightly tweaked to deal with write-allocate caches (Feroceon can
++ * run L1 D in WA mode), and the 4-word load/store multiple instructions
++ * replaced by 8-word variants to maximise memory bandwidth.
++ */
++#include <linux/linkage.h>
++#include <linux/init.h>
++#include <asm/asm-offsets.h>
++
++	.text
++	.align	5
++
++ENTRY(feroceon_copy_user_page)
++	stmfd	sp!, {r4-r8, lr}
++	mov	r2, #PAGE_SZ/32
++1:	ldmia	r1!, {r3-r8, ip, lr}
++	stmia	r0, {r3-r8, ip, lr}
++	mcr	p15, 0, r0, c7, c14, 1		@ clean and invalidate D line
++	add	r0, r0, #32
++	subs	r2, r2, #1
++	bne	1b
++	mcr	p15, 0, r1, c7, c10, 4		@ drain WB
++	ldmfd	sp!, {r4-r8, pc}
++
++	.align	5
++
++ENTRY(feroceon_clear_user_page)
++	stmfd	sp!, {r4-r7, lr}
++	mov	r1, #PAGE_SZ/32
++	mov	r2, #0
++	mov	r3, #0
++	mov	r4, #0
++	mov	r5, #0
++	mov	r6, #0
++	mov	r7, #0
++	mov	ip, #0
++	mov	lr, #0
++1:	stmia	r0, {r2-r7, ip, lr}
++	mcr	p15, 0, r0, c7, c14, 1		@ clean and invalidate D line
++	add	r0, r0, #32
++	subs	r1, r1, #1
++	bne	1b
++	mcr	p15, 0, r1, c7, c10, 4		@ drain WB
++	ldmfd	sp!, {r4-r7, pc}
++
++	__INITDATA
++
++	.type	feroceon_user_fns, #object
++ENTRY(feroceon_user_fns)
++	.long	feroceon_clear_user_page
++	.long	feroceon_copy_user_page
++	.size	feroceon_user_fns, . - feroceon_user_fns
+Index: linux-2.6.25-rc8/arch/arm/mm/proc-feroceon.S
+===================================================================
+--- linux-2.6.25-rc8.orig/arch/arm/mm/proc-feroceon.S
++++ linux-2.6.25-rc8/arch/arm/mm/proc-feroceon.S
+@@ -475,7 +475,7 @@ __feroceon_old_id_proc_info:
+ 	.long	cpu_feroceon_name
+ 	.long	feroceon_processor_functions
+ 	.long	v4wbi_tlb_fns
+-	.long	v4wb_user_fns
++	.long	feroceon_user_fns
+ 	.long	feroceon_cache_fns
+ 	.size	__feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info
+ #endif
+@@ -501,6 +501,6 @@ __feroceon_proc_info:
+ 	.long	cpu_feroceon_name
+ 	.long	feroceon_processor_functions
+ 	.long	v4wbi_tlb_fns
+-	.long	v4wb_user_fns
++	.long	feroceon_user_fns
+ 	.long	feroceon_cache_fns
+ 	.size	__feroceon_proc_info, . - __feroceon_proc_info
+Index: linux-2.6.25-rc8/include/asm-arm/page.h
+===================================================================
+--- linux-2.6.25-rc8.orig/include/asm-arm/page.h
++++ linux-2.6.25-rc8/include/asm-arm/page.h
+@@ -71,6 +71,14 @@
+ # endif
+ #endif
+ 
++#ifdef CONFIG_CPU_COPY_FEROCEON
++# ifdef _USER
++#  define MULTI_USER 1
++# else
++#  define _USER feroceon
++# endif
++#endif
++
+ #ifdef CONFIG_CPU_SA1100
+ # ifdef _USER
+ #  define MULTI_USER 1

Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	Sun Apr 20 12:28:37 2008
@@ -17,6 +17,7 @@
 + bugfix/powerpc/prep-utah-ide-interrupt.patch
 + bugfix/powerpc/serial.patch
 + bugfix/mips/tulip_mwi_fix.patch
++ bugfix/arm/orion-enawrallo.patch
 + features/arm/ixp4xx-net-drivers.patch
 + features/arm/linkstation.patch
 + bugfix/arm/ts209-set-mac.patch



More information about the Kernel-svn-changes mailing list