Skip to contentSkip to conversation

ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS

PATCH New eric.miao at linaro.org 3 participants 3 messages Sep 10, 2011 – Sep 12, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS

From: Eric Miao <[email protected]>

---

It turned out both cpu_is_v6_unaligned and safe_usermode() could be referenced without CONFIG_PROC_FS being defined.

 arch/arm/mm/alignment.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/mm/alignment.c +10 -10
index cfbcf8b..c335c76 100644
@@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600);
 #define UM_FIXUP	(1 << 1)
 #define UM_SIGNAL	(1 << 2)
 
-#ifdef CONFIG_PROC_FS
-static const char *usermode_action[] = {
-	"ignored",
-	"warn",
-	"fixup",
-	"fixup+warn",
-	"signal",
-	"signal+warn"
-};
-
 /* Return true if and only if the ARMv6 unaligned access model is in use. */
 static bool cpu_is_v6_unaligned(void)
 {
@@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn)
 	return new_usermode;
 }
 
+#ifdef CONFIG_PROC_FS
+static const char *usermode_action[] = {
+	"ignored",
+	"warn",
+	"fixup",
+	"fixup+warn",
+	"signal",
+	"signal+warn"
+};
+
 static int alignment_proc_show(struct seq_file *m, void *v)
 {
 	seq_printf(m, "User:\t\t%lu\n", ai_user);
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/1 ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS

Quoted 3 lines · eric.miao at linaro.org

From: Eric Miao <[email protected]>

Quoted 55 lines

---

It turned out both cpu_is_v6_unaligned and safe_usermode() could be referenced without CONFIG_PROC_FS being defined.

 arch/arm/mm/alignment.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/mm/alignment.c +10 -10
index cfbcf8b..c335c76 100644
@@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600);
 #define UM_FIXUP	(1 << 1)
 #define UM_SIGNAL	(1 << 2)
 
-#ifdef CONFIG_PROC_FS
-static const char *usermode_action[] = {
-	"ignored",
-	"warn",
-	"fixup",
-	"fixup+warn",
-	"signal",
-	"signal+warn"
-};
-
 /* Return true if and only if the ARMv6 unaligned access model is in use. */
 static bool cpu_is_v6_unaligned(void)
 {
@@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn)
 	return new_usermode;
 }
 
+#ifdef CONFIG_PROC_FS
+static const char *usermode_action[] = {
+	"ignored",
+	"warn",
+	"fixup",
+	"fixup+warn",
+	"signal",
+	"signal+warn"
+};
+
 static int alignment_proc_show(struct seq_file *m, void *v)
 {
 	seq_printf(m, "User:\t\t%lu\n", ai_user);
Signature · 7 lines
1.7.4.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH v2 1/1 ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS

In reply to eric.miao at linaro.org
Quoted 3 lines · eric.miao at linaro.org

From: Eric Miao <[email protected]>

Yes, including that function inside the #ifdef was unintentional.

The change looks sensible to me.

Quoted 54 lines

---

It turned out both cpu_is_v6_unaligned and safe_usermode() could be referenced without CONFIG_PROC_FS being defined.

 arch/arm/mm/alignment.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/mm/alignment.c +10 -10
index cfbcf8b..c335c76 100644
@@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600);
 #define UM_FIXUP	(1 << 1)
 #define UM_SIGNAL	(1 << 2)
 
-#ifdef CONFIG_PROC_FS
-static const char *usermode_action[] = {
-	"ignored",
-	"warn",
-	"fixup",
-	"fixup+warn",
-	"signal",
-	"signal+warn"
-};
-
 /* Return true if and only if the ARMv6 unaligned access model is in use. */
 static bool cpu_is_v6_unaligned(void)
 {
@@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn)
 	return new_usermode;
 }
 
+#ifdef CONFIG_PROC_FS
+static const char *usermode_action[] = {
+	"ignored",
+	"warn",
+	"fixup",
+	"fixup+warn",
+	"signal",
+	"signal+warn"
+};
+
 static int alignment_proc_show(struct seq_file *m, void *v)
 {
 	seq_printf(m, "User:\t\t%lu\n", ai_user);
Signature · 7 lines
1.7.4.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel