Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp488737imm; Fri, 11 May 2018 01:22:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrH39y2L7SqIVwC7OFXxhfM1myWScvycKfh4xjJwC+9qVZkHYM2Ivxnib6EeoPZMeH9xfv4 X-Received: by 2002:a65:6182:: with SMTP id c2-v6mr3781504pgv.219.1526026923119; Fri, 11 May 2018 01:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526026923; cv=none; d=google.com; s=arc-20160816; b=G2ehFANUTXCi0gwfEwc/sjHxUxlyT3Hqggu04pKNOG2Q2JiNNOutOaVjZOTborJJND 2qRDxpwdZbelHvobR7bBTxtkQno93jRZAJZqbsa013RNBq3NRYbG8nTcFkWJOc7AAAlR wOOGcD9apFZsAttRf8X6hdu0e9bmOMpvCiz2kQRlBzGdkkYj09uUIWRr136TwZEelTEw 81LhgBbTqzt28fX5XY17UF566s++1myzpxZlsWhgMu0OiR34I+n8ak0MDjVkYahvuzPT niyPC+lNkx56hHGSYtQnAKjO+/QWi4qLDxt0WLXODQhUfc/fFqNYT3FudsC9y/tu/8ML u0TQ== 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=l5aYebMW3goB0QhrbLLxgLr4kAEYpRwOZu+KGXNwZsQ=; b=Pw+4njkBcfwpLBlX98HgPuP+s515qwn6e1OF8QQJ+wIMoOlJNI18dm4UZyEYgslX/L PUwdTC9rtqKppotvk6ksy0QukM/g3Ehj/oGQafqpWU6zGRNhrShLtBTh0/tTlkuO5hYG mBrn4V/Voeu2wg+OjJMnbZ+bOHzG5bKmZC0f8FT2+vW3y7xANrGSJN1AScbqJM7DKrGG 3FxQ4eQEJjez16rVBblPjrpDkAVoampD6K2L9uBRO94IbdysMWUJcEMmWvWi6KMe3gTp wYLD7H9LxQUxlB5/D0LDlIdA+VGd9eH42gVWU5d2iZr/k7a2GFARkpTlFXJQX2+Vok7c oOPA== 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 r5-v6si2646790pls.227.2018.05.11.01.21.48; Fri, 11 May 2018 01:22:03 -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 S1752757AbeEKIU3 (ORCPT + 99 others); Fri, 11 May 2018 04:20:29 -0400 Received: from mga02.intel.com ([134.134.136.20]:35885 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbeEKIUX (ORCPT ); Fri, 11 May 2018 04:20:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 01:20:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,387,1520924400"; d="scan'208";a="55002657" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.65]) by orsmga001.jf.intel.com with ESMTP; 11 May 2018 01:20:20 -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 v5 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING Date: Fri, 11 May 2018 16:09:46 +0800 Message-Id: <1526026187-11782-4-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526026187-11782-1-git-send-email-changbin.du@intel.com> References: <1526026187-11782-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 Acked-by: Steven Rostedt (VMware) --- 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