Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp155280ybh; Tue, 21 Jul 2020 19:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZGydG3L/oGXhONdb4rlXRz8STA5LCRCaSUW7ZTQcALpY1Yh4h3PWy/iWKTTZfYzPGLwnD X-Received: by 2002:a05:6402:2c5:: with SMTP id b5mr27708838edx.316.1595384625222; Tue, 21 Jul 2020 19:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595384625; cv=none; d=google.com; s=arc-20160816; b=xYZLN9wgY3G5hwefTzkEJoLgMGQH37ZdgnqSu4jfxJlqeZBsaaQac5UpxdPDGe+3C6 HM43SVFcIYkZl0JUE4Gybvczb2jWZzlH8dzIRq7oFMCZG9BIrcN+ugaiOTpXfM9JCsip TEAA/Ekru+W5+tl6rdVOvYTeOP0A9jabfHFN5hdIib6kdMaSwznH5wRqmW2KJKr4olS+ s++jw5LKUQaHJxB+70VP6U+249tFkHyHEMCmmdlAeP+fvangSd+R46f+nhCV+cKAHVXk Zgs6wvwGbF86R9gmkFW38/CZ7h/a9XL3ZSAsnA4pXOwPe0Dtt9V98jJmpmfJTSKs3ZmG B/UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=V/dXCfNhBarf9drCUMe+GIVa8wXue1RBvi4uh9uGWmo=; b=qzSG8xWKy8xml5sm0pg3Qea1bjljSMp+CAZLYY9i0czcjf9BuKFjtJ8e6HLmnEOf7J brip/h/psYfmLfKsIViu1wIIhoLt0qHTj/oz/rm1CdTfj0JFGB0afAp/h/cXZTyXp0qI EGs+SYUONQrvrlB4KzLGu8tFDIt90k0Rap2UeNIey0EaxiMaPX0AKVkz+hjr2g4q5lGV W+tyOYKjm8O8CjTQLtyI5tq2ISHobuoyiLbpXMDMw3CwWvRDTBDGGwDr3PxyEa2oEJ6A 631nQKgrIRF3LXGbKFWg/3l7BlDo232h2TRkEh25hf6+lCpjDpO+PVeuyo1B4DE046+H EGyg== ARC-Authentication-Results: i=1; mx.google.com; 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 i6si13871272edy.232.2020.07.21.19.23.22; Tue, 21 Jul 2020 19:23:45 -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; 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 S1731654AbgGVCWP (ORCPT + 99 others); Tue, 21 Jul 2020 22:22:15 -0400 Received: from kernel.crashing.org ([76.164.61.194]:41780 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731595AbgGVCWP (ORCPT ); Tue, 21 Jul 2020 22:22:15 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 06M2LIGX018560 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jul 2020 21:21:25 -0500 Message-ID: Subject: Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone From: Benjamin Herrenschmidt To: Palmer Dabbelt Cc: alex@ghiti.fr, mpe@ellerman.id.au, paulus@samba.org, Paul Walmsley , aou@eecs.berkeley.edu, Anup Patel , Atish Patra , zong.li@sifive.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org Date: Wed, 22 Jul 2020 12:21:16 +1000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-07-21 at 16:48 -0700, Palmer Dabbelt wrote: > > Why ? Branch distance limits ? You can't use trampolines ? > > Nothing fundamental, it's just that we don't have a large code model in the C > compiler. As a result all the global symbols are resolved as 32-bit > PC-relative accesses. We could fix this with a fast large code model, but then > the kernel would need to relax global symbol references in modules and we don't > even do that for the simple code models we have now. FWIW, some of the > proposed large code models are essentially just split-PLT/GOT and therefor > don't require relaxation, but at that point we're essentially PIC until we > have more that 2GiB of kernel text -- and even then, we keep all the > performance issues. My memory might be out of date but I *think* we do it on powerpc without going to a large code model, but just having the in-kernel linker insert trampolines. Cheers, Ben.