[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-03cb525eb25018cf5f3da01d0f1391fc8b37805a@git.kernel.org>
Date: Sat, 30 Jan 2016 01:29:30 -0800
From: tip-bot for Toshi Kani <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dvlasenk@...hat.com, mingo@...nel.org,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
rusty@...tcorp.com.au, peterz@...radead.org, hpa@...or.com,
fenghua.yu@...el.com, akpm@...ux-foundation.org, bp@...e.de,
toshi.kani@...com, luto@...capital.net, tglx@...utronix.de,
tony.luck@...el.com, linux-efi@...r.kernel.org, mcgrof@...e.com,
bp@...en8.de, brgerst@...il.com, linux-mm@...ck.org,
matt@...eblueprint.co.uk, toshi.kani@....com
Subject: [tip:core/resources] ia64: Set System RAM type and descriptor
Commit-ID: 03cb525eb25018cf5f3da01d0f1391fc8b37805a
Gitweb: http://git.kernel.org/tip/03cb525eb25018cf5f3da01d0f1391fc8b37805a
Author: Toshi Kani <toshi.kani@....com>
AuthorDate: Tue, 26 Jan 2016 21:57:21 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 30 Jan 2016 09:49:57 +0100
ia64: Set System RAM type and descriptor
Change efi_initialize_iomem_resources() to set 'flags' and
'desc' for EFI memory types. IORESOURCE_SYSRAM, a modifier bit,
is set for System RAM as IORESOURCE_MEM is already set.
IORESOURCE_SYSTEM_RAM is defined as
(IORESOURCE_MEM|IORESOURCE_SYSRAM). I/O resource descriptor is
set for "ACPI Non-volatile Storage" and "Persistent Memory".
Also set IORESOURCE_SYSTEM_RAM for "Kernel code", "Kernel data",
and "Kernel bss".
Signed-off-by: Toshi Kani <toshi.kani@....com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Tony Luck <tony.luck@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@...e.com>
Cc: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Toshi Kani <toshi.kani@...com>
Cc: linux-arch@...r.kernel.org
Cc: linux-efi <linux-efi@...r.kernel.org>
Cc: linux-ia64@...r.kernel.org
Cc: linux-mm <linux-mm@...ck.org>
Link: http://lkml.kernel.org/r/1453841853-11383-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/ia64/kernel/efi.c | 13 ++++++++++---
arch/ia64/kernel/setup.c | 6 +++---
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index caae3f4..300dac3 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -1178,7 +1178,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
efi_memory_desc_t *md;
u64 efi_desc_size;
char *name;
- unsigned long flags;
+ unsigned long flags, desc;
efi_map_start = __va(ia64_boot_param->efi_memmap);
efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
@@ -1193,6 +1193,8 @@ efi_initialize_iomem_resources(struct resource *code_resource,
continue;
flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+ desc = IORES_DESC_NONE;
+
switch (md->type) {
case EFI_MEMORY_MAPPED_IO:
@@ -1207,14 +1209,17 @@ efi_initialize_iomem_resources(struct resource *code_resource,
if (md->attribute & EFI_MEMORY_WP) {
name = "System ROM";
flags |= IORESOURCE_READONLY;
- } else if (md->attribute == EFI_MEMORY_UC)
+ } else if (md->attribute == EFI_MEMORY_UC) {
name = "Uncached RAM";
- else
+ } else {
name = "System RAM";
+ flags |= IORESOURCE_SYSRAM;
+ }
break;
case EFI_ACPI_MEMORY_NVS:
name = "ACPI Non-volatile Storage";
+ desc = IORES_DESC_ACPI_NV_STORAGE;
break;
case EFI_UNUSABLE_MEMORY:
@@ -1224,6 +1229,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
case EFI_PERSISTENT_MEMORY:
name = "Persistent Memory";
+ desc = IORES_DESC_PERSISTENT_MEMORY;
break;
case EFI_RESERVED_TYPE:
@@ -1246,6 +1252,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
res->start = md->phys_addr;
res->end = md->phys_addr + efi_md_size(md) - 1;
res->flags = flags;
+ res->desc = desc;
if (insert_resource(&iomem_resource, res) < 0)
kfree(res);
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 4f118b0..2029a38 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -80,17 +80,17 @@ unsigned long vga_console_membase;
static struct resource data_resource = {
.name = "Kernel data",
- .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ .flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
};
static struct resource code_resource = {
.name = "Kernel code",
- .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ .flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
};
static struct resource bss_resource = {
.name = "Kernel bss",
- .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ .flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
};
unsigned long ia64_max_cacheline_size;
Powered by blists - more mailing lists