From: "Wang, Shane" <shane.wang@intel.com>
To: Ingo Molnar <mingo@elte.hu>,
"Cihula, Joseph" <joseph.cihula@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arjan@linux.intel.com" <arjan@linux.intel.com>,
"andi@firstfloor.org" <andi@firstfloor.org>,
"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: [RFC v6][PATCH 2/4] intel_txt: Intel(R) TXT reboot/halt shutdown support
Date: Thu, 20 Aug 2009 17:33:50 +0800 [thread overview]
Message-ID: <037F493892196B458CD3E193E8EBAD4F01EC3AB3B2@pdsmsx502.ccr.corp.intel.com> (raw)
In-Reply-To: <20090817155348.GA2254@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
Hi Ingo & hpa,
I have made some change on the previous tboot patch to fix the build errors.
Please comment.
Thanks.
Shane
Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
>>> + tboot_create_trampoline();
>>> +
>>> /* Do the rest non-__init'ed, we're now alive */
>>> rest_init();
>>> }
>>
>> hm, this breaks the kernel build on every non-x86 architecture -
>> none of which has asm/tboot.h.
>
> also, tboot modifies kernel/cpu.c (and that too breaks the build) -
> why? I've excluded x86/txt from tip:master for now.
>
> Ingo
[-- Attachment #2: tboot_fix.patch --]
[-- Type: application/octet-stream, Size: 2319 bytes --]
diff -r 04f249f00303 drivers/acpi/acpica/hwsleep.c
--- a/drivers/acpi/acpica/hwsleep.c Tue Aug 18 12:06:57 2009 -0700
+++ b/drivers/acpi/acpica/hwsleep.c Wed Aug 19 15:23:44 2009 -0700
@@ -45,7 +45,12 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "actables.h"
+
+#ifdef CONFIG_X86
#include <asm/tboot.h>
+#else
+#define tboot_sleep(sleep_state, pm1a_control, pm1b_control) do { } while (0)
+#endif
#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME("hwsleep")
diff -r 04f249f00303 drivers/pci/dmar.c
--- a/drivers/pci/dmar.c Tue Aug 18 12:06:57 2009 -0700
+++ b/drivers/pci/dmar.c Wed Aug 19 15:23:44 2009 -0700
@@ -33,7 +33,12 @@
#include <linux/timer.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
+
+#ifdef CONFIG_X86
#include <asm/tboot.h>
+#else
+#define tboot_get_dmar_table(x) (x)
+#endif
#undef PREFIX
#define PREFIX "DMAR:"
diff -r 04f249f00303 drivers/pci/intel-iommu.c
--- a/drivers/pci/intel-iommu.c Tue Aug 18 12:06:57 2009 -0700
+++ b/drivers/pci/intel-iommu.c Wed Aug 19 15:23:44 2009 -0700
@@ -38,9 +38,14 @@
#include <linux/intel-iommu.h>
#include <linux/sysdev.h>
#include <asm/cacheflush.h>
-#include <asm/tboot.h>
#include <asm/iommu.h>
#include "pci.h"
+
+#ifdef CONFIG_X86
+#include <asm/tboot.h>
+#else
+#define tboot_force_iommu() 0
+#endif
#define ROOT_SIZE VTD_PAGE_SIZE
#define CONTEXT_SIZE VTD_PAGE_SIZE
diff -r 04f249f00303 init/main.c
--- a/init/main.c Tue Aug 18 12:06:57 2009 -0700
+++ b/init/main.c Wed Aug 19 15:23:44 2009 -0700
@@ -73,13 +73,19 @@
#include <asm/io.h>
#include <asm/bugs.h>
#include <asm/setup.h>
-#include <asm/tboot.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/smp.h>
#endif
+
+#ifdef CONFIG_X86
+#include <asm/tboot.h>
+#else
+#define tboot_create_trampoline() do { } while (0)
+#endif
+
static int kernel_init(void *);
diff -r 04f249f00303 kernel/cpu.c
--- a/kernel/cpu.c Tue Aug 18 12:06:57 2009 -0700
+++ b/kernel/cpu.c Wed Aug 19 15:23:44 2009 -0700
@@ -14,7 +14,12 @@
#include <linux/kthread.h>
#include <linux/stop_machine.h>
#include <linux/mutex.h>
+
+#ifdef CONFIG_X86
#include <asm/tboot.h>
+#else
+#define tboot_wait_for_aps(x) 0
+#endif
#ifdef CONFIG_SMP
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
next prev parent reply other threads:[~2009-08-20 9:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 2:31 Joseph Cihula
2009-08-17 15:40 ` Ingo Molnar
2009-08-17 15:53 ` Ingo Molnar
2009-08-20 9:33 ` Wang, Shane [this message]
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
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=037F493892196B458CD3E193E8EBAD4F01EC3AB3B2@pdsmsx502.ccr.corp.intel.com \
--to=shane.wang@intel.com \
--cc=andi@firstfloor.org \
--cc=arjan@linux.intel.com \
--cc=chrisw@sous-sol.org \
--cc=gang.wei@intel.com \
--cc=hpa@zytor.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 \
/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
all inboxes | Powered by JetHome®