ia64/xen-unstable

changeset 4780:b2186544c8d4

bitkeeper revision 1.1389.5.22 (427b29c5KNOxlBYIMC4Z37mPKVY6HA)

More acpi cleanups. Fix 'acpi=ht'.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 06 08:24:37 2005 +0000 (2005-05-06)
parents 49599761f3ce
children ea463ddea885
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile	Thu May 05 17:58:59 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile	Fri May 06 08:24:37 2005 +0000
     1.3 @@ -7,3 +7,7 @@ c-link                                  
     1.4  $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)):
     1.5  	@ln -fsn $(srctree)/arch/i386/kernel/acpi/$(notdir $@) $@
     1.6  
     1.7 +obj-y	+= $(c-obj-y) $(s-obj-y)
     1.8 +
     1.9 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
    1.10 +clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c	Thu May 05 17:58:59 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c	Fri May 06 08:24:37 2005 +0000
     2.3 @@ -672,10 +672,6 @@ acpi_parse_madt_lapic_entries(void)
     2.4  {
     2.5  	int count;
     2.6  
     2.7 -#ifdef CONFIG_XEN
     2.8 -	return 0;
     2.9 -#endif
    2.10 -
    2.11  	/* 
    2.12  	 * Note that the LAPIC address is obtained from the MADT (32-bit value)
    2.13  	 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
    2.14 @@ -871,10 +867,8 @@ acpi_boot_table_init(void)
    2.15  	}
    2.16  
    2.17  #ifdef __i386__
    2.18 -#ifndef CONFIG_XEN
    2.19  	check_acpi_pci();
    2.20  #endif
    2.21 -#endif
    2.22  
    2.23  	acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
    2.24  
     3.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c	Thu May 05 17:58:59 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c	Fri May 06 08:24:37 2005 +0000
     3.3 @@ -109,7 +109,7 @@ static int MP_valid_apicid(int apicid, i
     3.4  {
     3.5  	return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf;
     3.6  }
     3.7 -#else
     3.8 +#elif !defined(CONFIG_XEN)
     3.9  static int MP_valid_apicid(int apicid, int version)
    3.10  {
    3.11  	if (version >= 0x14)
    3.12 @@ -119,6 +119,7 @@ static int MP_valid_apicid(int apicid, i
    3.13  }
    3.14  #endif
    3.15  
    3.16 +#ifndef CONFIG_XEN
    3.17  void __init MP_processor_info (struct mpc_config_processor *m)
    3.18  {
    3.19   	int ver, apicid;
    3.20 @@ -217,6 +218,12 @@ void __init MP_processor_info (struct mp
    3.21  	apic_version[m->mpc_apicid] = ver;
    3.22  	bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
    3.23  }
    3.24 +#else
    3.25 +void __init MP_processor_info (struct mpc_config_processor *m)
    3.26 +{
    3.27 +	num_processors++;
    3.28 +}
    3.29 +#endif /* CONFIG_XEN */
    3.30  
    3.31  static void __init MP_bus_info (struct mpc_config_bus *m)
    3.32  {
    3.33 @@ -816,12 +823,14 @@ void __init find_smp_config (void)
    3.34  void __init mp_register_lapic_address (
    3.35  	u64			address)
    3.36  {
    3.37 +#ifndef CONFIG_XEN
    3.38  	mp_lapic_addr = (unsigned long) address;
    3.39  
    3.40  	if (boot_cpu_physical_apicid == -1U)
    3.41  		boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
    3.42  
    3.43  	Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
    3.44 +#endif
    3.45  }
    3.46  
    3.47  
    3.48 @@ -841,6 +850,7 @@ void __init mp_register_lapic (
    3.49  	if (id == boot_cpu_physical_apicid)
    3.50  		boot_cpu = 1;
    3.51  
    3.52 +#ifndef CONFIG_XEN
    3.53  	processor.mpc_type = MP_PROCESSOR;
    3.54  	processor.mpc_apicid = id;
    3.55  	processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR));
    3.56 @@ -851,6 +861,7 @@ void __init mp_register_lapic (
    3.57  	processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
    3.58  	processor.mpc_reserved[0] = 0;
    3.59  	processor.mpc_reserved[1] = 0;
    3.60 +#endif
    3.61  
    3.62  	MP_processor_info(&processor);
    3.63  }
     4.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Thu May 05 17:58:59 2005 +0000
     4.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Fri May 06 08:24:37 2005 +0000
     4.3 @@ -1567,6 +1567,10 @@ void __init setup_arch(char **cmdline_p)
     4.4  	if (efi_enabled)
     4.5  		efi_map_memmap();
     4.6  
     4.7 +	op.cmd             = PHYSDEVOP_SET_IOPL;
     4.8 +	op.u.set_iopl.iopl = current->thread.io_pl = 1;
     4.9 +	HYPERVISOR_physdev_op(&op);
    4.10 +
    4.11  	/*
    4.12  	 * Parse the ACPI tables for possible boot-time SMP configuration.
    4.13  	 */
    4.14 @@ -1584,10 +1588,6 @@ void __init setup_arch(char **cmdline_p)
    4.15  
    4.16  	register_memory();
    4.17  
    4.18 -	op.cmd             = PHYSDEVOP_SET_IOPL;
    4.19 -	op.u.set_iopl.iopl = current->thread.io_pl = 1;
    4.20 -	HYPERVISOR_physdev_op(&op);
    4.21 -
    4.22  	if (xen_start_info.flags & SIF_INITDOMAIN) {
    4.23  		if (!(xen_start_info.flags & SIF_PRIVILEGED))
    4.24  			panic("Xen granted us console access "