Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1117174pxy; Wed, 28 Apr 2021 23:26:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmqtOkR62pabmwP5tsgJWb5fQjVvT7RLFMuRYWGYtLOAU6u2/MTLImPP3cxhYbjDvSMGlC X-Received: by 2002:a17:902:748c:b029:ed:6dc5:48f with SMTP id h12-20020a170902748cb02900ed6dc5048fmr8924588pll.30.1619677613389; Wed, 28 Apr 2021 23:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619677613; cv=none; d=google.com; s=arc-20160816; b=n0L8dtg+XmUD6ZSzyyDH9TPC8Qw7mLPeim687ffUI6kJpSfz4nduCM6T5V7A1h09Qq ielK3w0Rn+ucEvhG1Fsg2akA9hg8sXbEe8p/hxCmTynL+ix9Gatc07NXXv8UwV1LbIfO DL3lwInwAkiV4/saJ97URPuRvd9LyF/EJutnCpJP0gYf8TL7BROL72hfZGu2uQQlCH/5 Y3ABaDHYiSonLMr3j5PH1NGHQ0SvTmkjjeGBCKEj90G8ft0ZZZlwYkUv1dHdt+JXtJmo +Xy/9YGr1tbtvu4m/M3TscKwodfDWEYEOVpnyup+5JgkcQjPQf3O+VSHuC39bU1UdVQo 0+yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=5V9zWyCsSWRyBJB2YSVQw8NdRmiQnJFEEv4u2i4PnwY=; b=fruriytv2r902KWMVh/Zcxype4WyqI6u9KKzS/Fjbk5hXnTpYVeoVS9vku/ZqvbkSr tx12tNR5Me3ctxeZ6Dbe3YTIjVf1bb6KmQAp7lXnE95vMzMgJTt99kqOdCJNagbzj4T9 vqCeVynFUSMBR3He96ksTURG0W4lexuzIZJ14tdVfBqgsu68VNBpYMxFcqTD3wejaLPv fe2AGg8VtElYiA4Is72EXdYapNpUwa6I4xQwxD77ojmRMzXFNe+3apkcwAZV1qa3teL+ Fp2Pk7xAMRSDEasvY+z1XNNKKp69xn2MFREPnmxMjJ+tyZMLdFfNAQZr76IkCAGnYjxW p7PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=xYVcMr3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nm12si11270061pjb.161.2021.04.28.23.26.39; Wed, 28 Apr 2021 23:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=xYVcMr3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238891AbhD2G0f (ORCPT + 99 others); Thu, 29 Apr 2021 02:26:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238754AbhD2G0e (ORCPT ); Thu, 29 Apr 2021 02:26:34 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79D49C06138B for ; Wed, 28 Apr 2021 23:25:47 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id p17so8294455plf.12 for ; Wed, 28 Apr 2021 23:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=5V9zWyCsSWRyBJB2YSVQw8NdRmiQnJFEEv4u2i4PnwY=; b=xYVcMr3ofFj5i8PN9JdEri3Np4iIZw7dwiY5dz3koxZHQZlw6qzIesVy9Tdm5nptCX q/6WRreGc6Ecx/7uH7e3QEoo5pnDlT6dLo0EfFdoDEHyYlSCwICDB7IXLWOIfe69X7Oq lHXQc3gh2RDvIXAxvti9Q13W5P9YtDyOU3gXNZ2plvz4UZM7r6cWtebTdcdbsSemWZL6 o2+YmBGdpAQcw65K2jsvfqaRoYMnVcVEBqdqEGXVvqJW/5+kBV5/hhhSHt2WPOFJi81V WGa7QQKqizVxyyHcW2ng8rD/z3y0XwlGsueD86iKNz8e9UOaeN56QIa4LsXBeAb5VTN+ vS8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=5V9zWyCsSWRyBJB2YSVQw8NdRmiQnJFEEv4u2i4PnwY=; b=fpCdGn1U4h3KsvMcXAmuW639XaC2cYCTthE7OvkkdXmg9lkVmmCnBfFoD6556qFtpg TynxmyDzof03pfFhsl0x7+km4R5C+UlxceMNuCc+GqA7dQMPYuNI1Akm/mIsCmsTLFgr TbfcncXyZkHBHjQiMzvaAcxmRuHeQ/V8/cr6u/k8IpsgvziE+Wwp52icox/vpM1kNvqh GagChBd3Biy37SS7FWUasv8JFHoR6VFcncCMBf1Wpvs3Wj5cWUGF0QuQNUryyJASNS30 z09kPQLidStTthobiPWSadrJFfb578ZSFUWuyt1euY8Lb2790bWXVdtrP/Ai1Hcr6855 42LA== X-Gm-Message-State: AOAM533PD+S546D9oWhylrYxe0u+zBqhM4njR+JkIjFLfS6/rfvORJpU 05mNLRGOeWndh5fy48c0WwMq4Q== X-Received: by 2002:a17:90b:e07:: with SMTP id ge7mr5367645pjb.204.1619677546961; Wed, 28 Apr 2021 23:25:46 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id e1sm1446766pgl.25.2021.04.28.23.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 23:25:46 -0700 (PDT) Date: Wed, 28 Apr 2021 23:25:46 -0700 (PDT) X-Google-Original-Date: Wed, 28 Apr 2021 23:25:44 PDT (-0700) Subject: Re: [PATCH] riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y In-Reply-To: <20210428100217.15964-1-alex@ghiti.fr> CC: Paul Walmsley , aou@eecs.berkeley.edu, alex@ghiti.fr, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: alex@ghiti.fr Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Apr 2021 03:02:17 PDT (-0700), alex@ghiti.fr wrote: > Declare kernel_virt_addr for 32b kernel since it is used in > __phys_addr_symbol defined when CONFIG_DEBUG_VIRTUAL is set. > > Fixes: 2bfc6cd81bd17 ("riscv: Move kernel mapping outside of linear > mapping") > Signed-off-by: Alexandre Ghiti > --- > arch/riscv/include/asm/page.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h > index e280ba60cb34..6a7761c86ec2 100644 > --- a/arch/riscv/include/asm/page.h > +++ b/arch/riscv/include/asm/page.h > @@ -106,9 +106,9 @@ extern unsigned long pfn_base; > #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) > #endif /* CONFIG_MMU */ > > -#ifdef CONFIG_64BIT > extern unsigned long kernel_virt_addr; > > +#ifdef CONFIG_64BIT > #define linear_mapping_pa_to_va(x) ((void *)((unsigned long)(x) + va_pa_offset)) > #ifdef CONFIG_XIP_KERNEL > #define kernel_mapping_pa_to_va(y) ({ \ Thanks, this is on for-next.