[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A8ED800.30901@zytor.com>
Date: Fri, 21 Aug 2009 10:23:12 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Shane Wang <shane.wang@...el.com>,
Andi Kleen <andi@...stfloor.org>,
"Cihula, Joseph" <joseph.cihula@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"chrisw@...s-sol.org" <chrisw@...s-sol.org>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"jbeulich@...ell.com" <jbeulich@...ell.com>,
"peterm@...hat.com" <peterm@...hat.com>,
"Wei, Gang" <gang.wei@...el.com>
Subject: Re: [PATCH] intel_txt: fix the build errors of intel_txt patch on
non-X86 platforms
On 08/21/2009 09:12 AM, Ingo Molnar wrote:
>
> * Shane Wang <shane.wang@...el.com> wrote:
>
>> Hi
>>
>> Forget the previous patch. I misundertood Andi's comments. It should be
>> this one. Please comment.
>>
>> Thanks.
>> Shane
>>
>>
>> ---
>> arch/x86/Kconfig | 4 +++
>> drivers/acpi/acpica/hwsleep.c | 2 -
>> drivers/pci/dmar.c | 2 -
>> drivers/pci/intel-iommu.c | 2 -
>> include/linux/tboot.h | 35 ++++++++++++++++++++++++++++++++
>> init/main.c | 2 -
>> kernel/cpu.c | 2 -
>> security/Kconfig | 2 -
>> 8 files changed, 45 insertions(+), 6 deletions(-)
>>
>> Signed-off-by: Shane Wang <shane.wang@...el.com>
>>
>>
>> diff -r e5406357eaf2 arch/x86/Kconfig
>> --- a/arch/x86/Kconfig Thu Aug 20 21:10:50 2009 -0700
>> +++ b/arch/x86/Kconfig Thu Aug 20 21:15:32 2009 -0700
>> @@ -179,6 +179,10 @@ config ARCH_SUPPORTS_OPTIMIZED_INLINING
>>
>> config ARCH_SUPPORTS_DEBUG_PAGEALLOC
>> def_bool y
>> +
>> +config ARCH_HAS_INTEL_TXT
>> + def_bool y
>> + depends on EXPERIMENTAL && DMAR && ACPI
>>
>> # Use the generic interrupt handling code in kernel/irq/:
>> config GENERIC_HARDIRQS
>> diff -r e5406357eaf2 drivers/acpi/acpica/hwsleep.c
>> --- a/drivers/acpi/acpica/hwsleep.c Thu Aug 20 21:10:50 2009 -0700
>> +++ b/drivers/acpi/acpica/hwsleep.c Thu Aug 20 21:15:32 2009 -0700
>> @@ -45,7 +45,7 @@
>> #include <acpi/acpi.h>
>> #include "accommon.h"
>> #include "actables.h"
>> -#include <asm/tboot.h>
>> +#include <linux/tboot.h>
>>
>> #define _COMPONENT ACPI_HARDWARE
>> ACPI_MODULE_NAME("hwsleep")
>> diff -r e5406357eaf2 drivers/pci/dmar.c
>> --- a/drivers/pci/dmar.c Thu Aug 20 21:10:50 2009 -0700
>> +++ b/drivers/pci/dmar.c Thu Aug 20 21:15:32 2009 -0700
>> @@ -33,7 +33,7 @@
>> #include <linux/timer.h>
>> #include <linux/irq.h>
>> #include <linux/interrupt.h>
>> -#include <asm/tboot.h>
>> +#include <linux/tboot.h>
>>
>> #undef PREFIX
>> #define PREFIX "DMAR:"
>> diff -r e5406357eaf2 drivers/pci/intel-iommu.c
>> --- a/drivers/pci/intel-iommu.c Thu Aug 20 21:10:50 2009 -0700
>> +++ b/drivers/pci/intel-iommu.c Thu Aug 20 21:15:32 2009 -0700
>> @@ -37,8 +37,8 @@
>> #include <linux/iommu.h>
>> #include <linux/intel-iommu.h>
>> #include <linux/sysdev.h>
>> +#include <linux/tboot.h>
>> #include <asm/cacheflush.h>
>> -#include <asm/tboot.h>
>> #include <asm/iommu.h>
>> #include "pci.h"
>>
>> diff -r e5406357eaf2 include/linux/tboot.h
>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
>> +++ b/include/linux/tboot.h Thu Aug 20 21:15:32 2009 -0700
>> @@ -0,0 +1,35 @@
>> +/*
>> + * Copyright (c) 2006-2009, Intel Corporation
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms and conditions of the GNU General Public License,
>> + * version 2, as published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope it will be useful, but WITHOUT
>> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
>> + * more details.
>> + *
>> + * You should have received a copy of the GNU General Public License along with
>> + * this program; if not, write to the Free Software Foundation, Inc.,
>> + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
>> + *
>> + */
>> +
>> +#ifndef _LINUX_TBOOT_H
>> +#define _LINUX_TBOOT_H
>> +
>> +#ifdef CONFIG_ARCH_HAS_INTEL_TXT
>> +#include <asm/tboot.h>
>> +#else
>> +
>> +#define tboot_sleep(sleep_state, pm1a_control, pm1b_control) \
>> + do { } while (0)
>> +#define tboot_get_dmar_table(dmar_tbl) (dmar_tbl)
>> +#define tboot_force_iommu() 0
>> +#define tboot_create_trampoline() do { } while (0)
>> +#define tboot_wait_for_aps(num_aps) 0
>> +
>> +#endif /* !CONFIG_ARCH_HAS_INTEL_TXT */
>
> If then these should be dummy inlines - but in any case, do you
> expect tboot to be used by non-x86 too?
>
It would have to be IA64 ... I can't ask Tony since he's out, but I
would assume it is x86-specific at this point.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists