71a19bdc64
cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
/*
|
|
* $FreeBSD$
|
|
*/
|
|
#ifndef _MACHINE_SMP_H_
|
|
#define _MACHINE_SMP_H_
|
|
|
|
#ifdef _KERNEL
|
|
|
|
#define IPI_AST ia64_ipi_ast
|
|
#define IPI_PREEMPT ia64_ipi_preempt
|
|
#define IPI_RENDEZVOUS ia64_ipi_rndzvs
|
|
#define IPI_STOP ia64_ipi_stop
|
|
#define IPI_STOP_HARD ia64_ipi_nmi
|
|
|
|
#ifndef LOCORE
|
|
|
|
#include <sys/_cpuset.h>
|
|
|
|
struct pcpu;
|
|
|
|
struct ia64_ap_state {
|
|
uint64_t as_trace;
|
|
uint64_t as_pgtbl_pte;
|
|
uint64_t as_pgtbl_itir;
|
|
uint64_t as_text_va;
|
|
uint64_t as_text_pte;
|
|
uint64_t as_text_itir;
|
|
uint64_t as_data_va;
|
|
uint64_t as_data_pte;
|
|
uint64_t as_data_itir;
|
|
void *as_kstack;
|
|
void *as_kstack_top;
|
|
struct pcpu *as_pcpu;
|
|
volatile int as_delay;
|
|
volatile u_int as_awake;
|
|
volatile u_int as_spin;
|
|
};
|
|
|
|
extern int ia64_ipi_ast;
|
|
extern int ia64_ipi_highfp;
|
|
extern int ia64_ipi_nmi;
|
|
extern int ia64_ipi_preempt;
|
|
extern int ia64_ipi_rndzvs;
|
|
extern int ia64_ipi_stop;
|
|
extern int ia64_ipi_wakeup;
|
|
|
|
void ipi_all_but_self(int ipi);
|
|
void ipi_cpu(int cpu, u_int ipi);
|
|
void ipi_selected(cpuset_t cpus, int ipi);
|
|
void ipi_send(struct pcpu *, int ipi);
|
|
|
|
#endif /* !LOCORE */
|
|
#endif /* _KERNEL */
|
|
#endif /* !_MACHINE_SMP_H */
|