Skip to content

Commit

Permalink
Revert "More boot fixes, warning supressions."
Browse files Browse the repository at this point in the history
This reverts commit b9e0729.
  • Loading branch information
brycelelbach committed Apr 11, 2011
1 parent b9e0729 commit 01c9162
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 38 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ KBUILD_CFLAGS := -Wall -W -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-unknown-warning-option -Wno-missing-field-initializers \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-shift-overflow \
-Wno-format-security
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
Expand Down
22 changes: 10 additions & 12 deletions arch/x86/boot/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <asm/processor-flags.h>
#include "ctype.h"

#define asmregparm __attribute__((regparm(3)))

#ifdef CONFIG_X86_32
#define asmlinkage __attribute__((regparm(0)))
#else
Expand Down Expand Up @@ -233,12 +231,12 @@ static inline bool heap_free(size_t n)

/* copy.S */

void asmregparm copy_to_fs(addr_t dst, void *src, size_t len);
void * asmregparm copy_from_fs(void *dst, addr_t src, size_t len);
void asmregparm copy_to_gs(addr_t dst, void *src, size_t len);
void * asmregparm copy_from_gs(void *dst, addr_t src, size_t len);
void copy_to_fs(addr_t dst, void *src, size_t len);
void *copy_from_fs(void *dst, addr_t src, size_t len);
void copy_to_gs(addr_t dst, void *src, size_t len);
void *copy_from_gs(void *dst, addr_t src, size_t len);

static inline void * asmregparm memcpy(void *d, const void *s, size_t l)
static inline void *memcpy(void *d, const void *s, size_t l)
{
int d0, d1, d2;
asm volatile("rep ; addr32 movsb\n\t"
Expand All @@ -248,7 +246,7 @@ static inline void * asmregparm memcpy(void *d, const void *s, size_t l)
return d;
}

static inline void * asmregparm memset(void *d, char c, size_t l)
static inline void *memset(void *d, char c, size_t l)
{
int d0, d1;
asm volatile("rep ; addr32 stosb\n\t"
Expand Down Expand Up @@ -305,7 +303,7 @@ struct biosregs {
};
};
};
void asmregparm intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg);
void intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg);

/* cmdline.c */
int __cmdline_find_option(u32 cmdline_ptr, const char *option, char *buffer, int bufsize);
Expand Down Expand Up @@ -351,7 +349,7 @@ int detect_memory(void);
void __attribute__((noreturn)) go_to_protected_mode(void);

/* pmjump.S */
void asmregparm __attribute__((noreturn))
void __attribute__((noreturn))
protected_mode_jump(u32 entrypoint, u32 bootparams);

/* printf.c */
Expand All @@ -370,8 +368,8 @@ unsigned int atou(const char *s);
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);

/* tty.c */
void asmregparm puts(const char *);
void asmregparm putchar(int);
void puts(const char *);
void putchar(int);
int getchar(void);
void kbd_flush(void);
int getchar_timeout(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ EXPORT_SYMBOL(__delay);

inline void __const_udelay(unsigned long xloops)
{
unsigned long d0;
int d0;

xloops *= 4;
asm("mull %%edx"
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/pci/pcbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,20 @@ static struct {
static unsigned long bios32_service(unsigned long service)
{
unsigned char return_code; /* %al */
unsigned long return_code_compat; /* %eax */
unsigned long address; /* %ebx */
unsigned long length; /* %ecx */
unsigned long entry; /* %edx */
unsigned long flags;

local_irq_save(flags);
__asm__("lcall *(%%edi); cld"
: "=a" (return_code_compat),
: "=a" (return_code),
"=b" (address),
"=c" (length),
"=d" (entry)
: "0" (service),
"1" (0),
"D" (&bios32_indirect));
return_code = return_code_compt
local_irq_restore(flags);

switch (return_code) {
Expand Down
10 changes: 2 additions & 8 deletions arch/x86/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,8 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
$(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy)

CFL := -fPIC -m64 $(call cc-option, -fno-stack-protector)

# TODO: fix on the clang side
ifeq ($(call cc-option, -Xclang),)
CFL += -Xclang -mcode-model -Xclang small $(filter -g%,$(KBUILD_CFLAGS))
else
CFL += -mcmodel=small -fasynchronous-unwind-tables
endif
CFL := $(PROFILING) -Xclang -mcode-model -Xclang small -fPIC -m64 \
$(filter -g%,$(KBUILD_CFLAGS)) $(call cc-option, -fno-stack-protector)

$(vobjs): KBUILD_CFLAGS += $(CFL)

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/vdso/vextern.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef VEXTERN
#include <asm/vsyscall.h>
#define VEXTERN(x) \
typeof(x) *vdso_ ## x __attribute__((weak, visibility("hidden")));
extern typeof(x) *vdso_ ## x __attribute__((visibility("hidden")));
#endif

#define VMAGIC 0xfeedbabeabcdefabUL
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/vdso/vvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
#include <asm/timex.h>
#include <asm/vgtod.h>

#define VEXTERN(x) typeof (__ ## x) *vdso_ ## x = (void *)VMAGIC;
#define VEXTERN(x) typeof (__ ## x) *const vdso_ ## x = (void *)VMAGIC;
#include "vextern.h"
13 changes: 2 additions & 11 deletions include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -1044,24 +1044,15 @@ extern atomic_t perf_task_events;

static inline void perf_event_task_sched_in(struct task_struct *task)
{
JUMP_LABEL(&perf_task_events, have_events);
return;

have_events:
__perf_event_task_sched_in(task);
COND_STMT(&perf_task_events, __perf_event_task_sched_in(task));
}

static inline
void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next)
{
perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0);

JUMP_LABEL(&perf_task_events, have_events);
return;

have_events:
__perf_event_task_sched_out(task, next);

COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next));
}

extern void perf_event_mmap(struct vm_area_struct *vma);
Expand Down

0 comments on commit 01c9162

Please sign in to comment.