From patchwork Thu Apr 30 20:38:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 11521545 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FF3892C for ; Thu, 30 Apr 2020 20:39:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2859206C0 for ; Thu, 30 Apr 2020 20:39:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OmfEjbhs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2859206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pfULQgDJC/FYjsOjRbCNtxgIaOE6zj1j/rkvA62evv4=; b=OmfEjbhsMlBG3F PB4Yex1vzkFVPAugJgy8EBU/+176fdeizWEJupjk7Z9161pAyreHZdexc4BpK4n5zgy55P+8EeV3r 4wXg9rws2ZPCrhlCUwKbh+KHxt8xIg+FXH0GO1vfRgx6WF5wR8e85CeVW4rdvol0JtCGavVK58HpD ZmTL/RF8GhuiNPtuAF7InzHpPyeHVaJ1h9rvnNa/DQV+eMNWmq3vJIwDbwQ9kdcY5rtXTD7qy8ldl U87CUHSs0ux9w2ycrEyVh8Dav8eAE8Im8cP2+OqOeNouMckeWhZXNfcPoIo5fu1UGSn1kyeihlWaW zV5cgC5wyb1QULNQOGNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUFyE-0000zb-AJ; Thu, 30 Apr 2020 20:39:46 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUFxN-0000HJ-2b; Thu, 30 Apr 2020 20:38:54 +0000 IronPort-SDR: oQ5QRcHRyK73R48mbdV9kGbiIwhIy8KGPcALu1EOQG+0GrNs6RLfGFrZgenRIMXVft7k+zjGRY EUcfmbXVrP2A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2020 13:38:51 -0700 IronPort-SDR: hB//QQpet3fOdmuPqRAhuKh6hnLMIfJNg3bTy5qhPJCt9/QRNs8zhIzkpzjhDWblDqxeVXndxO EriWtSJ5oOZA== X-IronPort-AV: E=Sophos;i="5.73,337,1583222400"; d="scan'208";a="294637095" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2020 13:38:50 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Andrew Morton , Christian Koenig , Huang Rui Subject: [PATCH V1 02/10] arch/xtensa: Move kmap build bug out of the way Date: Thu, 30 Apr 2020 13:38:37 -0700 Message-Id: <20200430203845.582900-3-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200430203845.582900-1-ira.weiny@intel.com> References: <20200430203845.582900-1-ira.weiny@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200430_133853_283944_8F9CA325 X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.88 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.88 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , dri-devel@lists.freedesktop.org, "James E.J. Bottomley" , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Ira Weiny , Thomas Gleixner , Helge Deller , x86@kernel.org, linux-csky@vger.kernel.org, Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Borislav Petkov , Andy Lutomirski , Dan Williams , linux-arm-kernel@lists.infradead.org, Chris Zankel , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ira Weiny Move the kmap() build bug to kmap_init() to facilitate patches to lift kmap() to the core. Signed-off-by: Ira Weiny Reviewed-by: Christoph Hellwig --- arch/xtensa/include/asm/highmem.h | 5 ----- arch/xtensa/mm/highmem.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/include/asm/highmem.h b/arch/xtensa/include/asm/highmem.h index 413848cc1e56..a9587c85be85 100644 --- a/arch/xtensa/include/asm/highmem.h +++ b/arch/xtensa/include/asm/highmem.h @@ -68,11 +68,6 @@ void kunmap_high(struct page *page); static inline void *kmap(struct page *page) { - /* Check if this memory layout is broken because PKMAP overlaps - * page table. - */ - BUILD_BUG_ON(PKMAP_BASE < - TLBTEMP_BASE_1 + TLBTEMP_SIZE); might_sleep(); if (!PageHighMem(page)) return page_address(page); diff --git a/arch/xtensa/mm/highmem.c b/arch/xtensa/mm/highmem.c index 184ceadccc1a..711641c4d214 100644 --- a/arch/xtensa/mm/highmem.c +++ b/arch/xtensa/mm/highmem.c @@ -88,6 +88,11 @@ void __init kmap_init(void) { unsigned long kmap_vstart; + /* Check if this memory layout is broken because PKMAP overlaps + * page table. + */ + BUILD_BUG_ON(PKMAP_BASE < + TLBTEMP_BASE_1 + TLBTEMP_SIZE); /* cache the first kmap pte */ kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); kmap_pte = kmap_get_fixmap_pte(kmap_vstart);