From patchwork Wed Apr 26 20:11:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1774252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=2TRVkGPU; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q69Gt04bmz23vJ for ; Thu, 27 Apr 2023 06:20:38 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Date:From: Message-Id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FdjPr0VM0YKPd3xzYlcH5uKueMUZwwZg1yv7PgcCGTM=; b=2TRVkGPUrPsJWt 6uaJeNMkLnfxQ2R678v7pW32kyfYr4PviOH65WURdt+GY58MMiUM5QGF+t52+z8c/9aLDUPyDmXSH FpwKkmswO4zO4x9/3iRLfiLWLOZn7XfrGp7izmwOz1cgui7ZIGnd8BxZ49dNphH3oL3CtyDZ1GPWE niL37zA52TPX5Tt6fGxdga7SPS7FM3Xp4bwZor6Dm+hxv5vls9hL7ev4Vq1ZnU8Xz9VJcHwF01jxe Fz6Xl1E6b4MqNsKNYxwPC93Krn6RfTXIv2JXB4J09yrCnp5jyfQVcRm/KKsTZW/ajBmMZ1/doAhoi NQLiHYJb6rOoWQXb3irg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prlbQ-004lfV-24; Wed, 26 Apr 2023 20:19:00 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prlbN-004lei-1Q for openwrt-devel@lists.openwrt.org; Wed, 26 Apr 2023 20:18:59 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.16.1/8.15.2) with ESMTPS id 33QKInMD029919 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 26 Apr 2023 16:18:55 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.16.1/8.15.2/Submit) id 33QKInUR029918; Wed, 26 Apr 2023 13:18:49 -0700 (PDT) (envelope-from ehem) Message-Id: From: Elliott Mitchell Date: Wed, 26 Apr 2023 13:11:51 -0700 Subject: [PATCH 0/9] (mostly) x86 kernel configuration adjustments To: openwrt-devel@lists.openwrt.org X-Spam-Status: No, score=0.4 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230426_131857_644731_88D58B6B X-CRM114-Status: GOOD ( 20.21 ) X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've been mentioning the issue several times, but the OpenWRT x86 builds really don't seem to fit well. As such several x86 kernel configuration adjustments I think are appropriate. First, a side issue. The "# CONFIG_ is not set" was meant for use by tools. Theory being almost all options would default to "no" therefore this implied the person doing configuration had left t [...] Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org I've been mentioning the issue several times, but the OpenWRT x86 builds really don't seem to fit well. As such several x86 kernel configuration adjustments I think are appropriate. First, a side issue. The "# CONFIG_ is not set" was meant for use by tools. Theory being almost all options would default to "no" therefore this implied the person doing configuration had left them alone. Setting an option to "n" is more common when configurations are handled manually. Most tools work perfectly with this and I suggest this should be preferred, when appropriate, going forward. First up is the simple observation CONFIG_FB_NOTIFY disappeared at some point. Since it no longer does anything, the setting should be purged. Next up is some bits related to hardware random-number generators. I notice rather more kernel configuration files set CONFIG_HW_RANDOM to yes than set it to no. As such having the default be yes is a win. Right now this is a mild improvement, but HW RNGs are becoming more common so this should improve over time. I also found support for the Geode HW random number generator had gotten into the common x86 configuration. I imagine having the support is advantageous to Geode devices. Anything else it is disadvantageous. What originally brought the Geode HW RNG situation to my attention was noticing CONFIG_SCx200. Appears CONFIG_SCx200 is part of the Geode platform. Similar to the previous I don't doubt Geode systems need the driver. Non-Geode x86 though simply don't. Appears the architecture type CONFIG_M values need to be set to something. They should all be unset in the common file though. All of the subtargets explicitly specify some processor. Now we come to the item I've mentioned. The X32 ABI. This is running an amd64 processor in amd64 mode, but truncating all pointers to 32 bits (ILP32 mode). This shrinks the runtime size of programs in exchange for limiting them to a maximum of 4GB of memory. The result is often a significant speed increase over both i386 and amd64 modes, largely due to reducing memory use. For rather a lot of programs, 4GB of memory is plenty. Have you ever observed `ls` or a shell use anywhere near that much? The fact most devices running OpenWRT don't have that much *total* memory says the limitation is worthwhile. The difficulty is this means bringing up a new toolchain. While the deltas are small, compilers, linkers and libc all need minor adjustments. The other question is whether to have separate amd64 (or "64") and x32 builds, versus a single combined one. Looks like little of ISA remained on "64", yet some DMA support remained due to the generic configuration. Remove the ISA and ISA DMA support from the top-level configuration. Geode and Legacy though almost certainly still need ISA support. In case someone doesn't know, "AGP" is short for "Accelerated Graphics Port". This was an interim standard when graphics cards in the late 1990s were overwhelming PCI, but PCI-Express wasn't yet available. Since OpenWRT is a router distribution, this doesn't seem like a good fit. If you've got such an Intel board, this will reduce graphics performance, but will release ~.5MB extra memory for better uses. The Direct Rendering Manager was created in association with XFree86. The goal was making graphics faster and moving some things which had been implemented in XFree86, but really needed to be in the kernel into the kernel. I suspect Wayland may well depend on some or all of this. Yet isn't OpenWRT's target embedded network devices? This is something needed for a graphics desktop, not an embedded networking devices (unless you're trying to create X-terminals). As such this also seems like a misfit for OpenWRT/x86. Elliott Mitchell (9): kernel/generic: remove CONFIG_FB_NOTIFY kernel: change CONFIG_HW_RANDOM default to y kernel/x86: move Geode HW random from generic to geode kernel/x86: move SCx200 support from generic to geode kernel/x86: remove CONFIG_M686 from common configuration kernel/x86: enable x32 support for amd64 kernel/x86: remove all ISA support from non-legacy kernel/x86: remove support for AGP kernel/x86: remove DRM support target/linux/airoha/config-5.15 | 1 - target/linux/apm821xx/config-5.10 | 1 - target/linux/apm821xx/config-5.15 | 1 - target/linux/archs38/config-5.10 | 1 + target/linux/archs38/config-5.15 | 1 + target/linux/armvirt/32/config-5.10 | 1 + target/linux/armvirt/32/config-5.15 | 1 + target/linux/armvirt/64/config-5.10 | 1 - target/linux/armvirt/64/config-5.15 | 1 - target/linux/ath25/config-5.10 | 1 - target/linux/ath79/config-5.10 | 1 + target/linux/ath79/config-5.15 | 1 + target/linux/bcm47xx/config-5.10 | 1 - target/linux/bcm47xx/config-5.15 | 1 - target/linux/bcm4908/config-5.10 | 1 + target/linux/bcm4908/config-5.15 | 1 + target/linux/bcm53xx/config-5.10 | 1 - target/linux/bcm53xx/config-5.15 | 1 - target/linux/bcm63xx/config-5.15 | 1 - target/linux/gemini/config-5.10 | 1 + target/linux/gemini/config-5.15 | 1 - target/linux/generic/config-5.10 | 3 +- target/linux/generic/config-5.15 | 3 +- target/linux/imx/config-5.15 | 1 - target/linux/ipq40xx/config-5.15 | 1 - target/linux/ipq806x/config-5.10 | 1 - target/linux/ipq806x/config-5.15 | 1 - target/linux/ipq807x/config-5.15 | 1 + target/linux/kirkwood/config-5.10 | 1 - target/linux/kirkwood/config-5.15 | 1 - target/linux/lantiq/ase/config-5.10 | 1 - target/linux/lantiq/ase/config-5.15 | 1 - target/linux/lantiq/falcon/config-5.10 | 1 + target/linux/lantiq/falcon/config-5.15 | 1 + target/linux/lantiq/xrx200/config-5.10 | 1 - target/linux/lantiq/xrx200/config-5.15 | 1 - target/linux/lantiq/xway/config-5.10 | 1 - target/linux/lantiq/xway/config-5.15 | 1 - target/linux/lantiq/xway_legacy/config-5.10 | 1 + target/linux/lantiq/xway_legacy/config-5.15 | 1 + target/linux/malta/config-5.10 | 1 + target/linux/malta/config-5.15 | 1 + target/linux/mpc85xx/config-5.10 | 1 - target/linux/mpc85xx/config-5.15 | 1 - target/linux/mvebu/config-5.10 | 1 - target/linux/mvebu/config-5.15 | 1 - target/linux/mxs/config-5.15 | 1 + target/linux/octeon/config-5.10 | 1 - target/linux/octeon/config-5.15 | 1 - target/linux/octeontx/config-5.15 | 1 - target/linux/omap/config-5.10 | 1 - target/linux/omap/config-5.15 | 1 - target/linux/oxnas/config-5.15 | 1 + target/linux/pistachio/config-5.10 | 1 + target/linux/pistachio/config-5.15 | 1 + target/linux/qoriq/config-5.15 | 1 - target/linux/sunxi/config-5.15 | 1 - target/linux/tegra/config-5.10 | 1 + target/linux/tegra/config-5.15 | 1 + target/linux/uml/config-5.10 | 1 - target/linux/uml/config-5.15 | 1 - target/linux/x86/64/config-5.10 | 46 ------------------ target/linux/x86/64/config-5.15 | 46 ------------------ target/linux/x86/config-5.10 | 16 +++--- target/linux/x86/config-5.15 | 16 +++--- target/linux/x86/generic/config-5.10 | 51 ------------------- target/linux/x86/generic/config-5.15 | 51 ------------------- target/linux/x86/geode/config-5.10 | 8 ++- target/linux/x86/geode/config-5.15 | 8 ++- target/linux/x86/legacy/config-5.10 | 54 +-------------------- target/linux/x86/legacy/config-5.15 | 54 +-------------------- target/linux/zynq/config-5.15 | 1 + 72 files changed, 55 insertions(+), 361 deletions(-)