direct-io.hg
changeset 9785:8e0b9f31cf3f
[IA64] MAX_VIRT_CPUS and NR_CPUS
Increase MAX_VIRT_CPUS and NR_CPUS to 64.
Check maxcpus < MAX_VIRT_CPUS.
Check size of shared_info (<= PAGE_SIZE).
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
Increase MAX_VIRT_CPUS and NR_CPUS to 64.
Check maxcpus < MAX_VIRT_CPUS.
Check size of shared_info (<= PAGE_SIZE).
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author | awilliam@xenbuild.aw |
---|---|
date | Fri Apr 07 11:40:33 2006 -0600 (2006-04-07) |
parents | 71e0c2ed4447 |
children | d16c16f64060 |
files | xen/arch/ia64/asm-offsets.c xen/arch/ia64/xen/xensetup.c xen/include/asm-ia64/config.h xen/include/public/arch-ia64.h |
line diff
1.1 --- a/xen/arch/ia64/asm-offsets.c Fri Apr 07 11:35:29 2006 -0600 1.2 +++ b/xen/arch/ia64/asm-offsets.c Fri Apr 07 11:40:33 2006 -0600 1.3 @@ -30,6 +30,7 @@ void foo(void) 1.4 DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack)); 1.5 DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64)); 1.6 DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info)); 1.7 + DEFINE(SHARED_INFO_SIZE, sizeof (struct shared_info)); 1.8 1.9 BLANK(); 1.10 #ifdef VTI_DEBUG
2.1 --- a/xen/arch/ia64/xen/xensetup.c Fri Apr 07 11:35:29 2006 -0600 2.2 +++ b/xen/arch/ia64/xen/xensetup.c Fri Apr 07 11:40:33 2006 -0600 2.3 @@ -24,6 +24,12 @@ 2.4 #include <asm/vmx.h> 2.5 #include <linux/efi.h> 2.6 2.7 +/* Be sure the struct shared_info fits on a page because it is mapped in 2.8 + domain. */ 2.9 +#if SHARED_INFO_SIZE > PAGE_SIZE 2.10 + #error "struct shared_info does not not fit in PAGE_SIZE" 2.11 +#endif 2.12 + 2.13 unsigned long xenheap_phys_end; 2.14 2.15 char saved_command_line[COMMAND_LINE_SIZE]; 2.16 @@ -321,7 +327,13 @@ printk("About to call timer_init()\n"); 2.17 //boot_cpu_data.x86_num_cores = 1; 2.18 } 2.19 2.20 + /* A vcpu is created for the idle domain on every physical cpu. 2.21 + Limit the number of cpus to the maximum number of vcpus. */ 2.22 + if (max_cpus > MAX_VIRT_CPUS) 2.23 + max_cpus = MAX_VIRT_CPUS; 2.24 + 2.25 smp_prepare_cpus(max_cpus); 2.26 + 2.27 /* We aren't hotplug-capable yet. */ 2.28 for_each_cpu ( i ) 2.29 cpu_set(i, cpu_present_map);
3.1 --- a/xen/include/asm-ia64/config.h Fri Apr 07 11:35:29 2006 -0600 3.2 +++ b/xen/include/asm-ia64/config.h Fri Apr 07 11:40:33 2006 -0600 3.3 @@ -25,17 +25,12 @@ 3.4 3.5 #ifdef CONFIG_XEN_SMP 3.6 #define CONFIG_SMP 1 3.7 -#define NR_CPUS 8 3.8 -#define CONFIG_NR_CPUS 8 3.9 +#define NR_CPUS 64 3.10 #else 3.11 #undef CONFIG_SMP 3.12 #define NR_CPUS 1 3.13 -#define CONFIG_NR_CPUS 1 3.14 #endif 3.15 -//#define NR_CPUS 16 3.16 -//#define CONFIG_NR_CPUS 16 3.17 -//leave SMP for a later time 3.18 -//#undef CONFIG_SMP 3.19 +#define CONFIG_NR_CPUS NR_CPUS 3.20 3.21 #define supervisor_mode_kernel (0) 3.22 3.23 @@ -121,9 +116,6 @@ extern char _end[]; /* standard ELF symb 3.24 #define CMPXCHG_BUGCHECK_DECL 3.25 3.26 // from include/asm-ia64/smp.h 3.27 -#ifdef CONFIG_SMP 3.28 -//#warning "Lots of things to fix to enable CONFIG_SMP!" 3.29 -#endif 3.30 #define get_cpu() smp_processor_id() 3.31 #define put_cpu() do {} while(0) 3.32 3.33 @@ -284,13 +276,6 @@ extern int ht_per_core; 3.34 #endif /* __ASSEMBLY__ */ 3.35 #endif /* __XEN_IA64_CONFIG_H__ */ 3.36 3.37 -// needed for include/xen/smp.h 3.38 -//#ifdef CONFIG_SMP 3.39 -//#define raw_smp_processor_id() current->processor 3.40 -//#else 3.41 -//#define raw_smp_processor_id() 0 3.42 -//#endif 3.43 - 3.44 #ifndef __ASSEMBLY__ 3.45 #include <linux/linkage.h> 3.46 #define FORCE_CRASH() asm("break.m 0;;");
4.1 --- a/xen/include/public/arch-ia64.h Fri Apr 07 11:35:29 2006 -0600 4.2 +++ b/xen/include/public/arch-ia64.h Fri Apr 07 11:40:33 2006 -0600 4.3 @@ -31,7 +31,7 @@ DEFINE_GUEST_HANDLE(void); 4.4 4.5 /* Maximum number of virtual CPUs in multi-processor guests. */ 4.6 /* WARNING: before changing this, check that shared_info fits on a page */ 4.7 -#define MAX_VIRT_CPUS 4 4.8 +#define MAX_VIRT_CPUS 64 4.9 4.10 #ifndef __ASSEMBLY__ 4.11