Skip to contentSkip to conversation

unaligned.h fix for M68000 core

PATCH New Luis Alves 2 participants 3 messages May 13, 2012 – May 14, 2012 2 messages not in the archive m68k architecture

lore
Share & tools
lore

Luis Alves

author
#1 lore raw

PATCH 1/1 unaligned.h fix for M68000 core

In reply to a message not in the archive

Hi all,

This patch fixes unaligned memory access for the 68000 core based cpu's.

Some time ago, my cpu (68000) was raising address/bus error's when mounting cifs shares (didn't bother to debug it at the time). After developing the MMC/SD card driver I was having the same issue when mounting the vfat fs.

I've traced the issue down to the 'unaligned.h' file. (I guess nobody has ever used unaligned.h back in the 68328 'era'.

Regards,
Luis Alves

---
 arch/m68k/include/asm/unaligned.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/include/asm/unaligned.h +1 -1
index 019caa7..f4043ae 100644
@@ -2,7 +2,7 @@
 #define _ASM_M68K_UNALIGNED_H
 
 
-#ifdef CONFIG_COLDFIRE
+#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
 #include <linux/unaligned/be_struct.h>
 #include <linux/unaligned/le_byteshift.h>
 #include <linux/unaligned/generic.h>
Signature · 1 line
1.7.5.4
author
#2 lore raw

PATCH 1/1 unaligned.h fix for M68000 core

In reply to a message not in the archive

Hi all,

This patch fixes unaligned memory access for the 68000 core based cpu's.

Some time ago, my cpu (68000) was raising address/bus error's when mounting cifs shares (didn't bother to debug it at the time). After developing the MMC/SD card driver I was having the same issue when mounting the vfat fs.

I've traced the issue down to the 'unaligned.h' file. (I guess nobody has ever used unaligned.h back in the 68328 'era'.

Regards,
Luis Alves

---
 arch/m68k/include/asm/unaligned.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/include/asm/unaligned.h +1 -1
index 019caa7..f4043ae 100644
@@ -2,7 +2,7 @@
 #define _ASM_M68K_UNALIGNED_H
 
 
-#ifdef CONFIG_COLDFIRE
+#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
 #include <linux/unaligned/be_struct.h>
 #include <linux/unaligned/le_byteshift.h>
 #include <linux/unaligned/generic.h>
Signature · 1 line
1.7.5.4
#4 lore raw
In reply to a message not in the archive

Hi Luis,

Quoted 6 lines · Luis Alves

This patch fixes unaligned memory access for the 68000 core based cpu's.

Some time ago, my cpu (68000) was raising address/bus error's when mounting cifs shares (didn't bother to debug it at the time). After developing the MMC/SD card driver I was having the same issue when mounting the vfat fs.

I've traced the issue down to the 'unaligned.h' file. (I guess nobody has ever used unaligned.h back in the 68328 'era'.

Looks good, thanks.
I'll apply it to the m68knommu git tree.

Regards
Greg

Quoted 18 lines
---
  arch/m68k/include/asm/unaligned.h |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/include/asm/unaligned.h +1 -1
index 019caa7..f4043ae 100644
@@ -2,7 +2,7 @@
  #define _ASM_M68K_UNALIGNED_H
 
 
-#ifdef CONFIG_COLDFIRE
+#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
  #include<linux/unaligned/be_struct.h>
  #include<linux/unaligned/le_byteshift.h>
  #include<linux/unaligned/generic.h>
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com