+ avr32-dont-leave-dbe-set-when-resetting-cpu.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     AVR32: Don't leave DBE set when resetting CPU

has been added to the -mm tree.  Its filename is

     avr32-dont-leave-dbe-set-when-resetting-cpu.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: AVR32: Don't leave DBE set when resetting CPU
From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>

In order to reset the CPU by setting the RES bit in the DC (Development
Control) register, we must ensure that DBE (Debug Enable) is set as well,
or the CPU will just ignore the reset request.

However, if we set both at the same time, DBE will stay set after reset,
and the performance will degrade significantly because important
optimizations like branch prediction will be disabled.

Setting DBE first, and then RES, will reset the CPU without keeping DBE set
after reset.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/avr32/kernel/process.c |    3 ++-
 include/asm-avr32/ocd.h     |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff -puN arch/avr32/kernel/process.c~avr32-dont-leave-dbe-set-when-resetting-cpu arch/avr32/kernel/process.c
--- a/arch/avr32/kernel/process.c~avr32-dont-leave-dbe-set-when-resetting-cpu
+++ a/arch/avr32/kernel/process.c
@@ -46,7 +46,8 @@ void machine_power_off(void)
 
 void machine_restart(char *cmd)
 {
-	__mtdr(DBGREG_DC, 0x40002000);
+	__mtdr(DBGREG_DC, DC_DBE);
+	__mtdr(DBGREG_DC, DC_RES);
 	while (1) ;
 }
 
diff -puN include/asm-avr32/ocd.h~avr32-dont-leave-dbe-set-when-resetting-cpu include/asm-avr32/ocd.h
--- a/include/asm-avr32/ocd.h~avr32-dont-leave-dbe-set-when-resetting-cpu
+++ a/include/asm-avr32/ocd.h
@@ -57,6 +57,7 @@
 #define DC_RID			(1 << 27)
 #define DC_ORP			(1 << 28)
 #define DC_MM			(1 << 29)
+#define DC_RES			(1 << 30)
 
 /* Fields in the Development Status register */
 #define DS_SSS			(1 <<  0)
_

Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are

git-mtd.patch
avr32-arch.patch
avr32-config_debug_bugverbose-and-config_frame_pointer.patch
avr32-fix-invalid-constraints-for-stcond.patch
avr32-add-support-for-irq-flags-state-tracing.patch
avr32-turn-off-support-for-discontigmem-and-sparsemem.patch
avr32-always-enable-config_embedded.patch
avr32-export-the-find__bit-functions.patch
avr32-add-defconfig-for-at32stk1002.patch
avr32-use-autoconf-instead-of-marker.patch
avr32-dont-assume-anything-about-max_nr_zones.patch
avr32-add-i-o-port-access-primitives.patch
avr32-use-linux-pfnh.patch
avr32-kill-config_discontigmem-support-completely.patch
avr32-fix-bug-in-__avr32_asr64.patch
avr32-switch-to-generic-timekeeping-framework.patch
avr32-set-kbuild_defconfig.patch
avr32-kprobes-compile-fix.patch
avr32-asm-ioh-should-include-asm-byteorderh.patch
avr32-fix-output-constraints-in-asm-bitopsh.patch
avr32-standardize-pxx_page-macros-fix.patch
avr32-rename-at32stk100x-atstk100x.patch
avr32-dont-leave-dbe-set-when-resetting-cpu.patch
avr32-make-prot_write-prot_exec-imply-prot_read.patch
generic-ioremap_page_range-implementation.patch
generic-ioremap_page_range-implementation-fix.patch
generic-ioremap_page_range-implementation-nommu-fix.patch
generic-ioremap_page_range-flush_cache_vmap.patch
generic-ioremap_page_range-alpha-conversion.patch
generic-ioremap_page_range-avr32-conversion.patch
generic-ioremap_page_range-cris-conversion.patch
generic-ioremap_page_range-i386-conversion.patch
generic-ioremap_page_range-i386-conversion-fix.patch
generic-ioremap_page_range-m32r-conversion.patch
generic-ioremap_page_range-mips-conversion.patch
generic-ioremap_page_range-mips-conversion-fix.patch
generic-ioremap_page_range-parisc-conversion.patch
generic-ioremap_page_range-s390-conversion.patch
generic-ioremap_page_range-sh-conversion.patch
generic-ioremap_page_range-sh64-conversion.patch
generic-ioremap_page_range-x86_64-conversion.patch
generic-ioremap_page_range-x86_64-conversion-fix.patch
avr32-implement-kernel_execve.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux