Merge branch 'master'
This commit is contained in:
@@ -96,6 +96,9 @@
|
||||
#ifndef cpu_has_ic_fills_f_dc
|
||||
#define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC)
|
||||
#endif
|
||||
#ifndef cpu_has_pindexed_dcache
|
||||
#define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* I-Cache snoops remote store. This only matters on SMP. Some multiprocessors
|
||||
|
||||
@@ -39,6 +39,7 @@ struct cache_desc {
|
||||
#define MIPS_CACHE_ALIASES 0x00000004 /* Cache could have aliases */
|
||||
#define MIPS_CACHE_IC_F_DC 0x00000008 /* Ic can refill from D-cache */
|
||||
#define MIPS_IC_SNOOPS_REMOTE 0x00000010 /* Ic snoops remote stores */
|
||||
#define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */
|
||||
|
||||
struct cpuinfo_mips {
|
||||
unsigned long udelay_val;
|
||||
|
||||
+106
-80
@@ -3,7 +3,9 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Ralf Baechle
|
||||
* Copyright (C) 2003, 2004 Ralf Baechle <ralf@linux-mips.org>
|
||||
* Copyright (C) MIPS Technologies, Inc.
|
||||
* written by Ralf Baechle <ralf@linux-mips.org>
|
||||
*/
|
||||
#ifndef _ASM_HAZARDS_H
|
||||
#define _ASM_HAZARDS_H
|
||||
@@ -74,8 +76,7 @@
|
||||
#define irq_disable_hazard
|
||||
_ehb
|
||||
|
||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \
|
||||
defined(CONFIG_CPU_SB1)
|
||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
|
||||
|
||||
/*
|
||||
* R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
|
||||
@@ -99,13 +100,13 @@
|
||||
#else /* __ASSEMBLY__ */
|
||||
|
||||
__asm__(
|
||||
" .macro _ssnop \n\t"
|
||||
" sll $0, $0, 1 \n\t"
|
||||
" .endm \n\t"
|
||||
" \n\t"
|
||||
" .macro _ehb \n\t"
|
||||
" sll $0, $0, 3 \n\t"
|
||||
" .endm \n\t");
|
||||
" .macro _ssnop \n"
|
||||
" sll $0, $0, 1 \n"
|
||||
" .endm \n"
|
||||
" \n"
|
||||
" .macro _ehb \n"
|
||||
" sll $0, $0, 3 \n"
|
||||
" .endm \n");
|
||||
|
||||
#ifdef CONFIG_CPU_RM9000
|
||||
|
||||
@@ -117,17 +118,21 @@ __asm__(
|
||||
|
||||
#define mtc0_tlbw_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
".set\tmips32\n\t" \
|
||||
"_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
|
||||
".set\tmips0")
|
||||
" .set mips32 \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" .set mips0 \n")
|
||||
|
||||
#define tlbw_use_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
".set\tmips32\n\t" \
|
||||
"_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
|
||||
".set\tmips0")
|
||||
|
||||
#define back_to_back_c0_hazard() do { } while (0)
|
||||
" .set mips32 \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" _ssnop \n" \
|
||||
" .set mips0 \n")
|
||||
|
||||
#else
|
||||
|
||||
@@ -136,15 +141,25 @@ __asm__(
|
||||
*/
|
||||
#define mtc0_tlbw_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
".set noreorder\n\t" \
|
||||
"nop; nop; nop; nop; nop; nop;\n\t" \
|
||||
".set reorder\n\t")
|
||||
" .set noreorder \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" .set reorder \n")
|
||||
|
||||
#define tlbw_use_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
".set noreorder\n\t" \
|
||||
"nop; nop; nop; nop; nop; nop;\n\t" \
|
||||
".set reorder\n\t")
|
||||
" .set noreorder \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" nop \n" \
|
||||
" .set reorder \n")
|
||||
|
||||
#endif
|
||||
|
||||
@@ -156,49 +171,26 @@ __asm__(
|
||||
|
||||
#ifdef CONFIG_CPU_MIPSR2
|
||||
|
||||
__asm__(
|
||||
" .macro\tirq_enable_hazard \n\t"
|
||||
" _ehb \n\t"
|
||||
" .endm \n\t"
|
||||
" \n\t"
|
||||
" .macro\tirq_disable_hazard \n\t"
|
||||
" _ehb \n\t"
|
||||
" .endm \n\t"
|
||||
" \n\t"
|
||||
" .macro\tback_to_back_c0_hazard \n\t"
|
||||
" _ehb \n\t"
|
||||
" .endm");
|
||||
__asm__(" .macro irq_enable_hazard \n"
|
||||
" _ehb \n"
|
||||
" .endm \n"
|
||||
" \n"
|
||||
" .macro irq_disable_hazard \n"
|
||||
" _ehb \n"
|
||||
" .endm \n");
|
||||
|
||||
#define irq_enable_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
"irq_enable_hazard")
|
||||
|
||||
#define irq_disable_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
"irq_disable_hazard")
|
||||
|
||||
#define back_to_back_c0_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
"back_to_back_c0_hazard")
|
||||
|
||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \
|
||||
defined(CONFIG_CPU_SB1)
|
||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
|
||||
|
||||
/*
|
||||
* R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
|
||||
*/
|
||||
|
||||
__asm__(
|
||||
" .macro\tirq_enable_hazard \n\t"
|
||||
" .endm \n\t"
|
||||
" \n\t"
|
||||
" .macro\tirq_disable_hazard \n\t"
|
||||
" .endm");
|
||||
|
||||
#define irq_enable_hazard() do { } while (0)
|
||||
#define irq_disable_hazard() do { } while (0)
|
||||
|
||||
#define back_to_back_c0_hazard() do { } while (0)
|
||||
" .macro irq_enable_hazard \n"
|
||||
" .endm \n"
|
||||
" \n"
|
||||
" .macro irq_disable_hazard \n"
|
||||
" .endm \n");
|
||||
|
||||
#else
|
||||
|
||||
@@ -209,29 +201,63 @@ __asm__(
|
||||
*/
|
||||
|
||||
__asm__(
|
||||
" # \n\t"
|
||||
" # There is a hazard but we do not care \n\t"
|
||||
" # \n\t"
|
||||
" .macro\tirq_enable_hazard \n\t"
|
||||
" .endm \n\t"
|
||||
" \n\t"
|
||||
" .macro\tirq_disable_hazard \n\t"
|
||||
" _ssnop; _ssnop; _ssnop \n\t"
|
||||
" .endm");
|
||||
|
||||
#define irq_enable_hazard() do { } while (0)
|
||||
#define irq_disable_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
"irq_disable_hazard")
|
||||
|
||||
#define back_to_back_c0_hazard() \
|
||||
__asm__ __volatile__( \
|
||||
" .set noreorder \n" \
|
||||
" nop; nop; nop \n" \
|
||||
" .set reorder \n")
|
||||
" # \n"
|
||||
" # There is a hazard but we do not care \n"
|
||||
" # \n"
|
||||
" .macro\tirq_enable_hazard \n"
|
||||
" .endm \n"
|
||||
" \n"
|
||||
" .macro\tirq_disable_hazard \n"
|
||||
" _ssnop \n"
|
||||
" _ssnop \n"
|
||||
" _ssnop \n"
|
||||
" .endm \n");
|
||||
|
||||
#endif
|
||||
|
||||
#define irq_enable_hazard() \
|
||||
__asm__ __volatile__("irq_enable_hazard")
|
||||
#define irq_disable_hazard() \
|
||||
__asm__ __volatile__("irq_disable_hazard")
|
||||
|
||||
|
||||
/*
|
||||
* Back-to-back hazards -
|
||||
*
|
||||
* What is needed to separate a move to cp0 from a subsequent read from the
|
||||
* same cp0 register?
|
||||
*/
|
||||
#ifdef CONFIG_CPU_MIPSR2
|
||||
|
||||
__asm__(" .macro back_to_back_c0_hazard \n"
|
||||
" _ehb \n"
|
||||
" .endm \n");
|
||||
|
||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \
|
||||
defined(CONFIG_CPU_SB1)
|
||||
|
||||
__asm__(" .macro back_to_back_c0_hazard \n"
|
||||
" .endm \n");
|
||||
|
||||
#else
|
||||
|
||||
__asm__(" .macro back_to_back_c0_hazard \n"
|
||||
" .set noreorder \n"
|
||||
" _ssnop \n"
|
||||
" _ssnop \n"
|
||||
" _ssnop \n"
|
||||
" .set reorder \n"
|
||||
" .endm");
|
||||
|
||||
#endif
|
||||
|
||||
#define back_to_back_c0_hazard() \
|
||||
__asm__ __volatile__("back_to_back_c0_hazard")
|
||||
|
||||
|
||||
/*
|
||||
* Instruction execution hazard
|
||||
*/
|
||||
#ifdef CONFIG_CPU_MIPSR2
|
||||
/*
|
||||
* gcc has a tradition of misscompiling the previous construct using the
|
||||
|
||||
+15
-3
@@ -4,7 +4,7 @@
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1994, 1995 Waldorf GmbH
|
||||
* Copyright (C) 1994 - 2000 Ralf Baechle
|
||||
* Copyright (C) 1994 - 2000, 06 Ralf Baechle
|
||||
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
||||
* Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved.
|
||||
* Author: Maciej W. Rozycki <macro@mips.com>
|
||||
@@ -103,8 +103,20 @@
|
||||
*/
|
||||
extern const unsigned long mips_io_port_base;
|
||||
|
||||
#define set_io_port_base(base) \
|
||||
do { * (unsigned long *) &mips_io_port_base = (base); } while (0)
|
||||
/*
|
||||
* Gcc will generate code to load the value of mips_io_port_base after each
|
||||
* function call which may be fairly wasteful in some cases. So we don't
|
||||
* play quite by the book. We tell gcc mips_io_port_base is a long variable
|
||||
* which solves the code generation issue. Now we need to violate the
|
||||
* aliasing rules a little to make initialization possible and finally we
|
||||
* will need the barrier() to fight side effects of the aliasing chat.
|
||||
* This trickery will eventually collapse under gcc's optimizer. Oh well.
|
||||
*/
|
||||
static inline void set_io_port_base(unsigned long base)
|
||||
{
|
||||
* (unsigned long *) &mips_io_port_base = base;
|
||||
barrier();
|
||||
}
|
||||
|
||||
/*
|
||||
* Thanks to James van Artsdalen for a better timing-fix than
|
||||
|
||||
@@ -257,7 +257,8 @@ static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \
|
||||
\
|
||||
static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \
|
||||
{ \
|
||||
unsigned long start = page; \
|
||||
unsigned long indexmask = current_cpu_data.desc.waysize - 1; \
|
||||
unsigned long start = INDEX_BASE + (page & indexmask); \
|
||||
unsigned long end = start + PAGE_SIZE; \
|
||||
unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \
|
||||
unsigned long ws_end = current_cpu_data.desc.ways << \
|
||||
|
||||
@@ -45,8 +45,8 @@ extern unsigned int soc_type;
|
||||
extern unsigned int periph_rev;
|
||||
extern unsigned int zbbus_mhz;
|
||||
|
||||
extern void sb1250_hpt_setup(void);
|
||||
extern void sb1250_time_init(void);
|
||||
extern unsigned long sb1250_gettimeoffset(void);
|
||||
extern void sb1250_mask_irq(int cpu, int irq);
|
||||
extern void sb1250_unmask_irq(int cpu, int irq);
|
||||
extern void sb1250_smp_finish(void);
|
||||
|
||||
@@ -359,14 +359,15 @@
|
||||
*/
|
||||
|
||||
#define V_SCD_TIMER_FREQ 1000000
|
||||
#define V_SCD_TIMER_WIDTH 23
|
||||
|
||||
#define S_SCD_TIMER_INIT 0
|
||||
#define M_SCD_TIMER_INIT _SB_MAKEMASK(20,S_SCD_TIMER_INIT)
|
||||
#define M_SCD_TIMER_INIT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_INIT)
|
||||
#define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_INIT)
|
||||
#define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT)
|
||||
|
||||
#define S_SCD_TIMER_CNT 0
|
||||
#define M_SCD_TIMER_CNT _SB_MAKEMASK(20,S_SCD_TIMER_CNT)
|
||||
#define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_CNT)
|
||||
#define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_CNT)
|
||||
#define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x,S_SCD_TIMER_CNT,M_SCD_TIMER_CNT)
|
||||
|
||||
|
||||
@@ -1365,6 +1365,7 @@
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
|
||||
#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
|
||||
|
||||
+8
-1
@@ -110,8 +110,15 @@ enum {
|
||||
enum {
|
||||
AX25_PROTO_STD_SIMPLEX,
|
||||
AX25_PROTO_STD_DUPLEX,
|
||||
#ifdef CONFIG_AX25_DAMA_SLAVE
|
||||
AX25_PROTO_DAMA_SLAVE,
|
||||
AX25_PROTO_DAMA_MASTER
|
||||
#ifdef CONFIG_AX25_DAMA_MASTER
|
||||
AX25_PROTO_DAMA_MASTER,
|
||||
#define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER
|
||||
#endif
|
||||
#endif
|
||||
__AX25_PROTO_MAX,
|
||||
AX25_PROTO_MAX = __AX25_PROTO_MAX -1
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
+1
-1
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
|
||||
rc = __condition; \
|
||||
if (!rc) { \
|
||||
*(__timeo) = schedule_timeout(*(__timeo)); \
|
||||
rc = __condition; \
|
||||
} \
|
||||
lock_sock(__sk); \
|
||||
rc = __condition; \
|
||||
rc; \
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user