From patchwork Tue Jan 3 17:21:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9495251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30416606A7 for ; Tue, 3 Jan 2017 17:24:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38A8E27C2D for ; Tue, 3 Jan 2017 17:24:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D82B27CF5; Tue, 3 Jan 2017 17:24:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B637B27C2D for ; Tue, 3 Jan 2017 17:24:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOSnJ-0004K8-47; Tue, 03 Jan 2017 17:22:41 +0000 Received: from mail-qk0-f173.google.com ([209.85.220.173]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOSn5-0004EJ-AS for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2017 17:22:29 +0000 Received: by mail-qk0-f173.google.com with SMTP id h201so242097870qke.1 for ; Tue, 03 Jan 2017 09:22:06 -0800 (PST) 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:in-reply-to :references; bh=PSG91vzgtMcZrk5Ep6wF5R1Nw8IrKonjL4xrsrRkb5I=; b=OUErNoEsW9LVuWb/MYVXNOwwL0sBpVL+4XJ/JZZ3zImRe0DCNyGfk7rhSz/95A9dM5 C9D06NdNv30kDsVhFQR0w9vdG119VtfkYeXIFcvJ3FkEkx7p+kYswYfF8EO4nTZyr5XW YhCsmvaDJVLBJRubFCtl569fes8qNoCdrWgwrINFGRLVZA1yS69RjZzGGkPp7orEIb5N H0YQyvovdypPMO7+1NjMc4QY9xQZNslCayi+/gwxNEhnu22+/wqHZI37R+Z6zVIF1817 PXkmt2WgGzrUuigSAI5yW1C10zgcs79cLrtighxDvvCeAyOZ4iDE2F2zCHkkSjeuDl1F T2QQ== X-Gm-Message-State: AIkVDXIqUq1g5/Dob8HEGgFMazM1MGsH9hSoywppTmLeoLR4+OeRIsfMz3P6Df8W2yLX9pM+ X-Received: by 10.55.132.4 with SMTP id g4mr59265298qkd.2.1483464126139; Tue, 03 Jan 2017 09:22:06 -0800 (PST) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc::6b06]) by smtp.gmail.com with ESMTPSA id 53sm44034313qtm.5.2017.01.03.09.22.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2017 09:22:05 -0800 (PST) From: Laura Abbott To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas Subject: [PATCHv6 01/11] lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL Date: Tue, 3 Jan 2017 09:21:43 -0800 Message-Id: <1483464113-1587-2-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483464113-1587-1-git-send-email-labbott@redhat.com> References: <1483464113-1587-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170103_092227_606142_EF69490F X-CRM114-Status: GOOD ( 11.54 ) 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: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Laura Abbott , Joonsoo Kim , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP DEBUG_VIRTUAL currently depends on DEBUG_KERNEL && X86. arm64 is getting the same support. Rather than add a list of architectures, switch this to ARCH_HAS_DEBUG_VIRTUAL and let architectures select it as appropriate. Acked-by: Ingo Molnar Reviewed-by: Mark Rutland Tested-by: Mark Rutland Suggested-by: Mark Rutland Signed-off-by: Laura Abbott --- arch/x86/Kconfig | 1 + lib/Kconfig.debug | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e487493..f1d4e8f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -46,6 +46,7 @@ config X86 select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI + select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_FAST_MULTIPLIER diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b06848a..2aed316 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -622,9 +622,12 @@ config DEBUG_VM_PGFLAGS If unsure, say N. +config ARCH_HAS_DEBUG_VIRTUAL + bool + config DEBUG_VIRTUAL bool "Debug VM translations" - depends on DEBUG_KERNEL && X86 + depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL help Enable some costly sanity checks in virtual to page code. This can catch mistakes with virt_to_page() and friends.