mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH 3/3] mm: convert mm->cpu_vm_cpumask into cpumask_var_t
Date: Tue, 19 Apr 2011 09:19:37 +0900 (JST)	[thread overview]
Message-ID: <20110419091947.936D.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20110418211950.9365.A69D9226@jp.fujitsu.com>

> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> ---
>  Documentation/cachetlb.txt |    2 +-
>  include/linux/mm_types.h   |    9 ++++++---
>  include/linux/sched.h      |    1 +
>  init/main.c                |    2 ++
>  kernel/fork.c              |   37 ++++++++++++++++++++++++++++++++++---
>  mm/init-mm.c               |    1 -
>  6 files changed, 44 insertions(+), 8 deletions(-)
> 
> This patch don't touch x86/kerrnel/tboot.c. because it can't be compiled.

My bad. I confounded CONFIG_HAVE_INTEL_TXT with CONFIG_INTEL_TXT. Proper
fixing (and incremental) patch is here.



>From 0b443d8dbdf7ce97f92e6622840585ca41abca83 Mon Sep 17 00:00:00 2001
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Date: Tue, 19 Apr 2011 08:38:01 +0900
Subject: [PATCH 4/4] fix tboot

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 arch/x86/kernel/tboot.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index 998e972..0f0d1a3 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -110,7 +110,6 @@ static struct mm_struct tboot_mm = {
 	.mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
 	.page_table_lock =  __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
 	.mmlist         = LIST_HEAD_INIT(init_mm.mmlist),
-	.cpu_vm_mask    = CPU_MASK_ALL,
 };
 
 static inline void switch_to_tboot_pt(void)
@@ -337,9 +336,18 @@ static struct notifier_block tboot_cpu_notifier __cpuinitdata =
 
 static __init int tboot_late_init(void)
 {
+	int ret;
+
 	if (!tboot_enabled())
 		return 0;
 
+	ret = mm_init_cpumask(&tboot_mm, 0);
+	if (ret) {
+		pr_warning("tboot: Allocation failure, disable tboot.\n");
+		tboot = NULL;
+		return ret;
+	}
+
 	tboot_create_trampoline();
 
 	atomic_set(&ap_wfs_count, 0);
-- 
1.7.3.1





      reply	other threads:[~2011-04-19  0:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 12:14 [PATCH 0/3] convert mm->cpu_vm_mask " KOSAKI Motohiro
2011-04-18 12:15 ` [PATCH 1/3] mn10300: replace mm->cpu_vm_mask with mm_cpumask KOSAKI Motohiro
2011-04-18 12:18 ` [PATCH 2/3] tile: replace mm->cpu_vm_mask with mm_cpumask() KOSAKI Motohiro
2011-04-18 13:08   ` Chris Metcalf
2011-04-19  0:09     ` KOSAKI Motohiro
2011-04-18 12:18 ` [PATCH 3/3] mm: convert mm->cpu_vm_cpumask into cpumask_var_t KOSAKI Motohiro
2011-04-19  0:19   ` KOSAKI Motohiro [this message]

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=20110419091947.936D.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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®