Skip to contentSkip to conversation

linux-omap 2.6.29: disable alignment trapping completely for omap3board

PATCH In review Koen Kooi 3 participants 3 messages Mar 31, 2009 – Apr 1, 2009

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

PATCH 1/1 linux-omap 2.6.29: disable alignment trapping completely for omap3board

From: Koen Kooi <[email protected]>

---
 .../linux/linux-omap-2.6.29/beagleboard/defconfig  |    2 +-
 .../linux-omap-2.6.29/fix-unaligned-access.diff    |   41 ++++++++++++++++++++
 .../linux-omap-2.6.29/make-alignment-visible.diff  |   26 ++++++++++++
 .../linux-omap-2.6.29/omap3-pandora/defconfig      |    2 +-
 recipes/linux/linux-omap-2.6.29/omap3evm/defconfig |    2 +-
 recipes/linux/linux-omap-2.6.29/omapzoom/defconfig |    2 +-
 recipes/linux/linux-omap_2.6.29.bb                 |    4 +-
 7 files changed, 74 insertions(+), 5 deletions(-)
 create mode 100644 recipes/linux/linux-omap-2.6.29/fix-unaligned-access.diff
 create mode 100644 recipes/linux/linux-omap-2.6.29/make-alignment-visible.diff
recipes/linux/linux-omap-2.6.29/beagleboard/defconfig +1 -1
index f6c503c..2292ae2 100644
@@ -288,7 +288,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/fix-unaligned-access.diff new file +41 -0

41 lines not on this page · raw message

recipes/linux/linux-omap-2.6.29/make-alignment-visible.diff new file +26 -0
new file mode 100644
index 0000000..9b3958f
@@ -0,0 +1,26 @@
+From: Mans Rullgard <[email protected]>
+Date: Mon, 13 Oct 2008 19:32:16 +0000 (+0100)
+Subject: ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=60d60f0ca47fcf4fbb649e45aa64f5a0a4c2f2c8
+
+ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+
+This adds a prompt text for CONFIG_ALIGNMENT_TRAP, thus making it
+visible in make *config.
+
+Signed-off-by: Mans Rullgard <[email protected]>
+---
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 61314f6..18d3119 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -971,7 +971,7 @@ config LEDS_CPU
+ 	  will overrule the CPU usage LED.
+ 
+ config ALIGNMENT_TRAP
+-	bool
++	bool "Enable alignment trap"
+ 	depends on CPU_CP15_MMU
+ 	default y if !ARCH_EBSA110
+ 	help
recipes/linux/linux-omap-2.6.29/omap3-pandora/defconfig +1 -1
index 5db83f0..8ac420c 100644
@@ -298,7 +298,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/omap3evm/defconfig +1 -1
index da5a8c4..da72671 100644
@@ -298,7 +298,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/omapzoom/defconfig +1 -1
index d2d2ee5..aa11eb0 100644
@@ -291,7 +291,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 # CONFIG_LEDS is not set
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap_2.6.29.bb +3 -1
index f5c20ba..a74bd62 100644
@@ -10,7 +10,7 @@ DEFAULT_PREFERENCE = "-1"
 
 SRCREV = "90e758af52ba803cba233fabee81176d99589f09"
 
-PR = "r2+gitr${SRCREV}"
+PR = "r3+gitr${SRCREV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \
 	   file://defconfig"
@@ -22,6 +22,8 @@ SRC_URI_append = " \
            file://fix-install.patch;patch=1 \
            file://DSS2.diff;patch=1 \
            file://0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch;patch=1 \
+           file://fix-unaligned-access.diff;patch=1 \
+           file://make-alignment-visible.diff;patch=1 \
 "
 
 
Signature · 1 line
1.5.6.5
#1 lore raw

I suggest to add the mmctiming patch I made last week for .28 also to .29 and to the stable branch.
This one increases the timeout for sd/mmc actions causing cards where the timing is near the edge to work.

Not sure yet what the root cause is of the problem as the card used to work with .26
Actually just now thinking that it also could be something having to do with timing accuracy or rounding or so.
But anyway the patch allows more cards to work while there is no negative side effect for others (as it are only two timeouts that are being extended).

Frans.

Acked-by on v1 1/1
#2 lore raw
In reply to Koen Kooi
Quoted 169 lines · Koen Kooi

From: Koen Kooi <[email protected]>

