All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Joseph Cihula <joseph.cihula@intel.com>
Cc: linux-kernel@vger.kernel.org, arjan@linux.intel.com,
	hpa@zytor.com, andi@firstfloor.org, chrisw@sous-sol.org,
	jmorris@namei.org, jbeulich@novell.com, peterm@redhat.com,
	gang.wei@intel.com, shane.wang@intel.com
Subject: Re: [RFC v3][PATCH 2/2] intel_txt: Intel(R) TXT and tboot kernel support
Date: Fri, 8 May 2009 11:57:48 +0200	[thread overview]
Message-ID: <20090508095748.GH3559@elte.hu> (raw)
In-Reply-To: <4A03B9C3.9090607@intel.com>


* Joseph Cihula <joseph.cihula@intel.com> wrote:

> +	/* if we're being called before the 1:1 mapping is set up then just
> +	   return and let the normal shutdown happen; this should only be
> +	   due to very early panic() */
> +	if (!tboot_pg_dir)
> +		return;

Please use the customary comment style:

  /*
   * Comment .....
   * ...... goes here:
   */

specified in Documentation/CodingStyle. Please fix this in all other 
multi-line comments in your patch as well.


> +	if (shutdown_type == TB_SHUTDOWN_S3) {
> +		tboot_shared->num_mac_regions = 3;
> +		/* S3 resume code */
> +		tboot_shared->mac_regions[0].start =
> +			PFN_PHYS(PFN_DOWN(acpi_wakeup_address));
> +		tboot_shared->mac_regions[0].size =
> +			PFN_UP(WAKEUP_SIZE) << PAGE_SHIFT;
> +		/* AP trampoline code */
> +		tboot_shared->mac_regions[1].start =
> +			PFN_PHYS(PFN_DOWN(virt_to_phys(trampoline_base)));
> +		tboot_shared->mac_regions[1].size =
> +			PFN_UP(TRAMPOLINE_SIZE) << PAGE_SHIFT;
> +		/* kernel code + data + bss */
> +		tboot_shared->mac_regions[2].start =
> +			PFN_PHYS(PFN_DOWN(virt_to_phys(&_text)));
> +		tboot_shared->mac_regions[2].size =
> +			PFN_PHYS(PFN_UP(virt_to_phys(&_end))) -
> +			PFN_PHYS(PFN_DOWN(virt_to_phys(&_text)));
> +	}
> +
> +	tboot_shared->shutdown_type = shutdown_type;
> +
> +	switch_to_tboot_pt();
> +
> +	((void(*)(void))(unsigned long)tboot_shared->shutdown_entry)();

shutdown_entry should probably have a proper function pointer type, 
to avoid this ugliness.

	Ingo

  parent reply	other threads:[~2009-05-08  9:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08  4:49 [RFC v3][PATCH 2/2] intel_txt: Intel(R) TXT and tboot kernel support Joseph Cihula
2009-05-08  6:53 ` Andrew Morton
2009-05-29  1:02   ` Cihula, Joseph
2009-05-08  9:57 ` Ingo Molnar [this message]
2009-05-12  5:26   ` Cihula, Joseph
2009-05-12  9:45     ` Ingo Molnar
2009-05-12  9:55       ` Andi Kleen
2009-05-12 21:01 ` Theodore Tso
2009-05-14 15:52   ` Heinz Diehl
2009-05-15  0:17   ` James Morris
2009-05-15  1:45     ` Cihula, Joseph
2009-05-15  1:51       ` Joe Perches
2009-05-15  2:49         ` Cihula, Joseph
2009-05-28  1:12           ` James Morris
2009-05-15 12:07       ` Theodore Tso
2009-05-15 12:26         ` Theodore Tso
2009-05-24 19:42         ` Pavel Machek
2009-05-24 19:42       ` Pavel Machek
     [not found]         ` <E1M8kJQ-0000W3-TE@fencepost.gnu.org>
2009-05-26  2:31           ` Theodore Tso
     [not found]             ` <E1M9Mig-0003Q4-S1@fencepost.gnu.org>
2009-05-29  9:47               ` Pavel Machek
2009-05-19 20:30     ` Pavel Machek
2009-05-22 16:59       ` H. Peter Anvin

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=20090508095748.GH3559@elte.hu \
    --to=mingo@elte.hu \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.