[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171205004053.12535.68808.stgit@bhelgaas-glaptop.roam.corp.google.com>
Date: Mon, 04 Dec 2017 18:40:53 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Jason Cooper <jason@...edaemon.net>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Marc Zyngier <marc.zyngier@....com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
linux-kernel@...r.kernel.org, Ralf Baechle <ralf@...ux-mips.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Thomas Gleixner <tglx@...utronix.de>,
Yinghai Lu <yinghai@...nel.org>,
Matt Turner <mattst88@...il.com>,
Richard Henderson <rth@...ddle.net>
Subject: [PATCH v1 6/6] resource: Set type when reserving new regions
From: Bjorn Helgaas <bhelgaas@...gle.com>
Set resource structs inserted by __reserve_region_with_split() to have the
correct type. Setting the type doesn't fix any functional problem but
makes %pR on the resource work better.
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
kernel/resource.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index ba3252f7c319..8c527d83ca76 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1022,6 +1022,7 @@ static void __init __reserve_region_with_split(struct resource *root,
struct resource *conflict;
struct resource *res = alloc_resource(GFP_ATOMIC);
struct resource *next_res = NULL;
+ int type = resource_type(root);
if (!res)
return;
@@ -1029,7 +1030,7 @@ static void __init __reserve_region_with_split(struct resource *root,
res->name = name;
res->start = start;
res->end = end;
- res->flags = IORESOURCE_BUSY;
+ res->flags = type | IORESOURCE_BUSY;
res->desc = IORES_DESC_NONE;
while (1) {
@@ -1064,7 +1065,7 @@ static void __init __reserve_region_with_split(struct resource *root,
next_res->name = name;
next_res->start = conflict->end + 1;
next_res->end = end;
- next_res->flags = IORESOURCE_BUSY;
+ next_res->flags = type | IORESOURCE_BUSY;
next_res->desc = IORES_DESC_NONE;
}
} else {
Powered by blists - more mailing lists