LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch] uml: fix cmpxchg warnings in -mm
@ 2007-04-27 16:18 Miklos Szeredi
  2007-04-27 16:19 ` [patch] uml: remove #warnings Miklos Szeredi
  2007-04-27 17:27 ` [patch] uml: fix cmpxchg warnings in -mm Sam Ravnborg
  0 siblings, 2 replies; 4+ messages in thread
From: Miklos Szeredi @ 2007-04-27 16:18 UTC (permalink / raw)
  To: jdike; +Cc: linux-kernel, user-mode-linux-devel


From: Miklos Szeredi <mszeredi@suse.cz>

I get lot's of these on i386:

In file included from include/asm/atomic.h:10,
                 from include/linux/file.h:9,
                 from mm/fadvise.c:12:
include/asm/arch/atomic.h: In function ‘atomic_add_unless’:
include/asm/arch/atomic.h:240: warning: implicit declaration of function ‘cmpxchg’
[...]

The problem seems to be that <asm-i386/atomic.h> assumes that
<asm/processor.h> pulls in <asm/system.h>.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---

Index: linux/include/asm-um/processor-i386.h
===================================================================
--- linux.orig/include/asm-um/processor-i386.h	2007-04-26 15:16:47.000000000 +0200
+++ linux/include/asm-um/processor-i386.h	2007-04-27 17:58:25.000000000 +0200
@@ -9,6 +9,7 @@
 #include "linux/string.h"
 #include "asm/host_ldt.h"
 #include "asm/segment.h"
+#include "asm/system.h"
 
 extern int host_has_xmm;
 extern int host_has_cmov;

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

* [patch] uml: remove #warnings
  2007-04-27 16:18 [patch] uml: fix cmpxchg warnings in -mm Miklos Szeredi
@ 2007-04-27 16:19 ` Miklos Szeredi
  2007-04-27 17:27 ` [patch] uml: fix cmpxchg warnings in -mm Sam Ravnborg
  1 sibling, 0 replies; 4+ messages in thread
From: Miklos Szeredi @ 2007-04-27 16:19 UTC (permalink / raw)
  To: jdike; +Cc: linux-kernel, user-mode-linux-devel

From: Miklos Szeredi <mszeredi@suse.cz>

These haven't been fixed for ages.  Just make comments out of them.

arch/um/kernel/skas/process.c:181:2: warning: #warning Need to look up userspace_pid by cpu
arch/um/kernel/skas/process.c:187:2: warning: #warning Need to look up userspace_pid by cpu
arch/um/kernel/skas/process.c:194:2: warning: #warning need to loop over userspace_pids in kill_off_processes_skas

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---

Index: linux/arch/um/kernel/skas/process.c
===================================================================
--- linux.orig/arch/um/kernel/skas/process.c	2007-04-26 15:12:23.000000000 +0200
+++ linux/arch/um/kernel/skas/process.c	2007-04-26 15:12:51.000000000 +0200
@@ -178,20 +178,23 @@ int start_uml_skas(void)
 
 int external_pid_skas(struct task_struct *task)
 {
-#warning Need to look up userspace_pid by cpu
+	/* FIXME: Need to look up userspace_pid by cpu */
 	return(userspace_pid[0]);
 }
 
 int thread_pid_skas(struct task_struct *task)
 {
-#warning Need to look up userspace_pid by cpu
+	/* FIXME: Need to look up userspace_pid by cpu */
 	return(userspace_pid[0]);
 }
 
 void kill_off_processes_skas(void)
 {
 	if(proc_mm)
-#warning need to loop over userspace_pids in kill_off_processes_skas
+		/*
+		 * FIXME: need to loop over userspace_pids in
+		 * kill_off_processes_skas
+		 */
 		os_kill_ptraced_process(userspace_pid[0], 1);
 	else {
 		struct task_struct *p;
Index: linux/arch/um/os-Linux/skas/mem.c
===================================================================
--- linux.orig/arch/um/os-Linux/skas/mem.c	2007-04-26 14:20:23.000000000 +0200
+++ linux/arch/um/os-Linux/skas/mem.c	2007-04-26 15:12:51.000000000 +0200
@@ -55,7 +55,7 @@ static inline long do_syscall_stub(struc
 	int pid = mm_idp->u.pid;
 
 	if(proc_mm)
-#warning Need to look up userspace_pid by cpu
+		/* FIXME: Need to look up userspace_pid by cpu */
 		pid = userspace_pid[0];
 
 	multi_count++;
Index: linux/arch/um/os-Linux/skas/process.c
===================================================================
--- linux.orig/arch/um/os-Linux/skas/process.c	2007-04-26 14:20:23.000000000 +0200
+++ linux/arch/um/os-Linux/skas/process.c	2007-04-26 15:12:51.000000000 +0200
@@ -560,7 +560,7 @@ void switch_mm_skas(struct mm_id *mm_idp
 {
 	int err;
 
-#warning need cpu pid in switch_mm_skas
+	/* FIXME: need cpu pid in switch_mm_skas */
 	if(proc_mm){
 		err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0,
 			     mm_idp->u.mm_fd);

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

* Re: [patch] uml: fix cmpxchg warnings in -mm
  2007-04-27 16:18 [patch] uml: fix cmpxchg warnings in -mm Miklos Szeredi
  2007-04-27 16:19 ` [patch] uml: remove #warnings Miklos Szeredi
@ 2007-04-27 17:27 ` Sam Ravnborg
  2007-04-27 17:35   ` Jeff Dike
  1 sibling, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-04-27 17:27 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: jdike, linux-kernel, user-mode-linux-devel

On Fri, Apr 27, 2007 at 06:18:02PM +0200, Miklos Szeredi wrote:
> 
> From: Miklos Szeredi <mszeredi@suse.cz>
> 
> I get lot's of these on i386:
> 
> In file included from include/asm/atomic.h:10,
>                  from include/linux/file.h:9,
>                  from mm/fadvise.c:12:
> include/asm/arch/atomic.h: In function ‘atomic_add_unless’:
> include/asm/arch/atomic.h:240: warning: implicit declaration of function ‘cmpxchg’
> [...]
> 
> The problem seems to be that <asm-i386/atomic.h> assumes that
> <asm/processor.h> pulls in <asm/system.h>.

Then atomic.h should include system.h and not rely on someone else doing it.
Yes - then system.h may be included twice but that's ok.

	Sam

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

* Re: [patch] uml: fix cmpxchg warnings in -mm
  2007-04-27 17:27 ` [patch] uml: fix cmpxchg warnings in -mm Sam Ravnborg
@ 2007-04-27 17:35   ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2007-04-27 17:35 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Miklos Szeredi, linux-kernel, user-mode-linux-devel

On Fri, Apr 27, 2007 at 07:27:48PM +0200, Sam Ravnborg wrote:
> Then atomic.h should include system.h and not rely on someone else doing it.
> Yes - then system.h may be included twice but that's ok.

I tried that - Andi didn't like it.  My current thinking is to pull the
cmpxchg stuff out of system.h into its own header since I don't see
any existing natural place to put it.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

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

end of thread, other threads:[~2007-04-27 17:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-27 16:18 [patch] uml: fix cmpxchg warnings in -mm Miklos Szeredi
2007-04-27 16:19 ` [patch] uml: remove #warnings Miklos Szeredi
2007-04-27 17:27 ` [patch] uml: fix cmpxchg warnings in -mm Sam Ravnborg
2007-04-27 17:35   ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).