---
 .../linux/linux-omap-2.6.29/beagleboard/defconfig  |    2 +-
 .../linux-omap-2.6.29/fix-unaligned-access.diff    |   41 ++++++++++++++++++++
 .../linux-omap-2.6.29/make-alignment-visible.diff  |   26 ++++++++++++
 .../linux-omap-2.6.29/omap3-pandora/defconfig      |    2 +-
 recipes/linux/linux-omap-2.6.29/omap3evm/defconfig |    2 +-
 recipes/linux/linux-omap-2.6.29/omapzoom/defconfig |    2 +-
 recipes/linux/linux-omap_2.6.29.bb                 |    4 +-
 7 files changed, 74 insertions(+), 5 deletions(-)
 create mode 100644 recipes/linux/linux-omap-2.6.29/fix-unaligned-access.diff
 create mode 100644 recipes/linux/linux-omap-2.6.29/make-alignment-visible.diff
recipes/linux/linux-omap-2.6.29/beagleboard/defconfig +1 -1
index f6c503c..2292ae2 100644
@@ -288,7 +288,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/fix-unaligned-access.diff new file +41 -0
new file mode 100644
index 0000000..c82090f
@@ -0,0 +1,41 @@
+From: Mans Rullgard <[email protected]>
+Date: Sat, 28 Mar 2009 12:54:25 +0000 (+0000)
+Subject: NSM: Fix unaligned accesses in nsm_init_private()
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=8f2bd6fdde1ebfef57f65b6cf29b29008c23d297
+
+NSM: Fix unaligned accesses in nsm_init_private()
+
+This fixes unaligned accesses in nsm_init_private() when
+creating nlm_reboot keys.
+
+Signed-off-by: Mans Rullgard <[email protected]>
+---
+
+diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
+index 5e2c4d5..6d5d4a4 100644
+--- a/fs/lockd/mon.c
++++ b/fs/lockd/mon.c
+@@ -16,6 +16,8 @@
+ #include <linux/sunrpc/svc.h>
+ #include <linux/lockd/lockd.h>
+ 
++#include <asm/unaligned.h>
++
+ #define NLMDBG_FACILITY		NLMDBG_MONITOR
+ #define NSM_PROGRAM		100024
+ #define NSM_VERSION		1
+@@ -274,10 +276,12 @@ static void nsm_init_private(struct nsm_handle *nsm)
+ {
+ 	u64 *p = (u64 *)&nsm->sm_priv.data;
+ 	struct timespec ts;
++	s64 ns;
+ 
+ 	ktime_get_ts(&ts);
+-	*p++ = timespec_to_ns(&ts);
+-	*p = (unsigned long)nsm;
++	ns = timespec_to_ns(&ts);
++	put_unaligned(ns, p);
++	put_unaligned((unsigned long)nsm, p + 1);
+ }
+ 
+ static struct nsm_handle *nsm_create_handle(const struct sockaddr *sap,
recipes/linux/linux-omap-2.6.29/make-alignment-visible.diff new file +26 -0
new file mode 100644
index 0000000..9b3958f
@@ -0,0 +1,26 @@
+From: Mans Rullgard <[email protected]>
+Date: Mon, 13 Oct 2008 19:32:16 +0000 (+0100)
+Subject: ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=60d60f0ca47fcf4fbb649e45aa64f5a0a4c2f2c8
+
+ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+
+This adds a prompt text for CONFIG_ALIGNMENT_TRAP, thus making it
+visible in make *config.
+
+Signed-off-by: Mans Rullgard <[email protected]>
+---
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 61314f6..18d3119 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -971,7 +971,7 @@ config LEDS_CPU
+ 	  will overrule the CPU usage LED.
+ 
+ config ALIGNMENT_TRAP
+-	bool
++	bool "Enable alignment trap"
+ 	depends on CPU_CP15_MMU
+ 	default y if !ARCH_EBSA110
+ 	help
recipes/linux/linux-omap-2.6.29/omap3-pandora/defconfig +1 -1
index 5db83f0..8ac420c 100644
@@ -298,7 +298,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/omap3evm/defconfig +1 -1
index da5a8c4..da72671 100644
@@ -298,7 +298,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap-2.6.29/omapzoom/defconfig +1 -1
index d2d2ee5..aa11eb0 100644
@@ -291,7 +291,7 @@ CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
 # CONFIG_LEDS is not set
-CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ALIGNMENT_TRAP=n
 
 #
 # Boot options
recipes/linux/linux-omap_2.6.29.bb +3 -1
index f5c20ba..a74bd62 100644
@@ -10,7 +10,7 @@ DEFAULT_PREFERENCE = "-1"
 
 SRCREV = "90e758af52ba803cba233fabee81176d99589f09"
 
-PR = "r2+gitr${SRCREV}"
+PR = "r3+gitr${SRCREV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \
 	   file://defconfig"
@@ -22,6 +22,8 @@ SRC_URI_append = " \
            file://fix-install.patch;patch=1 \
            file://DSS2.diff;patch=1 \
            file://0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch;patch=1 \
+           file://fix-unaligned-access.diff;patch=1 \
+           file://make-alignment-visible.diff;patch=1 \
 "