forked from Minki/linux
uml: style fixes in arch/um/kernel
Joe Perches noticed some printks in smp.c that needed fixing. While I was in there, I did the usual tidying in arch/um/kernel, which should be fairly style-clean at this point: copyright updates emacs formatting comments removal include tidying style fixes Cc: Joe Perches <joe@perches.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e6a2d1f702
commit
c5d4bb171c
@ -1,15 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/kernel.h"
|
||||
#include "linux/init.h"
|
||||
#include "linux/ctype.h"
|
||||
#include "linux/proc_fs.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/* If read and write race, the read will still atomically read a valid
|
||||
/*
|
||||
* If read and write race, the read will still atomically read a valid
|
||||
* value.
|
||||
*/
|
||||
int uml_exitcode = 0;
|
||||
@ -19,7 +21,8 @@ static int read_proc_exitcode(char *page, char **start, off_t off,
|
||||
{
|
||||
int len, val;
|
||||
|
||||
/* Save uml_exitcode in a local so that we don't need to guarantee
|
||||
/*
|
||||
* Save uml_exitcode in a local so that we don't need to guarantee
|
||||
* that sprintf accesses it atomically.
|
||||
*/
|
||||
val = uml_exitcode;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
@ -8,12 +8,13 @@
|
||||
extern void __bb_init_func(void *) __attribute__((weak));
|
||||
EXPORT_SYMBOL(__bb_init_func);
|
||||
|
||||
/* This is defined (and referred to in profiling stub code) only by some GCC
|
||||
/*
|
||||
* This is defined (and referred to in profiling stub code) only by some GCC
|
||||
* versions in libgcov.
|
||||
*
|
||||
* Since SuSE backported the fix, we cannot handle it depending on GCC version.
|
||||
* So, unconditionally export it. But also give it a weak declaration, which will
|
||||
* be overridden by any other one.
|
||||
* So, unconditionally export it. But also give it a weak declaration, which
|
||||
* will be overridden by any other one.
|
||||
*/
|
||||
|
||||
extern void __gcov_init(void *) __attribute__((weak));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
@ -7,14 +7,3 @@
|
||||
|
||||
extern void mcount(void);
|
||||
EXPORT_SYMBOL(mcount);
|
||||
|
||||
/*
|
||||
* Overrides for Emacs so that we follow Linus's tabbing style.
|
||||
* Emacs will notice this stuff at the end of the file and automatically
|
||||
* adjust the settings for this buffer only. This must remain at the end
|
||||
* of the file.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Local variables:
|
||||
* c-file-style: "linux"
|
||||
* End:
|
||||
*/
|
||||
|
@ -4,19 +4,21 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/stddef.h"
|
||||
#include "linux/err.h"
|
||||
#include "linux/hardirq.h"
|
||||
#include "linux/mm.h"
|
||||
#include "linux/personality.h"
|
||||
#include "linux/proc_fs.h"
|
||||
#include "linux/ptrace.h"
|
||||
#include "linux/random.h"
|
||||
#include "linux/sched.h"
|
||||
#include "linux/tick.h"
|
||||
#include "linux/threads.h"
|
||||
#include "asm/pgtable.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/personality.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/tick.h>
|
||||
#include <linux/threads.h>
|
||||
#include <asm/current.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include "as-layout.h"
|
||||
#include "kern_util.h"
|
||||
#include "os.h"
|
||||
@ -94,14 +96,15 @@ void *_switch_to(void *prev, void *next, void *last)
|
||||
do {
|
||||
current->thread.saved_task = NULL;
|
||||
|
||||
switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);
|
||||
switch_threads(&from->thread.switch_buf,
|
||||
&to->thread.switch_buf);
|
||||
|
||||
arch_switch_to(current);
|
||||
|
||||
if (current->thread.saved_task)
|
||||
show_regs(&(current->thread.regs));
|
||||
next = current->thread.saved_task;
|
||||
prev = current;
|
||||
to = current->thread.saved_task;
|
||||
from = current;
|
||||
} while (current->thread.saved_task);
|
||||
|
||||
return current->thread.prev_sched;
|
||||
|
@ -1,18 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
|
||||
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/kernel.h"
|
||||
#include "linux/list.h"
|
||||
#include "linux/slab.h"
|
||||
#include "linux/signal.h"
|
||||
#include "linux/interrupt.h"
|
||||
#include "init.h"
|
||||
#include "sigio.h"
|
||||
#include "irq_user.h"
|
||||
#include <linux/interrupt.h>
|
||||
#include "irq_kern.h"
|
||||
#include "os.h"
|
||||
#include "sigio.h"
|
||||
|
||||
/* Protected by sigio_lock() called from write_sigio_workaround */
|
||||
static int sigio_irq_fd = -1;
|
||||
@ -34,8 +28,8 @@ int write_sigio_irq(int fd)
|
||||
IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio",
|
||||
NULL);
|
||||
if (err) {
|
||||
printk("write_sigio_irq : um_request_irq failed, err = %d\n",
|
||||
err);
|
||||
printk(KERN_ERR "write_sigio_irq : um_request_irq failed, "
|
||||
"err = %d\n", err);
|
||||
return -1;
|
||||
}
|
||||
sigio_irq_fd = fd;
|
||||
|
@ -3,12 +3,12 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/module.h"
|
||||
#include "linux/ptrace.h"
|
||||
#include "linux/sched.h"
|
||||
#include "asm/siginfo.h"
|
||||
#include "asm/signal.h"
|
||||
#include "asm/unistd.h"
|
||||
#include <linux/module.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/siginfo.h>
|
||||
#include <asm/signal.h>
|
||||
#include <asm/unistd.h>
|
||||
#include "frame_kern.h"
|
||||
#include "kern_util.h"
|
||||
#include "sigcontext.h"
|
||||
|
@ -60,7 +60,7 @@ void smp_send_stop(void)
|
||||
continue;
|
||||
os_write_file(cpu_data[i].ipi_pipe[1], "S", 1);
|
||||
}
|
||||
printk(KERN_INFO "done\n");
|
||||
printk(KERN_CONT "done\n");
|
||||
}
|
||||
|
||||
static cpumask_t smp_commenced_mask = CPU_MASK_NONE;
|
||||
@ -140,9 +140,8 @@ void smp_prepare_cpus(unsigned int maxcpus)
|
||||
while (waittime-- && !cpu_isset(cpu, cpu_callin_map))
|
||||
cpu_relax();
|
||||
|
||||
if (cpu_isset(cpu, cpu_callin_map))
|
||||
printk(KERN_INFO "done\n");
|
||||
else printk(KERN_INFO "failed\n");
|
||||
printk(KERN_INFO "%s\n",
|
||||
cpu_isset(cpu, cpu_calling_map) ? "done" : "failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/sched.h"
|
||||
#include "linux/kernel.h"
|
||||
#include "linux/module.h"
|
||||
#include "linux/kallsyms.h"
|
||||
#include "asm/page.h"
|
||||
#include "asm/processor.h"
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
#include "sysrq.h"
|
||||
|
||||
/* Catch non-i386 SUBARCH's. */
|
||||
@ -22,17 +20,18 @@ void show_trace(struct task_struct *task, unsigned long * stack)
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
printk("Call Trace: \n");
|
||||
printk(KERN_INFO "Call Trace: \n");
|
||||
while (((long) stack & (THREAD_SIZE-1)) != 0) {
|
||||
addr = *stack;
|
||||
if (__kernel_text_address(addr)) {
|
||||
printk("%08lx: [<%08lx>]", (unsigned long) stack, addr);
|
||||
print_symbol(" %s", addr);
|
||||
printk("\n");
|
||||
printk(KERN_INFO "%08lx: [<%08lx>]",
|
||||
(unsigned long) stack, addr);
|
||||
print_symbol(KERN_CONT " %s", addr);
|
||||
printk(KERN_CONT "\n");
|
||||
}
|
||||
stack++;
|
||||
}
|
||||
printk("\n");
|
||||
printk(KERN_INFO "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -71,10 +70,9 @@ void show_stack(struct task_struct *task, unsigned long *esp)
|
||||
if (kstack_end(stack))
|
||||
break;
|
||||
if (i && ((i % 8) == 0))
|
||||
printk("\n ");
|
||||
printk("\n" KERN_INFO " ");
|
||||
printk("%08lx ", *stack++);
|
||||
}
|
||||
|
||||
printk("Call Trace: \n");
|
||||
show_trace(task, esp);
|
||||
}
|
||||
|
@ -3,12 +3,12 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/clockchips.h"
|
||||
#include "linux/interrupt.h"
|
||||
#include "linux/jiffies.h"
|
||||
#include "linux/threads.h"
|
||||
#include "asm/irq.h"
|
||||
#include "asm/param.h"
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/threads.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/param.h>
|
||||
#include "kern_util.h"
|
||||
#include "os.h"
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2001 Chris Emerson (cemerson@chiark.greenend.org.uk)
|
||||
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
/* These are here rather than tt/uaccess.c because skas mode needs them in
|
||||
/*
|
||||
* These are here rather than tt/uaccess.c because skas mode needs them in
|
||||
* order to do SIGBUS recovery when a tmpfs mount runs out of room.
|
||||
*/
|
||||
|
||||
@ -25,6 +26,8 @@ int __do_copy_to_user(void *to, const void *from, int n,
|
||||
|
||||
fault = __do_user_copy(to, from, n, fault_addr, fault_catcher,
|
||||
__do_copy, &faulted);
|
||||
if(!faulted) return(0);
|
||||
else return(n - (fault - (unsigned long) to));
|
||||
if (!faulted)
|
||||
return 0;
|
||||
else
|
||||
return n - (fault - (unsigned long) to);
|
||||
}
|
||||
|
@ -3,23 +3,23 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/delay.h"
|
||||
#include "linux/mm.h"
|
||||
#include "linux/module.h"
|
||||
#include "linux/seq_file.h"
|
||||
#include "linux/string.h"
|
||||
#include "linux/utsname.h"
|
||||
#include "asm/pgtable.h"
|
||||
#include "asm/processor.h"
|
||||
#include "asm/setup.h"
|
||||
#include "arch.h"
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/setup.h>
|
||||
#include "as-layout.h"
|
||||
#include "arch.h"
|
||||
#include "init.h"
|
||||
#include "kern.h"
|
||||
#include "kern_util.h"
|
||||
#include "mem_user.h"
|
||||
#include "os.h"
|
||||
#include "skas.h"
|
||||
|
||||
#define DEFAULT_COMMAND_LINE "root=98:0"
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
|
||||
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "asm/errno.h"
|
||||
#include <asm/errno.h>
|
||||
#include "init.h"
|
||||
#include "os.h"
|
||||
#include "kern.h"
|
||||
#include "linux/kernel.h"
|
||||
#include "os.h"
|
||||
|
||||
/* Changed by set_umid_arg */
|
||||
static int umid_inited = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user