public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures.
@ 2012-01-18 15:04 Carmelo AMOROSO
  2012-01-18 15:19 ` Mike Frysinger
  2012-01-20 13:32 ` Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 15:04 UTC (permalink / raw)
  To: ltp-list

From: Francesco Rundo <francesco.rundo@st.com>

'cacheflush' syscall is available for other architectures than mips (i.e. SH4)
as originally the testcase was assuming.
Rely upon the availability of __NR_syscall numbers from kernel headers.

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 .../kernel/syscalls/cacheflush/cacheflush01.c      |   27 ++++++-------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
index 50c4ade..fbd3b32 100644
--- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
+++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
@@ -44,9 +44,16 @@
 #include <stdlib.h>
 #include <errno.h>
 
-/* cacheflush man page states that cacheflush() is only applicable to
- * MIPS architecture -- regardless, it's a good negative test.. */
+/* Harness Specific Include Files. */
+#include "test.h"
+#include "usctest.h"
+#include "linux_syscall_numbers.h"
 
+#if defined __NR_cacheflush && __NR_cacheflush > 0
+#include <asm/cachectl.h>
+#else
+/* Fake linux_syscall_numbers.h */
+#define __NR_cacheflush		0
 #ifndef   ICACHE
 #define   ICACHE   (1<<0)		/* flush instruction cache        */
 #endif
@@ -56,22 +63,6 @@
 #ifndef   BCACHE
 #define   BCACHE   (ICACHE|DCACHE)	/* flush both caches              */
 #endif
-
-/* Harness Specific Incnude Files. */
-#include "test.h"
-#include "usctest.h"
-#include "linux_syscall_numbers.h"
-
-/* cacheflush man page states that cacheflush() is only applicable to
- * MIPS architecture -- regardless, it's a good negative test.. */
-#if defined __mips__
-#include <asm/cachectl.h>
-#ifndef __NR_cacheflush
-#define __NR_cacheflush		0
-#endif
-#else
-/* Fake linux_syscall_numbers.h */
-#define __NR_cacheflush		0
 #endif
 
 /* Extern Global Variables */
-- 
1.7.4.4


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures.
  2012-01-18 15:04 [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures Carmelo AMOROSO
@ 2012-01-18 15:19 ` Mike Frysinger
  2012-01-20 13:32 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2012-01-18 15:19 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 51 bytes --]

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 381 bytes --]

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures.
  2012-01-18 15:04 [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures Carmelo AMOROSO
  2012-01-18 15:19 ` Mike Frysinger
@ 2012-01-20 13:32 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2012-01-20 13:32 UTC (permalink / raw)
  To: Carmelo AMOROSO; +Cc: ltp-list

Hi!
Commited, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2012-01-20 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 15:04 [LTP] [PATCH 1/2] cacheflush: enable cacheflush syscall for other architectures Carmelo AMOROSO
2012-01-18 15:19 ` Mike Frysinger
2012-01-20 13:32 ` Cyril Hrubis

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