From patchwork Thu Jun 16 12:28:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 70183 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp235138qgy; Thu, 16 Jun 2016 05:30:33 -0700 (PDT) X-Received: by 10.66.2.168 with SMTP id 8mr4850944pav.152.1466080233678; Thu, 16 Jun 2016 05:30:33 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id y15si5852743pfb.59.2016.06.16.05.30.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2016 05:30:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=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.80.1 #2 (Red Hat Linux)) id 1bDWQQ-0003yn-68; Thu, 16 Jun 2016 12:29:34 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDWQG-0003o5-9D for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2016 12:29:24 +0000 Received: by mail-wm0-x22c.google.com with SMTP id v199so190207940wmv.0 for ; Thu, 16 Jun 2016 05:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h1BAlUp/9hHGdlu/FKpc4Pts/QwdhASnRjslb59PSo0=; b=HZZuxab6bpKbQ80Q5U6knxPFCK9MRko5c87X7lAoAqyibO4izCqYJvME6qUW+L0759 5jPwnGQD4rKpypO4vrpLG9RPgtS7qU2yVhErOW30nmofg8XXAmWiqwonsmo01FcyldgT ZbeCa6b9tL00R9j+F3tht+T5rJcBGtI+j4gNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h1BAlUp/9hHGdlu/FKpc4Pts/QwdhASnRjslb59PSo0=; b=Q5RVWObiRmSygxcS5MIKVoaT2kpTLaLGhcxqHK2KbnK56B0c/pjkWWnjVSjS/Y+/ez bPzGY4RcuOp7AB8nk0DyAD0oSY+ZBGJ9hl8hvLHwc6RigbiZ3xmo19fzY1il5PxRmz6M Ylk+j0hGcLtwx+uOU/D3XAj5svPNCoOFKRBrFDs+JTwfbCpDogFdbZ1vlJX0SvI4yTVd exjM+mkHxaRJMSU2XETDw6a/YGIzg6lwIdRWvMoGDWN5ZZ9fJAvrc9vGeBA7025MHMT4 81N1YOvd0M/ENtASMtpMMgwhbJDN9bivJzOoSqOw0dd/bRHYhdTu8jAfJxtXbjbzfWVJ LXBw== X-Gm-Message-State: ALyK8tIcG80EtDQq3Em4qeo3fDvR7LpWY+YEP918+9w4vf9r2I1/7N9CbdYvLb9tb7gqWzrQ X-Received: by 10.194.102.202 with SMTP id fq10mr342393wjb.156.1466080142689; Thu, 16 Jun 2016 05:29:02 -0700 (PDT) Received: from ards-macbook-pro.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g3sm43504699wjb.47.2016.06.16.05.29.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Jun 2016 05:29:01 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] arm64: drop kernel segment resources from /proc/iomem Date: Thu, 16 Jun 2016 14:28:58 +0200 Message-Id: <1466080138-12193-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466080138-12193-1-git-send-email-ard.biesheuvel@linaro.org> References: <1466080138-12193-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160616_052924_487547_9F8B17DF X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22c listed in] [list.dnswl.org] -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_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, keescook@chromium.org, arnd@arndb.de, Ard Biesheuvel , catalin.marinas@arm.com, linux@armlinux.org.uk MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org By the same reasoning as commit c4004b02f8e5 ("x86: remove the kernel code/data/bss resources from /proc/iomem"), the kernel code and kernel data entries in /proc/iomem probably do more harm than good on arm64 as well. So remove them. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/setup.c | 33 --------------------------------- 1 file changed, 33 deletions(-) -- 1.9.1 _______________________________________________ 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 3279defabaa2..f3ec301653a4 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -68,27 +68,6 @@ phys_addr_t __fdt_pointer __initdata; /* - * Standard memory resources - */ -static struct resource mem_res[] = { - { - .name = "Kernel code", - .start = 0, - .end = 0, - .flags = IORESOURCE_SYSTEM_RAM - }, - { - .name = "Kernel data", - .start = 0, - .end = 0, - .flags = IORESOURCE_SYSTEM_RAM - } -}; - -#define kernel_code mem_res[0] -#define kernel_data mem_res[1] - -/* * The recorded values of x0 .. x3 upon kernel entry. */ u64 __cacheline_aligned boot_args[4]; @@ -201,11 +180,6 @@ static void __init request_standard_resources(void) struct memblock_region *region; struct resource *res; - kernel_code.start = virt_to_phys(_text); - kernel_code.end = virt_to_phys(_etext - 1); - kernel_data.start = virt_to_phys(_sdata); - kernel_data.end = virt_to_phys(_end - 1); - for_each_memblock(memory, region) { res = alloc_bootmem_low(sizeof(*res)); res->name = "System RAM"; @@ -214,13 +188,6 @@ static void __init request_standard_resources(void) res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; request_resource(&iomem_resource, res); - - if (kernel_code.start >= res->start && - kernel_code.end <= res->end) - request_resource(res, &kernel_code); - if (kernel_data.start >= res->start && - kernel_data.end <= res->end) - request_resource(res, &kernel_data); } }