lkml.org 
[lkml]   [2009]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v3][PATCH 2/2] intel_txt: Intel(R) TXT and tboot kernel support

* 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


\
 
 \ /
  Last update: 2009-05-08 12:01    [W:1.361 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site