From: "H. Peter Anvin" <hpa@zytor.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Shane Wang <shane.wang@intel.com>,
Andi Kleen <andi@firstfloor.org>,
"Cihula, Joseph" <joseph.cihula@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arjan@linux.intel.com" <arjan@linux.intel.com>,
"chrisw@sous-sol.org" <chrisw@sous-sol.org>,
"jmorris@namei.org" <jmorris@namei.org>,
"jbeulich@novell.com" <jbeulich@novell.com>,
"peterm@redhat.com" <peterm@redhat.com>,
"Wei, Gang" <gang.wei@intel.com>
Subject: Re: [PATCH] intel_txt: fix the build errors of intel_txt patch on non-X86 platforms
Date: Fri, 21 Aug 2009 10:23:12 -0700 [thread overview]
Message-ID: <4A8ED800.30901@zytor.com> (raw)
In-Reply-To: <20090821161204.GB17731@elte.hu>
On 08/21/2009 09:12 AM, Ingo Molnar wrote:
>
> * Shane Wang <shane.wang@intel.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@intel.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
next prev parent reply other threads:[~2009-08-21 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 2:31 [RFC v6][PATCH 2/4] intel_txt: Intel(R) TXT reboot/halt shutdown support Joseph Cihula
2009-08-17 15:40 ` Ingo Molnar
2009-08-17 15:53 ` Ingo Molnar
2009-08-20 9:33 ` Wang, Shane
2009-08-20 16:05 ` H. Peter Anvin
2009-08-20 16:10 ` Andi Kleen
2009-08-21 13:03 ` [PATCH] txt: fix the build errors on non-X86 platforms Shane Wang
2009-08-21 13:50 ` Ingo Molnar
2009-08-21 15:23 ` [PATCH] intel_txt: fix the build errors of intel_txt patch " Shane Wang
2009-08-21 16:12 ` Ingo Molnar
2009-08-21 17:23 ` H. Peter Anvin [this message]
2009-08-24 8:20 ` Wang, Shane
2009-08-24 8:48 ` Ingo Molnar
2009-08-26 6:51 ` Shane Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A8ED800.30901@zytor.com \
--to=hpa@zytor.com \
--cc=andi@firstfloor.org \
--cc=arjan@linux.intel.com \
--cc=chrisw@sous-sol.org \
--cc=gang.wei@intel.com \
--cc=jbeulich@novell.com \
--cc=jmorris@namei.org \
--cc=joseph.cihula@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterm@redhat.com \
--cc=shane.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox