[kernel] r5501 - in dists/trunk/linux-2.6/debian: . patches
patches/series
Simon Horman
horms at costa.debian.org
Tue Jan 17 10:26:55 UTC 2006
Author: horms
Date: Tue Jan 17 10:26:54 2006
New Revision: 5501
Added:
dists/trunk/linux-2.6/debian/patches/powerpc-relocate_code.patch
Modified:
dists/trunk/linux-2.6/debian/changelog
dists/trunk/linux-2.6/debian/patches/series/3
Log:
[ Simon Horman ]
* Fix booting on PReP machines
(Closes: #348040)
powerpc-relocate_code.patch
Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog (original)
+++ dists/trunk/linux-2.6/debian/changelog Tue Jan 17 10:26:54 2006
@@ -50,7 +50,12 @@
* Drop merged patch:
- sparc64-atyfb-xl-gr-final.patch
- -- maximilian attems <maks at sternwelten.at> Sun, 15 Jan 2006 12:12:10 +0100
+ [ Simon Horman ]
+ * Fix booting on PReP machines
+ (Closes: #348040)
+ powerpc-relocate_code.patch
+
+ -- Simon Horman <horms at verge.net.au> Tue, 17 Jan 2006 18:01:17 +0900
linux-2.6 (2.6.15-2) unstable; urgency=low
Added: dists/trunk/linux-2.6/debian/patches/powerpc-relocate_code.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/powerpc-relocate_code.patch Tue Jan 17 10:26:54 2006
@@ -0,0 +1,76 @@
+commit aed9c6ccb87d96c333bd6ae631d9e90f3b6d7271
+tree 65366c1ddedfbec62cb422686a5c6b0d734ce5e5
+parent 2fb9d2063626374dd8a2514b3a730facac8235d8
+author Paul Janzen <pcj at linux.sez.to> Wed, 04 Jan 2006 21:40:48 -0800
+committer Paul Mackerras <paulus at samba.org> Mon, 09 Jan 2006 15:47:08 +1100
+
+ [PATCH] ppc32: Put cache flush routines back into .relocate_code section
+
+ In 2.6.14, we had the following definition of _GLOBAL() in
+ include/asm-ppc/processor.h:
+
+ #define _GLOBAL(n)\
+ .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+ .globl n;\
+ n:
+
+ In 2.6.15, as part of the great powerpc merge, we moved this definition to
+ include/asm-powerpc/ppc_asm.h, where it appears (to 32-bit code) as:
+
+ #define _GLOBAL(n) \
+ .text; \
+ .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+ .globl n; \
+ n:
+
+ Mostly, this is fine. However, we also have the following, in
+ arch/ppc/boot/common/util.S:
+
+ .section ".relocate_code","xa"
+ [...]
+ _GLOBAL(flush_instruction_cache)
+ [...]
+ _GLOBAL(flush_data_cache)
+ [...]
+
+ The addition of the .text section definition in the definition of
+ _GLOBAL overrides the .relocate_code section definition. As a result,
+ these two functions don't end up in .relocate_code, so they don't get
+ relocated correctly, and the boot fails.
+
+ There's another suspicious-looking usage at kernel/swsusp.S:37 that
+ someone should look into. I did not exhaustively search the source
+ tree, though.
+
+ The following is the minimal patch that fixes the immediate problem.
+ I could easily be convinced that the _GLOBAL definition should be
+ modified to remove the ".text;" line either instead of, or in addition
+ to, this fix.
+
+ Signed-off-by: Paul Janzen <pcj at linux.sez.to>
+ Signed-off-by: Paul Mackerras <paulus at samba.org>
+
+diff --git a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S
+index c96c9f8..368ec03 100644
+--- a/arch/ppc/boot/common/util.S
++++ b/arch/ppc/boot/common/util.S
+@@ -234,7 +234,8 @@ udelay:
+ * First, flush the data cache in case it was enabled and may be
+ * holding instructions for copy back.
+ */
+-_GLOBAL(flush_instruction_cache)
++ .globl flush_instruction_cache
++flush_instruction_cache:
+ mflr r6
+ bl flush_data_cache
+
+@@ -279,7 +280,8 @@ _GLOBAL(flush_instruction_cache)
+ * Flush data cache
+ * Do this by just reading lots of stuff into the cache.
+ */
+-_GLOBAL(flush_data_cache)
++ .globl flush_data_cache
++flush_data_cache:
+ lis r3,cache_flush_buffer at h
+ ori r3,r3,cache_flush_buffer at l
+ li r4,NUM_CACHE_LINES
Modified: dists/trunk/linux-2.6/debian/patches/series/3
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/3 (original)
+++ dists/trunk/linux-2.6/debian/patches/series/3 Tue Jan 17 10:26:54 2006
@@ -3,3 +3,4 @@
+ mtdpart-redboot-fis-byteswap.patch
- sparc64-atyfb-xl-gr-final.patch
+ 2.6.15.1.patch
++ powerpc-relocate_code.patch
More information about the Kernel-svn-changes
mailing list