Skip to contentSkip to conversation

ltp: Add support for Imagination Technologies Meta

PATCH In review Markos Chandras 2 participants 5 messages Mar 13, 2013 – Mar 14, 2013 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ltp: Add support for Imagination Technologies Meta

From: Markos Chandras <[email protected]>

This patch adds support for Imagination's Meta architecture. The Meta Linux kernel port will be included in the Linux Kernel v3.9. The Meta stack grows upwards so we need to add the appropriate __metag__ macro to the ltp_clone function.

---
 lib/cloner.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/cloner.c +1 -1
index 3835184..fa18731 100644
@@ -54,7 +54,7 @@ ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg,
 {
 	int ret;
 
-#if defined(__hppa__)
+#if defined(__hppa__) || (__metag__)
 	ret = clone(fn, stack, clone_flags, arg);
 #elif defined(__ia64__)
 	ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL);
Signature · 13 lines
1.7.1



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 4 lines · On Wednesday 13 March 2013 10:04:54 Markos Chandras wrote:

This patch adds support for Imagination's Meta architecture. The Meta Linux kernel port will be included in the Linux Kernel v3.9. The Meta stack grows upwards so we need to add the appropriate __metag__ macro to the ltp_clone function.

i thought only the parisc people were crazy enough to do that ;)

lib/cloner.c ltp_clone(unsigned long clone_flags, int (*fn) (void · line 57

Quoted 8 lines
lib/cloner.c +1 -1
@@ -54,7 +54,7 @@ ltp_clone(unsigned long clone_flags, int (*fn) (void
 *arg), void *arg, {
 	int ret;
 
-#if defined(__hppa__)
+#if defined(__hppa__) || (__metag__)

you're missing "defined"

lib/cloner.c ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg, · line 60

Quoted 3 lines
lib/cloner.c +0 -0
 	ret = clone(fn, stack, clone_flags, arg);
 #elif defined(__ia64__)
 	ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL);

i wonder if we could make this into a runtime test. like declare a buffer on the stack, then call alloca(), and compare the resulting pointers. -mike

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 6 lines · Mike Frysinger

lib/cloner.c ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg, · line 57

Quoted 3 lines
lib/cloner.c +1 -1
-#if defined(__hppa__)
+#if defined(__hppa__) || (__metag__)

you're missing "defined"

Looking a couple of lines above this I see the following:

#if defined (__s390__) || (__s390x__)

so I assumed this is the desired style for multiple "#if defined" constructs.

But if you want me to rewrite the patch so include the missing "defined" let me know.

Quoted 7 lines
Quoted 3 lines
      ret = clone(fn, stack, clone_flags, arg);
 #elif defined(__ia64__)
      ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL);

i wonder if we could make this into a runtime test. like declare a buffer on the stack, then call alloca(), and compare the resulting pointers. -mike

If you ask me, I prefer the way it is now.

Signature · 12 lines
Regards,
Markos Chandras

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw
Quoted 6 lines · On Wednesday 13 March 2013 13:28:08 Markos Chandras wrote:
Quoted 4 lines · Mike Frysinger

lib/cloner.c ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg, · line 57

Quoted 2 lines
lib/cloner.c +1 -1
-#if defined(__hppa__)
+#if defined(__hppa__) || (__metag__)

you're missing "defined"

Quoted 6 lines

Looking a couple of lines above this I see the following:

#if defined (__s390__) || (__s390x__)

so I assumed this is the desired style for multiple "#if defined" constructs.

nope, that's a bug too

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
      ret = clone(fn, stack, clone_flags, arg);

#elif defined(__ia64__)

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL);

i wonder if we could make this into a runtime test. like declare a buffer on the stack, then call alloca(), and compare the resulting pointers.

If you ask me, I prefer the way it is now.

the advantage is that the next random person to grow their stock in the opposite direction won't have to update this hard coded list. and if it was written this way earlier, you wouldn't be here right now either ;).

not saying you must do this ... fix the defined checks and we can merge that -mike

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Wednesday 13 March 2013 13:28:08 Markos Chandras wrote:
Quoted 4 lines · Mike Frysinger

lib/cloner.c ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg, · line 57

Quoted 2 lines
lib/cloner.c +1 -1
-#if defined(__hppa__)
+#if defined(__hppa__) || (__metag__)

you're missing "defined"

Quoted 8 lines
Quoted 6 lines

Looking a couple of lines above this I see the following:

#if defined (__s390__) || (__s390x__)

so I assumed this is the desired style for multiple "#if defined" constructs.

nope, that's a bug too

Ok I will fix that too in v2

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
      ret = clone(fn, stack, clone_flags, arg);

#elif defined(__ia64__)

ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL);

i wonder if we could make this into a runtime test. like declare a buffer on the stack, then call alloca(), and compare the resulting pointers.

Quoted 8 lines
Quoted 1 line

If you ask me, I prefer the way it is now.

the advantage is that the next random person to grow their stock in the opposite direction won't have to update this hard coded list. and if it was written this way earlier, you wouldn't be here right now either ;).

not saying you must do this ... fix the defined checks and we can merge that -mike

Ok but we rarely need to touch this list (how often do you see explicit #if/defs for new arches in LTP, especially with the stack growing upwards?). But sure, making this check during runtime would also be nice.

Patch v2 sent.

Signature · 12 lines
Regards,
Markos Chandras

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list