From patchwork Tue Jan 24 17:11:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 92379 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1815709qgi; Tue, 24 Jan 2017 09:13:15 -0800 (PST) X-Received: by 10.200.49.106 with SMTP id h39mr31885037qtb.257.1485277995654; Tue, 24 Jan 2017 09:13:15 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id e124si11141970qkf.17.2017.01.24.09.13.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 09:13:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cW4ef-0008Ho-86; Tue, 24 Jan 2017 17:13:13 +0000 Received: from mail-wm0-f42.google.com ([74.125.82.42]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cW4ea-0008Gz-Il for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2017 17:13:11 +0000 Received: by mail-wm0-f42.google.com with SMTP id r126so192427518wmr.0 for ; Tue, 24 Jan 2017 09:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0Vy7r3GTkm7L6XEOvU+vYTRqsX6oUPHj5u1DSiTH3lM=; b=YrkuXu84QuBW2X4HJB49wULNXcZo/afn0hlMAb23ZZ/Yi5ntKflkrF/gP+pUAKIBup ub9z4akSLOzMoAWwiXyBbEa+OJq1aX1vK4bFkT9UAffYApn4j7XwXZ/1LiKfUDZ43Gl/ NSzZ23qZIDH/Lz8byixKsJzOZ9Rg8vvRjtmps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0Vy7r3GTkm7L6XEOvU+vYTRqsX6oUPHj5u1DSiTH3lM=; b=s7TvgbB4lu79Pw2uvLl0eiBHEHKsvirU2mUpu2eSp6FxKx3JTmnMcUOHsLrA0hp8Dm UpyLrrAa2HFkroczcQf7ccqPzRCrl2iemsgRhmG0v/AYhqXKNt3u2MHzu4HL/DOzdkX6 asWFFNcfcZI+lKq5VZuptFsyIdxyvpIF0AbK7jvY9g00Efmk2s79yRLDHw047IswA/AI KSqe/M7a9BqQxfrjLvcj8DvvsxvMLUecKF+Q+HXhxtBG2j6Ok+B9aghSvrFxL6/SxO9X sQgb3vZejz1BBagnOVmI8AtSnQu5YaB1/Gk2TS21s+iokasMN8VuueDWa4gMLuubz3yE idww== X-Gm-Message-State: AIkVDXJFZxQHQdqRg37qY4gWn6778rqiLDVH2zkfPPH1L7CYW0KkhR95UXjSyF/HAI3fOMOQ X-Received: by 10.28.155.199 with SMTP id d190mr17857082wme.31.1485277906668; Tue, 24 Jan 2017 09:11:46 -0800 (PST) Received: from localhost.localdomain ([160.163.215.165]) by smtp.gmail.com with ESMTPSA id o42sm20854686wrb.18.2017.01.24.09.11.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jan 2017 09:11:45 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: kernel: do not mark reserved memory regions as IORESOURCE_BUSY Date: Tue, 24 Jan 2017 17:11:40 +0000 Message-Id: <1485277900-22730-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170124_091308_948024_781507C0 X-CRM114-Status: GOOD ( 11.56 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.42 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Ard Biesheuvel , catalin.marinas@arm.com, will.deacon@arm.com, takahiro.akashi@linaro.org, james.morse@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Memory regions marked as NOMAP should not be used for general allocation by the kernel, and should not even be covered by the linear mapping (hence the name). However, drivers or other subsystems (such as ACPI) that access the firmware directly may legally access them, which means it is also reasonable for such drivers to claim them by invoking request_resource(). Currently, this is prevented by the fact that arm64's request_standard_resources() marks reserved regions as IORESOURCE_BUSY. So drop the IORESOURCE_BUSY flag from these requests. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b051367e2149..888295e46b53 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -208,7 +208,7 @@ static void __init request_standard_resources(void) res = alloc_bootmem_low(sizeof(*res)); if (memblock_is_nomap(region)) { res->name = "reserved"; - res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + res->flags = IORESOURCE_MEM; } else { res->name = "System RAM"; res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;