Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136414
b: refs/heads/master
c: f118263
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Jan 15, 2009
1 parent 4a516bb commit 84aee38
Show file tree
Hide file tree
Showing 36 changed files with 366 additions and 323 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b665967979d0e990f196e7c4ba88e17c9ed9b781
refs/heads/master: f11826385b63566d98c02d35f592232ee77cd791
14 changes: 10 additions & 4 deletions trunk/arch/x86/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

/*
* Copyright 1992, Linus Torvalds.
*
* Note: inlines with more than a single statement should be marked
* __always_inline to avoid problems with older gcc's inlining heuristics.
*/

#ifndef _LINUX_BITOPS_H
Expand Down Expand Up @@ -53,7 +56,8 @@
* Note that @nr may be almost arbitrarily large; this function is not
* restricted to acting on a single-word quantity.
*/
static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
static __always_inline void
set_bit(unsigned int nr, volatile unsigned long *addr)
{
if (IS_IMMEDIATE(nr)) {
asm volatile(LOCK_PREFIX "orb %1,%0"
Expand Down Expand Up @@ -90,7 +94,8 @@ static inline void __set_bit(int nr, volatile unsigned long *addr)
* you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
* in order to ensure changes are visible on other processors.
*/
static inline void clear_bit(int nr, volatile unsigned long *addr)
static __always_inline void
clear_bit(int nr, volatile unsigned long *addr)
{
if (IS_IMMEDIATE(nr)) {
asm volatile(LOCK_PREFIX "andb %1,%0"
Expand Down Expand Up @@ -204,7 +209,8 @@ static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
*
* This is the same as test_and_set_bit on x86.
*/
static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr)
static __always_inline int
test_and_set_bit_lock(int nr, volatile unsigned long *addr)
{
return test_and_set_bit(nr, addr);
}
Expand Down Expand Up @@ -300,7 +306,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
return oldbit;
}

static inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
{
return ((1UL << (nr % BITS_PER_LONG)) &
(((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
Expand Down
21 changes: 0 additions & 21 deletions trunk/arch/x86/include/asm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
#include <linux/nodemask.h>
#include <linux/percpu.h>

#ifdef CONFIG_SMP

extern void prefill_possible_map(void);

#else /* CONFIG_SMP */

static inline void prefill_possible_map(void) {}

#define cpu_physical_id(cpu) boot_cpu_physical_apicid
#define safe_smp_processor_id() 0
#define stack_smp_processor_id() 0

#endif /* CONFIG_SMP */

struct x86_cpu {
struct cpu cpu;
};
Expand All @@ -31,11 +17,4 @@ extern void arch_unregister_cpu(int);
#endif

DECLARE_PER_CPU(int, cpu_state);

#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
extern unsigned char boot_cpu_id;
#else
#define boot_cpu_id 0
#endif

#endif /* _ASM_X86_CPU_H */
28 changes: 0 additions & 28 deletions trunk/arch/x86/include/asm/cpumask.h

This file was deleted.

3 changes: 0 additions & 3 deletions trunk/arch/x86/include/asm/hardirq_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ typedef struct {

DECLARE_PER_CPU(irq_cpustat_t, irq_stat);

/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
#define MAX_HARDIRQS_PER_CPU NR_VECTORS

#define __ARCH_IRQ_STAT
#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)

Expand Down
26 changes: 24 additions & 2 deletions trunk/arch/x86/include/asm/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,38 @@ struct IR_IO_APIC_route_entry {
extern int nr_ioapics;
extern int nr_ioapic_registers[MAX_IO_APICS];

/*
* MP-BIOS irq configuration table structures:
*/

#define MP_MAX_IOAPIC_PIN 127

struct mp_config_ioapic {
unsigned long mp_apicaddr;
unsigned int mp_apicid;
unsigned char mp_type;
unsigned char mp_apicver;
unsigned char mp_flags;
};

struct mp_config_intsrc {
unsigned int mp_dstapic;
unsigned char mp_type;
unsigned char mp_irqtype;
unsigned short mp_irqflag;
unsigned char mp_srcbus;
unsigned char mp_srcbusirq;
unsigned char mp_dstirq;
};

/* I/O APIC entries */
extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS];
extern struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];

/* # of MP IRQ source entries */
extern int mp_irq_entries;

/* MP IRQ source entries */
extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES];
extern struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];

/* non-0 if default (table-less) MP configuration */
extern int mpc_default_type;
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/include/asm/mach-default/mach_wakecpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
{
}

#ifdef CONFIG_SMP
extern void __inquire_remote_apic(int apicid);
#else /* CONFIG_SMP */
static inline void __inquire_remote_apic(int apicid)
{
}
#endif /* CONFIG_SMP */

static inline void inquire_remote_apic(int apicid)
{
Expand Down
23 changes: 11 additions & 12 deletions trunk/arch/x86/include/asm/mpspec_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@
# endif
#endif

/* Intel MP Floating Pointer Structure */
struct mpf_intel {
char signature[4]; /* "_MP_" */
unsigned int physptr; /* Configuration table address */
unsigned char length; /* Our length (paragraphs) */
unsigned char specification; /* Specification version */
unsigned char checksum; /* Checksum (makes sum 0) */
unsigned char feature1; /* Standard or configuration ? */
unsigned char feature2; /* Bit7 set for IMCR|PIC */
unsigned char feature3; /* Unused (0) */
unsigned char feature4; /* Unused (0) */
unsigned char feature5; /* Unused (0) */
struct intel_mp_floating {
char mpf_signature[4]; /* "_MP_" */
unsigned int mpf_physptr; /* Configuration table address */
unsigned char mpf_length; /* Our length (paragraphs) */
unsigned char mpf_specification;/* Specification version */
unsigned char mpf_checksum; /* Checksum (makes sum 0) */
unsigned char mpf_feature1; /* Standard or configuration ? */
unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
unsigned char mpf_feature3; /* Unused (0) */
unsigned char mpf_feature4; /* Unused (0) */
unsigned char mpf_feature5; /* Unused (0) */
};

#define MPC_SIGNATURE "PCMP"
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/include/asm/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ struct mtrr_gentry {
#endif /* !__i386__ */

struct mtrr_var_range {
u32 base_lo;
u32 base_hi;
u32 mask_lo;
u32 mask_hi;
__u32 base_lo;
__u32 base_hi;
__u32 mask_lo;
__u32 mask_hi;
};

/* In the Intel processor's MTRR interface, the MTRR type is always held in
an 8 bit field: */
typedef u8 mtrr_type;
typedef __u8 mtrr_type;

#define MTRR_NUM_FIXED_RANGES 88
#define MTRR_MAX_VAR_RANGES 256
Expand Down
41 changes: 40 additions & 1 deletion trunk/arch/x86/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,30 @@
#endif
#include <asm/pda.h>
#include <asm/thread_info.h>
#include <asm/cpumask.h>

#ifdef CONFIG_X86_64

extern cpumask_var_t cpu_callin_mask;
extern cpumask_var_t cpu_callout_mask;
extern cpumask_var_t cpu_initialized_mask;
extern cpumask_var_t cpu_sibling_setup_mask;

#else /* CONFIG_X86_32 */

extern cpumask_t cpu_callin_map;
extern cpumask_t cpu_callout_map;
extern cpumask_t cpu_initialized;
extern cpumask_t cpu_sibling_setup_map;

#define cpu_callin_mask ((struct cpumask *)&cpu_callin_map)
#define cpu_callout_mask ((struct cpumask *)&cpu_callout_map)
#define cpu_initialized_mask ((struct cpumask *)&cpu_initialized)
#define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map)

#endif /* CONFIG_X86_32 */

extern void (*mtrr_hook)(void);
extern void zap_low_mappings(void);

extern int __cpuinit get_local_pda(int cpu);

Expand Down Expand Up @@ -144,6 +167,8 @@ void play_dead_common(void);
void native_send_call_func_ipi(const struct cpumask *mask);
void native_send_call_func_single_ipi(int cpu);

extern void prefill_possible_map(void);

void smp_store_cpu_info(int id);
#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)

Expand All @@ -152,6 +177,10 @@ static inline int num_booting_cpus(void)
{
return cpumask_weight(cpu_callout_mask);
}
#else
static inline void prefill_possible_map(void)
{
}
#endif /* CONFIG_SMP */

extern unsigned disabled_cpus __cpuinitdata;
Expand All @@ -176,6 +205,10 @@ extern int safe_smp_processor_id(void);
})
#define safe_smp_processor_id() smp_processor_id()

#else /* !CONFIG_X86_32_SMP && !CONFIG_X86_64_SMP */
#define cpu_physical_id(cpu) boot_cpu_physical_apicid
#define safe_smp_processor_id() 0
#define stack_smp_processor_id() 0
#endif

#ifdef CONFIG_X86_LOCAL_APIC
Expand Down Expand Up @@ -218,5 +251,11 @@ static inline int hard_smp_processor_id(void)

#endif /* CONFIG_X86_LOCAL_APIC */

#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
extern unsigned char boot_cpu_id;
#else
#define boot_cpu_id 0
#endif

#endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_SMP_H */
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,4 @@ static inline void flush_tlb_kernel_range(unsigned long start,
flush_tlb_all();
}

extern void zap_low_mappings(void);

#endif /* _ASM_X86_TLBFLUSH_H */
Loading

0 comments on commit 84aee38

Please sign in to comment.