Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp618421imm; Tue, 5 Jun 2018 01:25:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIgCgkh1/THHTFUs/emhF2itD2i3tHIqfheffhyKKBls/hfwy3hl2osxsEEdbfnhd8C2R87 X-Received: by 2002:a63:a809:: with SMTP id o9-v6mr30616pgf.313.1528187153794; Tue, 05 Jun 2018 01:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528187153; cv=none; d=google.com; s=arc-20160816; b=KIySRxVihNfxwAL6VLEsKcyTYwIlq2hFuhskIr0upZO9i+QaV3sgYOBvBCcUxr7NU4 8xenGCM+MKVBRMFkFTv73NY0MOm2iIkSunkZ0e+KmlclhECn7owHxKAAdnZuHe0bbLlq CLytI8cvd0b865mN/GOXnf+mo4iDkUPKUb+YVeHR9NFuYzbI2trkVemg32y1LEUAt9v5 ONoWTV1kj2f3vIq6VGqtIuKvjUdkONOPK4pu1sfaMuahroXmp+UxmKbaD+1tmwO1EVsO zTeUWGdpA/opSu2KoiynRHXftdRGVoGcilyms5eNYJSNLHz6dGtiS2Encn/DKTzFUWM2 Lysg== 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=sNyVC73kl1R2HkLXhn7NVzyzNiD4T2wNR6PgxFyiLMUvZ9Yq/l3kzL+WCZN7U0XjZT FZJ5Pwz6xMFxMWudLyK+9XiHZRIHWV3u3u6JgYxKu6aPD2tiSXvTlS3lDewC4E08FzWp mjVkUmPTO0q6N1KFo4VPME0mkOMPqOfh58ObqCfuZaq1R44bdNfYptMWyfWx+mfw21TC uDLCu/z+gGOZ9ep0uh6lhGsE+0g54iW93LnKQ8b+BDSXzhZ26HEmfuNi7B6bYeg9sgeq lTkFLHgvtfhZbkzgPTMKXDusELXLqhqL5vfXbn8LM3fmzyPLBQn95otqqJotW5fxZ8Jj M9LQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17-v6si7404396pls.467.2018.06.05.01.25.39; Tue, 05 Jun 2018 01:25:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751957AbeFEIYt (ORCPT + 99 others); Tue, 5 Jun 2018 04:24:49 -0400 Received: from mga07.intel.com ([134.134.136.100]:33944 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbeFEIYp (ORCPT ); Tue, 5 Jun 2018 04:24:45 -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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2018 01:24:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,478,1520924400"; d="scan'208";a="45352172" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.65]) by fmsmga008.fm.intel.com with ESMTP; 05 Jun 2018 01:24:41 -0700 From: changbin.du@intel.com To: mingo@redhat.com, akpm@linux-foundation.org, yamada.masahiro@socionext.com, michal.lkml@markovi.net Cc: rostedt@goodmis.org, tglx@linutronix.de, rdunlap@infradead.org, x86@kernel.org, linux@armlinux.org.uk, lgirdwood@gmail.com, broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, changbin.du@gmail.com, Changbin Du Subject: [PATCH v5 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING Date: Tue, 5 Jun 2018 16:13:39 +0800 Message-Id: <1528186420-6615-4-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528186420-6615-1-git-send-email-changbin.du@intel.com> References: <1528186420-6615-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