Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp208320pxb; Fri, 15 Jan 2021 00:50:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9r5vmJZJb0xnNtBkzK02rRXrhacp/dOU8yEq4xJCO4uhUaNZMymDFcl6HRCCRxHMlyHXW X-Received: by 2002:a17:906:46c7:: with SMTP id k7mr7901172ejs.33.1610700614444; Fri, 15 Jan 2021 00:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610700614; cv=none; d=google.com; s=arc-20160816; b=PWzA80v1/hK8I874tbboqBgFOXpJRLIjIwqfAkAphH6Oml1s9euAjoB9t3+bllEC7I Ck/RUg7TyOKl6nEDtjVs2Kp7jihMiB5oCAPR4CYh2MbSBVR7UtRPBTzDpodFzjdQIa2e vOMDMU3rKw/hFa4XIuCTukz0RKIFtILtmzwb3AcK5BE5QEe4KXhcfYlsDfVGBzpaMM25 Srj3z7agHJTEl0iTf/G6mLjMz0kt1FiHWtMNVJ4ZW6YmOZyTfhPLOfQ7S0FU/ZvbOkqt QarHiytT6H5bDwGsphGAM7MfsegqDW/rOdgqZkBrFUlVOUtbnYK2IJpxP0zTzOt4DIC3 WBdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NzaxdOLDLM9qZIQo17S6U6FAMWqDmbUbCfENGw0bdQk=; b=KEzqCQcuUJE5u/9XAApYLTleOq8VD3hgNbO/AnLadGq6c/PILkDg1RKkPeDxyvZDLB mzu7DlwYLkwLBNIummqOrYftIR8ZbdEufZ1lAyX++plcWbx9mY4EUO1p9PVoNAjlLJa5 p1vPXrlR/W/HhokiFoySBLdj4IM1KVQvrP9k+ZZxuN7NXDfPH3lrZ+CV6Z6V87sYj93l Mw1oBe8IPP/uShRm7+Rj8qLJhl/wJ+mv4j4UfIkdBRAkP6Fuk3cFIiNnXF1qBsBq0WJ9 qzlmSYH0Q3lTkSw4Mucago4x8xFgbFUCaGXyHXomGPKX2mp1ZFPBppI9tom1n1Kt7e0u IGBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mTMCN0X3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 35si3881880edm.126.2021.01.15.00.49.49; Fri, 15 Jan 2021 00:50:14 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=mTMCN0X3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729914AbhAOIcw (ORCPT + 99 others); Fri, 15 Jan 2021 03:32:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:57128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbhAOIcw (ORCPT ); Fri, 15 Jan 2021 03:32:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A1A3E22C7D; Fri, 15 Jan 2021 08:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610699530; bh=l+vS3UHXXMrTJUBoLO6zBmJwtTma5Au1XHnUzyN4zW4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mTMCN0X3oCQgUbwZMAHO0vL3f6cxtUsRT65kSyGPT+GXs3QkYrfXawcTRCWViqOZO 1LdEl4aYVgSnElv5L+bIM1numvEjmB34RIgsXX5XpGlM6TvImsWwkRn3GVRcuLSkpH /2ds2Ev+bEJPiooSiogiv7dTfiVla3XwoXFDgdqcmB3zcdKkRJE0SPK1CXkkA7YbDw P9lfMRsGOuF7A5J0sfUWSVEj/qZXg9zM1WPb6lvqM8BOYNQ62vEUpXpInb7aLdCyth 9g4wDW7hUH8X2JZ5earEN2Q9UsTEuo2IdJSeJ9Te8t7xm4uI/7uz5WGNC1LuLsr06F teb1dmHfxHYRQ== Received: by mail-ot1-f46.google.com with SMTP id o11so7845944ote.4; Fri, 15 Jan 2021 00:32:10 -0800 (PST) X-Gm-Message-State: AOAM53394MTcbjWV5CuCGt2Byh40TZMxFgoLBluQio0McZ4jy43Q3Y0B vsyD0mDl81J5j/7K9QxQL+4dQ8Lp9CiLCvYcVNU= X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr7509680otm.305.1610699529936; Fri, 15 Jan 2021 00:32:09 -0800 (PST) MIME-Version: 1.0 References: <1be37673-db0e-f09d-68c8-f929be4019ab@physik.fu-berlin.de> In-Reply-To: From: Arnd Bergmann Date: Fri, 15 Jan 2021 09:31:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Old platforms: bring out your dead To: Max Filippov Cc: John Paul Adrian Glaubitz , Linus Walleij , Gerhard Pircher , Arnd Bergmann , Linux Kernel Mailing List , linux-m68k , Sparc kernel list , Linux-sh list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 12:09 AM Max Filippov wrote: > On Thu, Jan 14, 2021 at 1:25 PM Arnd Bergmann wrote: > > | arch/mips/Kconfig:config HIGHMEM > > | arch/xtensa/Kconfig:config HIGHMEM > > > > AFAICT On MIPS (prior to MIPS32r3) and xtensa, you have at > > most 512MB in the linear map, so the VMSPLIT_2G or VMSPLIT_4G_4G > > tricks won't work. > > Regarding xtensa this was done to minimize difference between > MMUv2 and MMUv3 virtual memory layouts. MMUv2 has been > obsoleted more than 10 years ago, and MMUv3 is much more > flexible and can do e.g. 4GB linear map. The only piece of xtensa > MMUv2 hardware that I have has 96MB of DRAM which fits into > its linear mapping. So maybe it's time to do a cleanup and > rearrange virtual memory layout to eliminate the need of highmem. Yes, I think that sounds like a useful preparation for the future. > > I have no idea who uses xtensa systems with lots of memory on > > modern kernels. > > We definitely use it for development internally at Cadence/Tensilica, > mainly on simulators, but also on FPGA boards (e.g. on KC705 we > can use all of the 1GB onboard DRAM). > In the last few years we've had a few support requests for linux on > xtensa cores with MMU, but AFAICT none of them had to deal with > more than 512MB of onboard memory. If 1GB of RAM is a useful upper bound on MMUv3, the easiest way is probably to hardcode the CONFIG_VMSPLIT_3G_OPT behavior from x86 and ARM, using 2.75GB of user addresses (TASK_SIZE), and 1.25 GB that gets split between linear map and vmalloc space, but no uncached linear map and ioremap() pointing into vmalloc instead. If you want to be prepared for machines with 2GB of linear lowmem, you could do the same with VMSPLIT_2G_OPT (TASK_SIZE == 0x70000000). Arnd