x86: coding styles fixes to arch/x86/kernel/process_64.c
Fix about 50 errors and many warnings without change process_64.o arch/x86/kernel/process_64.o: text data bss dec hex filename 5236 8 24 5268 1494 process_64.o.after 5236 8 24 5268 1494 process_64.o.before md5: 9c35e9debdea4e471288c6e8ca267a75 process_64.o.after 9c35e9debdea4e471288c6e8ca267a75 process_64.o.before Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
3964cd3a67
commit
7de08b4e1e
@@ -37,11 +37,11 @@
|
|||||||
#include <linux/kdebug.h>
|
#include <linux/kdebug.h>
|
||||||
#include <linux/tick.h>
|
#include <linux/tick.h>
|
||||||
#include <linux/prctl.h>
|
#include <linux/prctl.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/i387.h>
|
#include <asm/i387.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
@@ -88,7 +88,7 @@ void exit_idle(void)
|
|||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
DECLARE_PER_CPU(int, cpu_state);
|
DECLARE_PER_CPU(int, cpu_state);
|
||||||
|
|
||||||
#include <asm/nmi.h>
|
#include <linux/nmi.h>
|
||||||
/* We halt the CPU with physical CPU hotplug */
|
/* We halt the CPU with physical CPU hotplug */
|
||||||
static inline void play_dead(void)
|
static inline void play_dead(void)
|
||||||
{
|
{
|
||||||
@@ -152,7 +152,7 @@ void cpu_idle(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Prints also some state that isn't saved in the pt_regs */
|
/* Prints also some state that isn't saved in the pt_regs */
|
||||||
void __show_regs(struct pt_regs * regs)
|
void __show_regs(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
|
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
|
||||||
unsigned long d0, d1, d2, d3, d6, d7;
|
unsigned long d0, d1, d2, d3, d6, d7;
|
||||||
@@ -197,7 +197,7 @@ void __show_regs(struct pt_regs * regs)
|
|||||||
cr4 = read_cr4();
|
cr4 = read_cr4();
|
||||||
|
|
||||||
printk("FS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n",
|
printk("FS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n",
|
||||||
fs,fsindex,gs,gsindex,shadowgs);
|
fs, fsindex, gs, gsindex, shadowgs);
|
||||||
printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0);
|
printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0);
|
||||||
printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4);
|
printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4);
|
||||||
|
|
||||||
@@ -314,10 +314,10 @@ void prepare_to_copy(struct task_struct *tsk)
|
|||||||
|
|
||||||
int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
|
int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
|
||||||
unsigned long unused,
|
unsigned long unused,
|
||||||
struct task_struct * p, struct pt_regs * regs)
|
struct task_struct *p, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct pt_regs * childregs;
|
struct pt_regs *childregs;
|
||||||
struct task_struct *me = current;
|
struct task_struct *me = current;
|
||||||
|
|
||||||
childregs = ((struct pt_regs *)
|
childregs = ((struct pt_regs *)
|
||||||
@@ -544,7 +544,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
|||||||
unsigned fsindex, gsindex;
|
unsigned fsindex, gsindex;
|
||||||
|
|
||||||
/* we're going to use this soon, after a few expensive things */
|
/* we're going to use this soon, after a few expensive things */
|
||||||
if (next_p->fpu_counter>5)
|
if (next_p->fpu_counter > 5)
|
||||||
prefetch(next->xstate);
|
prefetch(next->xstate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -664,7 +664,7 @@ long sys_execve(char __user *name, char __user * __user *argv,
|
|||||||
char __user * __user *envp, struct pt_regs *regs)
|
char __user * __user *envp, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
long error;
|
long error;
|
||||||
char * filename;
|
char *filename;
|
||||||
|
|
||||||
filename = getname(name);
|
filename = getname(name);
|
||||||
error = PTR_ERR(filename);
|
error = PTR_ERR(filename);
|
||||||
@@ -722,10 +722,10 @@ asmlinkage long sys_vfork(struct pt_regs *regs)
|
|||||||
unsigned long get_wchan(struct task_struct *p)
|
unsigned long get_wchan(struct task_struct *p)
|
||||||
{
|
{
|
||||||
unsigned long stack;
|
unsigned long stack;
|
||||||
u64 fp,ip;
|
u64 fp, ip;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if (!p || p == current || p->state==TASK_RUNNING)
|
if (!p || p == current || p->state == TASK_RUNNING)
|
||||||
return 0;
|
return 0;
|
||||||
stack = (unsigned long)task_stack_page(p);
|
stack = (unsigned long)task_stack_page(p);
|
||||||
if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE)
|
if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE)
|
||||||
@@ -824,8 +824,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
|
|||||||
rdmsrl(MSR_KERNEL_GS_BASE, base);
|
rdmsrl(MSR_KERNEL_GS_BASE, base);
|
||||||
else
|
else
|
||||||
base = task->thread.gs;
|
base = task->thread.gs;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
base = task->thread.gs;
|
base = task->thread.gs;
|
||||||
ret = put_user(base, (unsigned long __user *)addr);
|
ret = put_user(base, (unsigned long __user *)addr);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user