Received: by 10.192.165.148 with SMTP id m20csp5257860imm; Wed, 9 May 2018 01:58:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoeRaC2RrbnrvkV09Pg1zkatjtqp6J/lx0+Yr3jc1YyMZfem80TKFbj+FGIiDFQm5wo2Rim X-Received: by 10.98.112.2 with SMTP id l2mr43336824pfc.40.1525856289850; Wed, 09 May 2018 01:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525856289; cv=none; d=google.com; s=arc-20160816; b=fscOt0SW16kIajuGGqSgAdp8jpCbon53D72bN9p0wYAOwDqmJ1gQJ13vMxqWjtGpj/ ngqX/RbdAe4Wgo0EZm9xKSO0TLq/2lvgTUqElpV28G9VS72L/B5xUudga/5F3S4rlQJF oiXYeGKMaFS/BaQYpSJ53sxs61+25mzMimIX9yiL4fbQk2sowZ/nthNRk3rcNjn7VZmu Q9XI9PrgwL0a8IQoQpDNZLXU80t/9DoavjnSOxwFsHXsZb+69YiARNOJAx0Jv+dhLeOk RK8NBqjO3INURsU+lyK3upM9OFZ8q1wqlA0r148KhkFZNfTEhZfSlpJq3hbgn/6P66Rh PKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=YWrQW2la0A7prDp6budWSmJZCTP691qQZYE7UWL+04s=; b=WL779QgcYtF9TxUcnhy/d0whpz6cyLZ+qR/h+IcbGVTMfZun04vVLcnxOcvD72F7G5 9zLDJXk6iKqBD2zf0R7nZUN7HqhvHGA0tblFOGC8hzLku3CX65AwBj4bNW/LFqPs3DFu Ee/VN/AF8nyMZyXcUcoJaFMeilIoKfgyShLWJUaLdWpBXNPvkK5sqCmDkFlmAltPCWpu WynK7Az8Udby8k7FK4eX7bVs9LlTOanGO3fvwUQEhUvh6f5IsgFalt5QSEncy+Q3MRHN 6494k4dTkch4ZGTbid2EpGatEfMNYGor39fEv/YfCQWLiM6nGct+kif9hcZ89c6Itj/8 fSnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v29-v6si21757942pgo.483.2018.05.09.01.57.55; Wed, 09 May 2018 01:58:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934505AbeEII4a (ORCPT + 99 others); Wed, 9 May 2018 04:56:30 -0400 Received: from mga09.intel.com ([134.134.136.24]:47882 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934234AbeEII42 (ORCPT ); Wed, 9 May 2018 04:56:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 01:56:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="38541964" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.59]) by fmsmga008.fm.intel.com with ESMTP; 09 May 2018 01:56:24 -0700 From: changbin.du@intel.com To: yamada.masahiro@socionext.com, michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org Cc: rostedt@goodmis.org, rdunlap@infradead.org, x86@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Changbin Du Subject: [PATCH v4 4/4] asm-generic: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING Date: Wed, 9 May 2018 16:43:16 +0800 Message-Id: <1525855396-7908-5-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525855396-7908-1-git-send-email-changbin.du@intel.com> References: <1525855396-7908-1-git-send-email-changbin.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Changbin Du With '-Og' optimization level, GCC would not optimize a count for a loop as a constant value. But BUILD_BUG_ON() only accept compile-time constant values. Let's use __fix_to_virt() to avoid the error. arch/arm/mm/mmu.o: In function `fix_to_virt': /home/changbin/work/linux/./include/asm-generic/fixmap.h:31: undefined reference to `__compiletime_assert_31' Makefile:1051: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Signed-off-by: Changbin Du --- v2: use __fix_to_virt() to fix the issue. --- arch/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index e46a6a4..c08d74e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1599,7 +1599,7 @@ static void __init early_fixmap_shutdown(void) pte_t *pte; struct map_desc map; - map.virtual = fix_to_virt(i); + map.virtual = __fix_to_virt(i); pte = pte_offset_early_fixmap(pmd_off_k(map.virtual), map.virtual); /* Only i/o device mappings are supported ATM */ -- 2.7.4