[Sony Xperia Miro, Tipo (Dual), J, E] jbliz:
I'm trying compile My own kernel but always show error

jbliz@jbliz:~/Desktop/kernel_jb/kernel$ export ARCH=arm
jbliz@jbliz:~/Desktop/kernel_jb/kernel$ export CROSS_COMPILE=/home/jbliz/Desktop/kernel_jb/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
jbliz@jbliz:~/Desktop/kernel_jb/kernel$ make -j2
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (SCSI_SRP) selects SCSI_TGT which has unmet direct dependencies (SCSI && EXPERIMENTAL)
warning: (DRM && ION) selects DMA_SHARED_BUFFER which has unmet direct dependencies (EXPERIMENTAL)
warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD)
warning: (SCSI_SRP) selects SCSI_TGT which has unmet direct dependencies (SCSI && EXPERIMENTAL)
warning: (DRM && ION) selects DMA_SHARED_BUFFER which has unmet direct dependencies (EXPERIMENTAL)
warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTCC scripts/genksyms/parse.tab.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/kallsyms
HOSTLD scripts/mod/modpost
make[1]: `include/generated/mach-types.h' is up to date.
HOSTCC scripts/conmakehash
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:50:0,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/preempt.h:110:0: warning: "inc_preempt_count" redefined [enabled by default]
error, forbidden warning: preempt.h:110
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
jbliz@jbliz:~/Desktop/kernel_jb/kernel$

preempt.h

#ifndef __LINUX_PREEMPT_H
#define __LINUX_PREEMPT_H

/*
* include/linux/preempt.h - macros for accessing and manipulating
* preempt_count (used for kernel preemption, interrupt count, etc.)
*/

#include <linux/thread_info.h>
#include <linux/linkage.h>
#include <linux/list.h>

#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
extern void add_preempt_count(int val);
extern void sub_preempt_count(int val);
#else
# define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
# define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
#endif

#define inc_preempt_count() add_preempt_count(1)
#define dec_preempt_count() sub_preempt_count(1)

#define preempt_count()	(current_thread_info()->preempt_count)

#ifdef CONFIG_PREEMPT

asmlinkage void preempt_schedule(void);

#define preempt_check_resched() \
do { \
if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
preempt_schedule(); \
} while (0)

#else /* !CONFIG_PREEMPT */

#define preempt_check_resched()	do { } while (0)

#endif /* CONFIG_PREEMPT */

#ifdef CONFIG_PREEMPT_COUNT

#define preempt_disable() \
do { \
inc_preempt_count(); \
barrier(); \
} while (0)

#define sched_preempt_enable_no_resched() \
do { \
barrier(); \
dec_preempt_count(); \
} while (0)

#define preempt_enable_no_resched()	sched_preempt_enable_no_resched()

#define preempt_enable() \
do { \
preempt_enable_no_resched(); \
barrier(); \
preempt_check_resched(); \
} while (0)

/* For debugging and tracer internals only! */
#define add_preempt_count_notrace(val)	\
do { preempt_count() += (val); } while (0)
#define sub_preempt_count_notrace(val)	\
do { preempt_count() -= (val); } while (0)
#define inc_preempt_count_notrace() add_preempt_count_notrace(1)
#define dec_preempt_count_notrace() sub_preempt_count_notrace(1)

#define preempt_disable_notrace() \
do { \
inc_preempt_count_notrace(); \
barrier(); \
} while (0)

#define preempt_enable_no_resched_notrace() \
do { \
barrier(); \
dec_preempt_count_notrace(); \
} while (0)

/* preempt_check_resched is OK to trace */
#define preempt_enable_notrace() \
do { \
preempt_enable_no_resched_notrace(); \
barrier(); \
preempt_check_resched(); \
} while (0)

#else /* !CONFIG_PREEMPT_COUNT */

#define preempt_disable()	do { } while (0)
#define sched_preempt_enable_no_resched()	do { } while (0)
#define preempt_enable_no_resched()	do { } while (0)
#define preempt_enable()	do { } while (0)

#define preempt_disable_notrace()	do { } while (0)
#define preempt_enable_no_resched_notrace()	do { } while (0)
#define preempt_enable_notrace()	do { } while (0)

//20130122-JordanChen
#define add_preempt_count_notrace(val)	do { } while (0)
#define sub_preempt_count_notrace(val)	do { } while (0)
#define inc_preempt_count_notrace() do { } while (0)
#define dec_preempt_count_notrace() do { } while (0)
#define inc_preempt_count() do { } while (0)
#define dec_preempt_count() do { } while (0)

//20130122-JordanChen

#endif /* CONFIG_PREEMPT_COUNT */

#ifdef CONFIG_PREEMPT_NOTIFIERS

struct preempt_notifier;

/**
* preempt_ops - notifiers called when a task is preempted and rescheduled
* @sched_in: we're about to be rescheduled:
* notifier: struct preempt_notifier for the task being scheduled
* cpu: cpu we're scheduled on
* @sched_out: we've just been preempted
* notifier: struct preempt_notifier for the task being preempted
* next: the task that's kicking us out
*
* Please note that sched_in and out are called under different
* contexts. sched_out is called with rq lock held and irq disabled
* while sched_in is called without rq lock and irq enabled. This
* difference is intentional and depended upon by its users.
*/
struct preempt_ops {
void (*sched_in)(struct preempt_notifier *notifier, int cpu);
void (*sched_out)(struct preempt_notifier *notifier,
struct task_struct *next);
};

/**
* preempt_notifier - key for installing preemption notifiers
* @link: internal use
* @ops: defines the notifier functions to be called
*
* Usually used in conjunction with container_of().
*/
struct preempt_notifier {
struct hlist_node link;
struct preempt_ops *ops;
};

void preempt_notifier_register(struct preempt_notifier *notifier);
void preempt_notifier_unregister(struct preempt_notifier *notifier);

static inline void preempt_notifier_init(struct preempt_notifier *notifier,
struct preempt_ops *ops)
{
INIT_HLIST_NODE(&notifier->link);
notifier->ops = ops;
}

#endif

#endif /* __LINUX_PREEMPT_H */

Toolchains by DooMLoRD

/home/jbliz/Desktop/kernel_jb/toolchains/arm-2009q3/
/home/jbliz/Desktop/kernel_jb/toolchains/arm-2010.09/
/home/jbliz/Desktop/kernel_jb/toolchains/arm-2011.03/
/home/jbliz/Desktop/kernel_jb/toolchains/arm-2011.09/
/home/jbliz/Desktop/kernel_jb/toolchains/arm-eabi-4.4.3/
/home/jbliz/Desktop/kernel_jb/toolchains/arm-eabi-linaro-4.6.2/