public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Matt Fleming <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux@roeck-us.net,
	sfr@canb.auug.org.au, tony.luck@gmail.com,
	zjzhang@codeaurora.org, tony.luck@intel.com,
	ard.biesheuvel@linaro.org, peterz@infradead.org,
	matt@codeblueprint.co.uk, tglx@linutronix.de,
	matt.fleming@intel.com, mingo@kernel.org, hpa@zytor.com
Subject: [tip:core/efi] efi: Use the generic efi.memmap instead of 'memmap '
Date: Sun, 11 Oct 2015 02:06:41 -0700	[thread overview]
Message-ID: <tip-0ce423b6492a02be11662bfaa837dd16945aad3e@git.kernel.org> (raw)
In-Reply-To: <20151003222607.GA2682@codeblueprint.co.uk>

Commit-ID:  0ce423b6492a02be11662bfaa837dd16945aad3e
Gitweb:     http://git.kernel.org/tip/0ce423b6492a02be11662bfaa837dd16945aad3e
Author:     Matt Fleming <matt@codeblueprint.co.uk>
AuthorDate: Sat, 3 Oct 2015 23:26:07 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 11 Oct 2015 11:04:18 +0200

efi: Use the generic efi.memmap instead of 'memmap'

Guenter reports that commit:

  7bf793115dd9 ("efi, x86: Rearrange efi_mem_attributes()")

breaks the IA64 compilation with the following error:

  drivers/built-in.o: In function `efi_mem_attributes': (.text+0xde962): undefined reference to `memmap'

Instead of using the (rather poorly named) global variable
'memmap' which doesn't exist on IA64, use efi.memmap which
points to the 'memmap' object on x86 and arm64 and which is NULL
for IA64.

The fact that efi.memmap is NULL for IA64 is OK because IA64
provides its own implementation of efi_mem_attributes().

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jonathan Zhang <zjzhang@codeaurora.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20151003222607.GA2682@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/efi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index afee2880..16c4928 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -623,13 +623,15 @@ char * __init efi_md_typeattr_format(char *buf, size_t size,
  */
 u64 __weak efi_mem_attributes(unsigned long phys_addr)
 {
+	struct efi_memory_map *map;
 	efi_memory_desc_t *md;
 	void *p;
 
 	if (!efi_enabled(EFI_MEMMAP))
 		return 0;
 
-	for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+	map = efi.memmap;
+	for (p = map->map; p < map->map_end; p += map->desc_size) {
 		md = p;
 		if ((md->phys_addr <= phys_addr) &&
 		    (phys_addr < (md->phys_addr +

      parent reply	other threads:[~2015-10-11  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18  4:08 linux-next: Tree for Sep 18 Stephen Rothwell
2015-09-18 14:22 ` linux-next: Tree for Sep 18 (build failures) Guenter Roeck
2015-10-02 16:16   ` linux-next: Tree for Sep 18 (build failures, up to 10/02) Guenter Roeck
2015-10-03 22:26     ` Matt Fleming
2015-10-10 16:26       ` Matt Fleming
2015-10-11  9:06       ` tip-bot for Matt Fleming [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=tip-0ce423b6492a02be11662bfaa837dd16945aad3e@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matt.fleming@intel.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@gmail.com \
    --cc=tony.luck@intel.com \
    --cc=zjzhang@codeaurora.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