linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Gardner <rtg.canonical@gmail.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: Steve Langasek <steve.langasek@canonical.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>, Olof Johansson <olof@lixom.net>,
	Tony Luck <tony.luck@intel.com>,
	Matt Fleming <matt.fleming@intel.com>,
	David Airlie <airlied@linux.ie>,
	Corentin Chary <corentincj@iksaif.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Peter Jones <pjones@redhat.com>,
	Konrad Rzeszutek Wilk <konrad@kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	tim.gardner@canonical.com
Subject: Re: [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to query EFI facilities
Date: Fri, 04 Jan 2013 08:08:54 -0700	[thread overview]
Message-ID: <50E6F086.5020209@gmail.com> (raw)
In-Reply-To: <1357219085-4312-2-git-send-email-matt@console-pimps.org>

On 01/03/2013 06:18 AM, Matt Fleming wrote:
> From: Matt Fleming <matt.fleming@intel.com>
> 

snip

>  /*
> - * We play games with efi_enabled so that the compiler will, if possible, remove
> - * EFI-related code altogether.
> + * We play games with efi_enabled so that the compiler will, if
> + * possible, remove EFI-related code altogether.
>   */
> +#define EFI_BOOT		0x00000001 /* Were we booted from EFI? */
> +#define EFI_SYSTEM_TABLES	0x00000002 /* Can we use EFI system tables? */
> +#define EFI_CONFIG_TABLES	0x00000004 /* Can we use EFI config tables? */
> +#define EFI_RUNTIME_SERVICES	0x00000004 /* Can we use runtime services? */
> +#define EFI_MEMMAP		0x00000008 /* Can we use EFI memory map? */
> +#define EFI_64BIT		0x00000010 /* Is the firmware 64-bit? */
> +

Your use of test_bit() and set_bit() imply that these macros should be
bit numbers, not bit masks. It'll work until you define a mask with an
integer value greater then 31.

rtg
-- 
Tim Gardner tim.gardner@canonical.com

  parent reply	other threads:[~2013-01-04 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 13:18 [RFC PATCH 0/2] EFI facilities bitfield Matt Fleming
2013-01-03 13:18 ` [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to query EFI facilities Matt Fleming
     [not found]   ` <1357219085-4312-2-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-01-03 17:41     ` H. Peter Anvin
2013-01-04 15:08   ` Tim Gardner [this message]
     [not found]     ` <50E6F086.5020209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-04 16:15       ` Matt Fleming
     [not found]         ` <1357316128.8203.33.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-04 16:17           ` H. Peter Anvin
2013-01-04 16:42           ` Tim Gardner
2013-01-03 13:18 ` [RFC PATCH 2/2] samsung-laptop: Disable on EFI hardware Matt Fleming

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=50E6F086.5020209@gmail.com \
    --to=rtg.canonical@gmail.com \
    --cc=airlied@linux.ie \
    --cc=corentincj@iksaif.net \
    --cc=dave.jiang@intel.com \
    --cc=hpa@zytor.com \
    --cc=konrad@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=matt@console-pimps.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=olof@lixom.net \
    --cc=pjones@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=steve.langasek@canonical.com \
    --cc=tim.gardner@canonical.com \
    --cc=tony.luck@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;
as well as URLs for NNTP newsgroup(s).