mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull
@ 2012-07-25  7:47 Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 2/4] complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-07-25  7:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 lib/vsprintf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 0607db3..d3bd1d3 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -84,7 +84,7 @@ unsigned long long simple_strtoull (const char *cp, char **endp, unsigned int ba
 		*endp = (char *) cp;
 	return result;
 }
-EXPORT_SYMBOL(simple_strtoll);
+EXPORT_SYMBOL(simple_strtoull);
 
 /* we use this so that we can do without the ctype library */
 #define is_digit(c)	((c) >= '0' && (c) <= '9')
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/4] complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete
  2012-07-25  7:47 [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Jean-Christophe PLAGNIOL-VILLARD
@ 2012-07-25  7:47 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 3/4] version: add missing EXPORT_SYMBOL for version_string Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-07-25  7:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/complete.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/complete.c b/common/complete.c
index a8bde8d..6a871ef 100644
--- a/common/complete.c
+++ b/common/complete.c
@@ -149,6 +149,7 @@ int command_complete(struct string_list *sl, char *instr)
 
 	return 0;
 }
+EXPORT_SYMBOL(command_complete);
 
 int device_complete(struct string_list *sl, char *instr)
 {
@@ -169,6 +170,7 @@ int device_complete(struct string_list *sl, char *instr)
 
 	return COMPLETE_CONTINUE;
 }
+EXPORT_SYMBOL(device_complete);
 
 static int device_param_complete(char *begin, struct device_d *dev,
 				 struct string_list *sl, char *instr)
@@ -197,11 +199,13 @@ int empty_complete(struct string_list *sl, char *instr)
 {
 	return COMPLETE_END;
 }
+EXPORT_SYMBOL(empty_complete);
 
 int command_var_complete(struct string_list *sl, char *instr)
 {
 	return COMPLETE_CONTINUE;
 }
+EXPORT_SYMBOL(command_var_complete);
 
 static int env_param_complete(struct string_list *sl, char *instr, int eval)
 {
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/4] version: add missing EXPORT_SYMBOL for version_string
  2012-07-25  7:47 [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 2/4] complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete Jean-Christophe PLAGNIOL-VILLARD
@ 2012-07-25  7:47 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 4/4] command: add missing EXPORT_SYMBOL for find_cmd Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:53 ` [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Sascha Hauer
  3 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-07-25  7:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/version.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/version.c b/common/version.c
index 51a8e7c..a557904 100644
--- a/common/version.c
+++ b/common/version.c
@@ -4,7 +4,7 @@
 
 const char version_string[] =
 	"barebox " UTS_RELEASE " " UTS_VERSION "\n";
-
+EXPORT_SYMBOL(version_string);
 
 void barebox_banner (void)
 {
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/4] command: add missing EXPORT_SYMBOL for find_cmd
  2012-07-25  7:47 [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 2/4] complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:47 ` [PATCH 3/4] version: add missing EXPORT_SYMBOL for version_string Jean-Christophe PLAGNIOL-VILLARD
@ 2012-07-25  7:47 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-07-25  7:53 ` [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Sascha Hauer
  3 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-07-25  7:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/command.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/common/command.c b/common/command.c
index f21bcc2..c18998c 100644
--- a/common/command.c
+++ b/common/command.c
@@ -166,6 +166,7 @@ struct command *find_cmd (const char *cmd)
 
 	return NULL;	/* not found or ambiguous command */
 }
+EXPORT_SYMBOL(find_cmd);
 
 /*
  * Put all commands into a linked list. Without module support we could use
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull
  2012-07-25  7:47 [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2012-07-25  7:47 ` [PATCH 4/4] command: add missing EXPORT_SYMBOL for find_cmd Jean-Christophe PLAGNIOL-VILLARD
@ 2012-07-25  7:53 ` Sascha Hauer
  2012-07-25  8:00   ` Jean-Christophe PLAGNIOL-VILLARD
  3 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-07-25  7:53 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Wed, Jul 25, 2012 at 09:47:30AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

I had the same patches locally already, but didn't come along posting
them. Applied all.

btw you'll need the following for using modules with data cache enabled.
I haven't posted it yet because using dma_* functions doesn't look right.
Maybe we need some flush_dcache_range and flush_icache_range functions

Sascha


From 23fda4644ca033f001f96eef86bd6a7c4349d18e Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Mon, 23 Jul 2012 23:54:39 +0200
Subject: [PATCH] ARM module: flush caches

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/insmod.c |    2 ++
 common/module.c   |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/commands/insmod.c b/commands/insmod.c
index f547e9d..da0bb47 100644
--- a/commands/insmod.c
+++ b/commands/insmod.c
@@ -21,6 +21,8 @@ static int do_insmod(int argc, char *argv[])
 	}
 
 	module = load_module(buf, len);
+	/* flush I-cache before jumping to the copied binary */
+	__asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0" : : "r" (0));
 
 	free(buf);
 
diff --git a/common/module.c b/common/module.c
index c0ff0f2..af98422 100644
--- a/common/module.c
+++ b/common/module.c
@@ -25,6 +25,7 @@
 #include <xfuncs.h>
 #include <command.h>
 #include <fs.h>
+#include <dma.h>
 #include <kallsyms.h>
 #include <linux/list.h>
 
@@ -257,7 +258,7 @@ struct module * load_module(void *mod_image, unsigned long len)
 	   special cases for the architectures. */
 	layout_sections(module, ehdr, sechdrs, secstrings);
 
-	ptr = xzalloc(module->core_size);
+	ptr = dma_alloc(module->core_size);
 	module->module_core = ptr;
 
 	/* Transfer each section which specifies SHF_ALLOC */
@@ -310,6 +311,10 @@ struct module * load_module(void *mod_image, unsigned long len)
 		}
 	}
 
+#ifdef CONFIG_MMU
+	dma_flush_range((unsigned long)ptr,
+			(unsigned long)ptr + module->core_size);
+#endif
 	list_add_tail(&module->list, &module_list);
 
 	return module;
-- 
1.7.10.4

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull
  2012-07-25  7:53 ` [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Sascha Hauer
@ 2012-07-25  8:00   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-07-25  8:00 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 09:53 Wed 25 Jul     , Sascha Hauer wrote:
> On Wed, Jul 25, 2012 at 09:47:30AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> I had the same patches locally already, but didn't come along posting
> them. Applied all.
> 
> btw you'll need the following for using modules with data cache enabled.
> I haven't posted it yet because using dma_* functions doesn't look right.
> Maybe we need some flush_dcache_range and flush_icache_range functions
so far I test them without MMU enable

I take a look and I agree

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-25  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  7:47 [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Jean-Christophe PLAGNIOL-VILLARD
2012-07-25  7:47 ` [PATCH 2/4] complete: add missing EXPORT_SYMBOL for {command, device, empty, command}_var_complete Jean-Christophe PLAGNIOL-VILLARD
2012-07-25  7:47 ` [PATCH 3/4] version: add missing EXPORT_SYMBOL for version_string Jean-Christophe PLAGNIOL-VILLARD
2012-07-25  7:47 ` [PATCH 4/4] command: add missing EXPORT_SYMBOL for find_cmd Jean-Christophe PLAGNIOL-VILLARD
2012-07-25  7:53 ` [PATCH 1/4] vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull Sascha Hauer
2012-07-25  8:00   ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox