Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4907570rwb; Tue, 8 Aug 2023 16:24:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWpQ35xu2fbOkXcTddrnCYSfpQrpdT+UXYL8gzCMO4prbHuFp8rOsrsHEJOTQ1YQctQI7c X-Received: by 2002:a9d:731a:0:b0:6b9:c5b5:6a96 with SMTP id e26-20020a9d731a000000b006b9c5b56a96mr1021955otk.6.1691537067406; Tue, 08 Aug 2023 16:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691537067; cv=none; d=google.com; s=arc-20160816; b=l9zk4Tp0F96GymgezPlbDTb4jZFjgYokUElVovVF9Nu6QcR0Qrevoer6iPMSJFVojO sT7y9gOwA3WUYIlGcyDi7L0W8Qw5Vi7pxsYVEjgupLd4zOnCVyFVSbhsGRr9xOFSDR8U OLAAP/9HqnTaBlcnchbB5nXADmEj0n0w5/nGExaD3dKBTNRAqcQB9A5uKgaXRHi41xdD VFcoxgu7CrtQd1OUMITFi/ywRo5cVgj9QlY5Ooq/uXSJGggeopWCyGbFC2RO1xlpDIhL 9ZHWIL+whbkDNk/RvsjoYmXIq7jzhmZIMYcCSzLkZAF6Jc37CRTwoUd1kP9J+AzAvA3+ B3gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZDALvFIak3dkZOLuYlAfhCehu+RJYBfHhd0fnnY5iiM=; fh=TxQCLceVCK6DhfyPqM45vpOgVORz2Z0wQK0TRO2Rn6o=; b=E5U7WnJOttnnvqqh8w7hUNyjlTcaQEtWBOly9vkkZeQt2GXw4WEwjX7WiRWKeRRQX2 w5wTXeUVPOwft5coSv4/+KmsEYTJc2xqjpDHIO0aXqOoC+USbqt1FcPuURZGd67xLTSY pwI0jBnq72oyNX4fwiatsKgZQULX/E0I11iD75PJTB7HMODXv48/iS7nl2GMhcimRWXM kolQ56cvbbhu5WHbrS7/JOgbgygyoJzmkeBRTjW0OSIxExU4741TxKz3z2MRvt14wUBT f1xSeVtVOKqlwJUOA0t1dP0GOVOw3CXWPqHN9xmvpsuHFvt/Vfj1DjnIjVD/W59zNaoc iA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@treblig.org header.s=bytemarkmx header.b=lQmkV5ot; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y187-20020a638ac4000000b0055c79555b90si7881727pgd.333.2023.08.08.16.24.14; Tue, 08 Aug 2023 16:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@treblig.org header.s=bytemarkmx header.b=lQmkV5ot; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbjHHXCg (ORCPT + 99 others); Tue, 8 Aug 2023 19:02:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbjHHXCf (ORCPT ); Tue, 8 Aug 2023 19:02:35 -0400 Received: from mx.treblig.org (unknown [IPv6:2a00:1098:5b::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FC3C101 for ; Tue, 8 Aug 2023 16:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID :Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=ZDALvFIak3dkZOLuYlAfhCehu+RJYBfHhd0fnnY5iiM=; b=lQmkV5otXwlM+J8rAPsEoNdtCF xoZwrZIr017/bMTJyGOmuYGk8HEv+3Wvj5QSDylQVNIa9czH2B8sVY9zAk9hn/ExIi7rZHK4pJCfh 8t+BzfDUpkjH60ulN6vn9LJLnxlNr82hUwc4ON+R4qSOZEvUIBPcf+jOZgkrhbWhDU60WZjztd1Kh z5rGNuwFfK4hgnFUy6JZR02eghvMqR8eKk/p3cwmWbrv0BlFX3iHSRwAsv9WeECDl04JwVqlqfsHT Z67ih3nULPu7qYiohBTtz8cCzV9FdOGR5c4HgBcI3JhcGSBDZyBIZBFSMvE7dFEMkOkjrfyKMft+0 H+TwAbqg==; Received: from dg by mx.treblig.org with local (Exim 4.94.2) (envelope-from ) id 1qTViY-005rPc-MU; Tue, 08 Aug 2023 23:02:22 +0000 Date: Tue, 8 Aug 2023 23:02:22 +0000 From: "Dr. David Alan Gilbert" To: Randy Dunlap Cc: mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, sam@ravnborg.org, benh@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] powerpc: Use shared font data Message-ID: References: <20230807010721.799613-1-linux@treblig.org> <828497a6-80c2-329f-8b47-2311bf08943d@infradead.org> <8599e99b-ad80-abf8-ad40-4cb8262f047a@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <8599e99b-ad80-abf8-ad40-4cb8262f047a@infradead.org> X-Chocolate: 70 percent or better cocoa solids preferably X-Operating-System: Linux/5.10.0-23-amd64 (x86_64) X-Uptime: 23:01:22 up 33 days, 8:32, 1 user, load average: 0.04, 0.04, 0.00 User-Agent: Mutt/2.0.5 (2021-01-21) X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Randy Dunlap (rdunlap@infradead.org) wrote: > > > On 8/8/23 10:28, Dr. David Alan Gilbert wrote: > > * Randy Dunlap (rdunlap@infradead.org) wrote: > >> Hi-- > >> > >> On 8/6/23 18:07, linux@treblig.org wrote: > >>> From: "Dr. David Alan Gilbert" > >>> > >>> PowerPC has a 'btext' font used for the console which is almost identical > >>> to the shared font_sun8x16, so use it rather than duplicating the data. > >>> > >>> They were actually identical until about a decade ago when > >>> commit bcfbeecea11c ("drivers: console: font_: Change a glyph from > >>> "broken bar" to "vertical line"") > >>> > >>> which changed the | in the shared font to be a solid > >>> bar rather than a broken bar. That's the only difference. > >>> > >>> This was originally spotted by PMD which noticed that sparc does > >>> the same thing with the same data, and they also share a bunch > >>> of functions to manipulate the data. I've previously posted a near > >>> identical patch for sparc. > >>> > >>> One difference I notice in PowerPC is that there are a bunch of compile > >>> options for the .c files for the early code to avoid a bunch of security > >>> compilation features; it's not clear to me if this is a problem for > >>> this font data. > >>> > >>> Tested very lightly with a boot without FS in qemu. > >>> > >>> v2 > >>> Added 'select FONT_SUPPORT' (to stop modconfig causing the font to be > >>> linked into a module rather than the main kernel) > >>> Added 'select FONTS' to satisfy requirements in lib/fonts > >>> > >>> Signed-off-by: Dr. David Alan Gilbert > >>> --- > >>> arch/powerpc/Kconfig.debug | 3 + > >>> arch/powerpc/kernel/btext.c | 360 +----------------------------------- > >>> 2 files changed, 9 insertions(+), 354 deletions(-) > >>> > >>> diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug > >>> index 2a54fadbeaf51..521c4baf30e88 100644 > >>> --- a/arch/powerpc/Kconfig.debug > >>> +++ b/arch/powerpc/Kconfig.debug > >>> @@ -147,6 +147,9 @@ config BDI_SWITCH > >>> config BOOTX_TEXT > >>> bool "Support for early boot text console (BootX or OpenFirmware only)" > >>> depends on PPC_BOOK3S > >>> + select FONT_SUN8x16 > >>> + select FONT_SUPPORT > >>> + select FONTS > >>> help > >>> Say Y here to see progress messages from the boot firmware in text > >>> mode. Requires either BootX or Open Firmware. > >> > >> kconfig tells me: > >> > >> WARNING: unmet direct dependencies detected for FONTS > >> Depends on [n]: FONT_SUPPORT [=y] && (FRAMEBUFFER_CONSOLE [=n] || STI_CONSOLE [=n]) > >> Selected by [y]: > >> - BOOTX_TEXT [=y] && PPC_BOOK3S [=y] > >> > >> WARNING: unmet direct dependencies detected for FONT_SUN8x16 > >> Depends on [n]: FONT_SUPPORT [=y] && FRAMEBUFFER_CONSOLE [=n] && (!SPARC && FONTS [=y] || SPARC) > >> Selected by [y]: > >> - BOOTX_TEXT [=y] && PPC_BOOK3S [=y] > >> > >> because FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE and neither of those is set. > > > > I'm not getting the warnings in the v2, with a few configs; what command > > are using? > > > > My 'make' build target is either pp32_randconfig or ppc64_randconfig. > I see kconfig warnings in > 50% of the randconfigs. (small sample size, > around 20) Thanks, that triggers it for me; I'll have a discussion with it.... Dave > > > I'm tempted to change the FONT_SUN8x16 dependency line to have > > SPARC||BOOTX_TEXT or SPARC||POWERPC and drop the 'select FONTS' I > > added. > > > > Dave > > > >> > >> -- > >> ~Randy > > -- > ~Randy -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/