arch/x86/include/asm/mpspec.h
author Florian Westphal <fw@strlen.de>
Sun, 11 Jan 2009 20:20:11 +0100
changeset 0 aa628870c1d3
child 2 d1f6d8b6f81c
permissions -rw-r--r--
Port of Linux 2.6.28 for use with network simulation cradle.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     1
#ifndef _ASM_X86_MPSPEC_H
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     2
#define _ASM_X86_MPSPEC_H
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     3
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     4
#include <linux/init.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     5
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     6
#include <asm/mpspec_def.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     7
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     8
extern int apic_version[MAX_APICS];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     9
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    10
#ifdef CONFIG_X86_32
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    11
#include <mach_mpspec.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    12
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    13
extern unsigned int def_to_bigsmp;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    14
extern u8 apicid_2_node[];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    15
extern int pic_mode;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    16
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    17
#ifdef CONFIG_X86_NUMAQ
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    18
extern int mp_bus_id_to_node[MAX_MP_BUSSES];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    19
extern int mp_bus_id_to_local[MAX_MP_BUSSES];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    20
extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    21
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    22
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    23
#define MAX_APICID 256
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    24
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    25
#else
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    26
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    27
#define MAX_MP_BUSSES 256
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    28
/* Each PCI slot may be a combo card with its own bus.  4 IRQ pins per slot. */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    29
#define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    30
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    31
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    32
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    33
extern void early_find_smp_config(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    34
extern void early_get_smp_config(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    35
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    36
#if defined(CONFIG_MCA) || defined(CONFIG_EISA)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    37
extern int mp_bus_id_to_type[MAX_MP_BUSSES];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    38
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    39
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    40
extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    41
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    42
extern unsigned int boot_cpu_physical_apicid;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    43
extern unsigned int max_physical_apicid;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    44
extern int smp_found_config;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    45
extern int mpc_default_type;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    46
extern unsigned long mp_lapic_addr;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    47
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    48
extern void find_smp_config(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    49
extern void get_smp_config(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    50
#ifdef CONFIG_X86_MPPARSE
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    51
extern void early_reserve_e820_mpc_new(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    52
#else
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    53
static inline void early_reserve_e820_mpc_new(void) { }
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    54
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    55
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    56
void __cpuinit generic_processor_info(int apicid, int version);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    57
#ifdef CONFIG_ACPI
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    58
extern void mp_register_ioapic(int id, u32 address, u32 gsi_base);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    59
extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    60
				   u32 gsi);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    61
extern void mp_config_acpi_legacy_irqs(void);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    62
extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    63
#ifdef CONFIG_X86_IO_APIC
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    64
extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    65
				u32 gsi, int triggering, int polarity);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    66
#else
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    67
static inline int
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    68
mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    69
		   u32 gsi, int triggering, int polarity)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    70
{
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    71
	return 0;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    72
}
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    73
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    74
#endif /* CONFIG_ACPI */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    75
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    76
#define PHYSID_ARRAY_SIZE	BITS_TO_LONGS(MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    77
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    78
struct physid_mask {
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    79
	unsigned long mask[PHYSID_ARRAY_SIZE];
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    80
};
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    81
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    82
typedef struct physid_mask physid_mask_t;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    83
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    84
#define physid_set(physid, map)			set_bit(physid, (map).mask)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    85
#define physid_clear(physid, map)		clear_bit(physid, (map).mask)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    86
#define physid_isset(physid, map)		test_bit(physid, (map).mask)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    87
#define physid_test_and_set(physid, map)			\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    88
	test_and_set_bit(physid, (map).mask)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    89
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    90
#define physids_and(dst, src1, src2)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    91
	bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    92
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    93
#define physids_or(dst, src1, src2)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    94
	bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    95
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    96
#define physids_clear(map)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    97
	bitmap_zero((map).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    98
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    99
#define physids_complement(dst, src)				\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   100
	bitmap_complement((dst).mask, (src).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   101
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   102
#define physids_empty(map)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   103
	bitmap_empty((map).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   104
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   105
#define physids_equal(map1, map2)				\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   106
	bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   107
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   108
#define physids_weight(map)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   109
	bitmap_weight((map).mask, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   110
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   111
#define physids_shift_right(d, s, n)				\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   112
	bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   113
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   114
#define physids_shift_left(d, s, n)				\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   115
	bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   116
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   117
#define physids_coerce(map)			((map).mask[0])
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   118
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   119
#define physids_promote(physids)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   120
	({								\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   121
		physid_mask_t __physid_mask = PHYSID_MASK_NONE;		\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   122
		__physid_mask.mask[0] = physids;			\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   123
		__physid_mask;						\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   124
	})
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   125
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   126
/* Note: will create very large stack frames if physid_mask_t is big */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   127
#define physid_mask_of_physid(physid)					\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   128
	({								\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   129
		physid_mask_t __physid_mask = PHYSID_MASK_NONE;		\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   130
		physid_set(physid, __physid_mask);			\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   131
		__physid_mask;						\
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   132
	})
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   133
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   134
static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   135
{
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   136
	physids_clear(*map);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   137
	physid_set(physid, *map);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   138
}
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   139
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   140
#define PHYSID_MASK_ALL		{ {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   141
#define PHYSID_MASK_NONE	{ {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   142
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   143
extern physid_mask_t phys_cpu_present_map;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   144
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   145
#endif /* _ASM_X86_MPSPEC_H */