All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
To: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Mark Rutland <Mark.Rutland-5wv7dgnIgG8@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH] arm64: ignore DT memreserve entries when booting in UEFI mode
Date: Mon, 18 Aug 2014 15:24:49 +0100	[thread overview]
Message-ID: <20140818142449.GM20043@localhost> (raw)
In-Reply-To: <20140813122239.GA15356-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>

On Wed, Aug 13, 2014 at 01:22:39PM +0100, Leif Lindholm wrote:
> On Mon, Jul 28, 2014 at 07:14:49PM +0100, Mark Rutland wrote:
> > On Mon, Jul 28, 2014 at 07:03:03PM +0100, Leif Lindholm wrote:
> > > UEFI provides its own method for marking regions to reserve, via the
> > > memory map which is also used to initialise memblock. So when using the
> > > UEFI memory map, ignore any memreserve entries present in the DT.
> > 
> > It's worth noting that no-one is relying on this at present, and were
> > they it would imply that their UEFI implementation is broken (providing
> > a dodgy memory map).
> > 
> > So before people start doing dodgy things, let's, close that hole. If we
> > need a way of modifying the memory map we should come up with a more
> > general plan.
> 
> Catalin - any comments?
> As it is a bugfix, can it go into 3.17?

It looks fine to me:

Acked-by: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>

(cc'ing Will who handles the 3.17 merging)

> > > Reported-by: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> > > Signed-off-by: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > > ---
> > >  arch/arm64/kernel/efi.c |    2 ++
> > >  arch/arm64/mm/init.c    |    4 +++-
> > >  2 files changed, 5 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> > > index 14db1f6..7ad17b2 100644
> > > --- a/arch/arm64/kernel/efi.c
> > > +++ b/arch/arm64/kernel/efi.c
> > > @@ -188,6 +188,8 @@ static __init void reserve_regions(void)
> > >  		if (uefi_debug)
> > >  			pr_cont("\n");
> > >  	}
> > > +
> > > +	set_bit(EFI_MEMMAP, &efi.flags);
> > >  }
> > >  
> > >  
> > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> > > index e90c542..58dbf2e 100644
> > > --- a/arch/arm64/mm/init.c
> > > +++ b/arch/arm64/mm/init.c
> > > @@ -32,6 +32,7 @@
> > >  #include <linux/of_fdt.h>
> > >  #include <linux/dma-mapping.h>
> > >  #include <linux/dma-contiguous.h>
> > > +#include <linux/efi.h>
> > >  
> > >  #include <asm/sections.h>
> > >  #include <asm/setup.h>
> > > @@ -151,7 +152,8 @@ void __init arm64_memblock_init(void)
> > >  	memblock_reserve(__pa(swapper_pg_dir), SWAPPER_DIR_SIZE);
> > >  	memblock_reserve(__pa(idmap_pg_dir), IDMAP_DIR_SIZE);
> > >  
> > > -	early_init_fdt_scan_reserved_mem();
> > > +	if (!efi_enabled(EFI_MEMMAP))
> > > +		early_init_fdt_scan_reserved_mem();

WARNING: multiple messages have this Message-ID (diff)
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: ignore DT memreserve entries when booting in UEFI mode
Date: Mon, 18 Aug 2014 15:24:49 +0100	[thread overview]
Message-ID: <20140818142449.GM20043@localhost> (raw)
In-Reply-To: <20140813122239.GA15356@bivouac.eciton.net>

On Wed, Aug 13, 2014 at 01:22:39PM +0100, Leif Lindholm wrote:
> On Mon, Jul 28, 2014 at 07:14:49PM +0100, Mark Rutland wrote:
> > On Mon, Jul 28, 2014 at 07:03:03PM +0100, Leif Lindholm wrote:
> > > UEFI provides its own method for marking regions to reserve, via the
> > > memory map which is also used to initialise memblock. So when using the
> > > UEFI memory map, ignore any memreserve entries present in the DT.
> > 
> > It's worth noting that no-one is relying on this at present, and were
> > they it would imply that their UEFI implementation is broken (providing
> > a dodgy memory map).
> > 
> > So before people start doing dodgy things, let's, close that hole. If we
> > need a way of modifying the memory map we should come up with a more
> > general plan.
> 
> Catalin - any comments?
> As it is a bugfix, can it go into 3.17?

It looks fine to me:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

(cc'ing Will who handles the 3.17 merging)

> > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> > > ---
> > >  arch/arm64/kernel/efi.c |    2 ++
> > >  arch/arm64/mm/init.c    |    4 +++-
> > >  2 files changed, 5 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> > > index 14db1f6..7ad17b2 100644
> > > --- a/arch/arm64/kernel/efi.c
> > > +++ b/arch/arm64/kernel/efi.c
> > > @@ -188,6 +188,8 @@ static __init void reserve_regions(void)
> > >  		if (uefi_debug)
> > >  			pr_cont("\n");
> > >  	}
> > > +
> > > +	set_bit(EFI_MEMMAP, &efi.flags);
> > >  }
> > >  
> > >  
> > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> > > index e90c542..58dbf2e 100644
> > > --- a/arch/arm64/mm/init.c
> > > +++ b/arch/arm64/mm/init.c
> > > @@ -32,6 +32,7 @@
> > >  #include <linux/of_fdt.h>
> > >  #include <linux/dma-mapping.h>
> > >  #include <linux/dma-contiguous.h>
> > > +#include <linux/efi.h>
> > >  
> > >  #include <asm/sections.h>
> > >  #include <asm/setup.h>
> > > @@ -151,7 +152,8 @@ void __init arm64_memblock_init(void)
> > >  	memblock_reserve(__pa(swapper_pg_dir), SWAPPER_DIR_SIZE);
> > >  	memblock_reserve(__pa(idmap_pg_dir), IDMAP_DIR_SIZE);
> > >  
> > > -	early_init_fdt_scan_reserved_mem();
> > > +	if (!efi_enabled(EFI_MEMMAP))
> > > +		early_init_fdt_scan_reserved_mem();

  parent reply	other threads:[~2014-08-18 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 18:03 [PATCH] arm64: ignore DT memreserve entries when booting in UEFI mode Leif Lindholm
2014-07-28 18:03 ` Leif Lindholm
     [not found] ` <1406570583-22848-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-28 18:14   ` Mark Rutland
2014-07-28 18:14     ` Mark Rutland
2014-08-13 12:22     ` Leif Lindholm
2014-08-13 12:22       ` Leif Lindholm
     [not found]       ` <20140813122239.GA15356-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-08-18 14:24         ` Catalin Marinas [this message]
2014-08-18 14:24           ` Catalin Marinas

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=20140818142449.GM20043@localhost \
    --to=catalin.marinas-5wv7dgnigg8@public.gmane.org \
    --cc=Mark.Rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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 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.