Merge branches 'x86-apic-for-linus', 'x86-asm-for-linus' and 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, apic: Print verbose error interrupt reason on apic=debug * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Demacro CONFIG_PARAVIRT cpu accessors * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Fix mrst sparse complaints x86: Fix spelling error in the memcpy() source code comment x86, mpparse: Remove unnecessary variable
This commit is contained in:
commit
17b141803c
@ -303,24 +303,81 @@ static inline void native_wbinvd(void)
|
|||||||
#ifdef CONFIG_PARAVIRT
|
#ifdef CONFIG_PARAVIRT
|
||||||
#include <asm/paravirt.h>
|
#include <asm/paravirt.h>
|
||||||
#else
|
#else
|
||||||
#define read_cr0() (native_read_cr0())
|
|
||||||
#define write_cr0(x) (native_write_cr0(x))
|
static inline unsigned long read_cr0(void)
|
||||||
#define read_cr2() (native_read_cr2())
|
{
|
||||||
#define write_cr2(x) (native_write_cr2(x))
|
return native_read_cr0();
|
||||||
#define read_cr3() (native_read_cr3())
|
}
|
||||||
#define write_cr3(x) (native_write_cr3(x))
|
|
||||||
#define read_cr4() (native_read_cr4())
|
static inline void write_cr0(unsigned long x)
|
||||||
#define read_cr4_safe() (native_read_cr4_safe())
|
{
|
||||||
#define write_cr4(x) (native_write_cr4(x))
|
native_write_cr0(x);
|
||||||
#define wbinvd() (native_wbinvd())
|
}
|
||||||
|
|
||||||
|
static inline unsigned long read_cr2(void)
|
||||||
|
{
|
||||||
|
return native_read_cr2();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void write_cr2(unsigned long x)
|
||||||
|
{
|
||||||
|
native_write_cr2(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long read_cr3(void)
|
||||||
|
{
|
||||||
|
return native_read_cr3();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void write_cr3(unsigned long x)
|
||||||
|
{
|
||||||
|
native_write_cr3(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long read_cr4(void)
|
||||||
|
{
|
||||||
|
return native_read_cr4();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long read_cr4_safe(void)
|
||||||
|
{
|
||||||
|
return native_read_cr4_safe();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void write_cr4(unsigned long x)
|
||||||
|
{
|
||||||
|
native_write_cr4(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void wbinvd(void)
|
||||||
|
{
|
||||||
|
native_wbinvd();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
#define read_cr8() (native_read_cr8())
|
|
||||||
#define write_cr8(x) (native_write_cr8(x))
|
static inline unsigned long read_cr8(void)
|
||||||
#define load_gs_index native_load_gs_index
|
{
|
||||||
|
return native_read_cr8();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void write_cr8(unsigned long x)
|
||||||
|
{
|
||||||
|
native_write_cr8(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void load_gs_index(unsigned selector)
|
||||||
|
{
|
||||||
|
native_load_gs_index(selector);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Clear the 'TS' bit */
|
/* Clear the 'TS' bit */
|
||||||
#define clts() (native_clts())
|
static inline void clts(void)
|
||||||
|
{
|
||||||
|
native_clts();
|
||||||
|
}
|
||||||
|
|
||||||
#endif/* CONFIG_PARAVIRT */
|
#endif/* CONFIG_PARAVIRT */
|
||||||
|
|
||||||
|
@ -1812,30 +1812,41 @@ void smp_spurious_interrupt(struct pt_regs *regs)
|
|||||||
*/
|
*/
|
||||||
void smp_error_interrupt(struct pt_regs *regs)
|
void smp_error_interrupt(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
u32 v, v1;
|
u32 v0, v1;
|
||||||
|
u32 i = 0;
|
||||||
|
static const char * const error_interrupt_reason[] = {
|
||||||
|
"Send CS error", /* APIC Error Bit 0 */
|
||||||
|
"Receive CS error", /* APIC Error Bit 1 */
|
||||||
|
"Send accept error", /* APIC Error Bit 2 */
|
||||||
|
"Receive accept error", /* APIC Error Bit 3 */
|
||||||
|
"Redirectable IPI", /* APIC Error Bit 4 */
|
||||||
|
"Send illegal vector", /* APIC Error Bit 5 */
|
||||||
|
"Received illegal vector", /* APIC Error Bit 6 */
|
||||||
|
"Illegal register address", /* APIC Error Bit 7 */
|
||||||
|
};
|
||||||
|
|
||||||
exit_idle();
|
exit_idle();
|
||||||
irq_enter();
|
irq_enter();
|
||||||
/* First tickle the hardware, only then report what went on. -- REW */
|
/* First tickle the hardware, only then report what went on. -- REW */
|
||||||
v = apic_read(APIC_ESR);
|
v0 = apic_read(APIC_ESR);
|
||||||
apic_write(APIC_ESR, 0);
|
apic_write(APIC_ESR, 0);
|
||||||
v1 = apic_read(APIC_ESR);
|
v1 = apic_read(APIC_ESR);
|
||||||
ack_APIC_irq();
|
ack_APIC_irq();
|
||||||
atomic_inc(&irq_err_count);
|
atomic_inc(&irq_err_count);
|
||||||
|
|
||||||
/*
|
apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x(%02x)",
|
||||||
* Here is what the APIC error bits mean:
|
smp_processor_id(), v0 , v1);
|
||||||
* 0: Send CS error
|
|
||||||
* 1: Receive CS error
|
v1 = v1 & 0xff;
|
||||||
* 2: Send accept error
|
while (v1) {
|
||||||
* 3: Receive accept error
|
if (v1 & 0x1)
|
||||||
* 4: Reserved
|
apic_printk(APIC_DEBUG, KERN_CONT " : %s", error_interrupt_reason[i]);
|
||||||
* 5: Send illegal vector
|
i++;
|
||||||
* 6: Received illegal vector
|
v1 >>= 1;
|
||||||
* 7: Illegal register address
|
};
|
||||||
*/
|
|
||||||
pr_debug("APIC error on CPU%d: %02x(%02x)\n",
|
apic_printk(APIC_DEBUG, KERN_CONT "\n");
|
||||||
smp_processor_id(), v , v1);
|
|
||||||
irq_exit();
|
irq_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,14 +718,12 @@ static void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
|
|||||||
static int
|
static int
|
||||||
check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, int count)
|
check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, int count)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (!mpc_new_phys || count <= mpc_new_length) {
|
if (!mpc_new_phys || count <= mpc_new_length) {
|
||||||
WARN(1, "update_mptable: No spare slots (length: %x)\n", count);
|
WARN(1, "update_mptable: No spare slots (length: %x)\n", count);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
#else /* CONFIG_X86_IO_APIC */
|
#else /* CONFIG_X86_IO_APIC */
|
||||||
static
|
static
|
||||||
|
@ -67,7 +67,7 @@ ENTRY(memcpy)
|
|||||||
jb .Lhandle_tail
|
jb .Lhandle_tail
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We check whether memory false dependece could occur,
|
* We check whether memory false dependence could occur,
|
||||||
* then jump to corresponding copy mode.
|
* then jump to corresponding copy mode.
|
||||||
*/
|
*/
|
||||||
cmp %dil, %sil
|
cmp %dil, %sil
|
||||||
|
@ -194,7 +194,7 @@ static unsigned long __init mrst_calibrate_tsc(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init mrst_time_init(void)
|
static void __init mrst_time_init(void)
|
||||||
{
|
{
|
||||||
sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr);
|
sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr);
|
||||||
switch (mrst_timer_options) {
|
switch (mrst_timer_options) {
|
||||||
@ -216,7 +216,7 @@ void __init mrst_time_init(void)
|
|||||||
apbt_time_init();
|
apbt_time_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cpuinit mrst_arch_setup(void)
|
static void __cpuinit mrst_arch_setup(void)
|
||||||
{
|
{
|
||||||
if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x27)
|
if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x27)
|
||||||
__mrst_cpu_chip = MRST_CPU_CHIP_PENWELL;
|
__mrst_cpu_chip = MRST_CPU_CHIP_PENWELL;
|
||||||
|
Loading…
Reference in New Issue
Block a user