Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4768432rwb; Tue, 8 Aug 2023 13:35:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/qF29Oe1NA5WkzLL07Huv1xdj3nwVDytJQ5jTaoBzp1Ml8cj/2A+80ZvhZqyq7VaOtukw X-Received: by 2002:a05:6a00:17a1:b0:687:1527:e5bc with SMTP id s33-20020a056a0017a100b006871527e5bcmr603249pfg.29.1691526902615; Tue, 08 Aug 2023 13:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691526902; cv=none; d=google.com; s=arc-20160816; b=szzOCx7OGmSqFQfB3iHfbuxvE7KhjvhQ1FiEnF6n63Q6cEuDLSZEQgEzUtYSpgbU8o KICDKzU/5YcyPW+A67+RTQETcrVGCytOxxmI3ydgMfoF30HJrxix9zlt3EvjXD7a02qR Ox5EKoc7flN+jx6SoA+xTM5hBHYJRgbaoNEeqfAVHOzxuPiiBMkeF6QBNTqh05FWGySI VzptYNgjwVS+/X3qunm2k2dcHfDUF1/eGdGzRqQTmHhLhxa5P8vOb8PsB3srJERhFizf E7GyxlH/eAPQLpdW9Tbjf9VPooorhULQzcEvzsRM5kXo1eg5Wck7VoKYGLsDuyOpRAQw /iYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=F0tdNJIRRaI2CKblutNUn5ZxrmtAEp1IukyUwjA6V8I=; fh=6l3Q9dGGcCg3BxSQLqAFMFzzgxZOZcLP1hOlhhkBSH8=; b=kIAyPcobedLyTEoC1VFllYRshNDFZp6EbSPNSYTRZXXDcXYsNadHHjavEJPpoL5Kl0 9nX055iiDj16ZY1ULlqVePZnZAcEN803W+UkB2tD2tbsit5EQC1bbY36hOE/CKZtVCWE 4IUWFAi0FlyLB8CdtKZdp4WRGtjPwXvXo5kAMIgDYWbWdJRZApVgSKWoYZaFPYY930qh XikBruwey1aspcihHxZaUJfsI5raRF+7iS2SCktSXiPRLvTKh2PRbTz7XzpXUHLmwrd5 2OEDoUlO98R6xFvhbY5UTS4SNqjdYhsV2r62N+Bp++lTMjhwyZI9DfJpdb0KDtAMY8XL Gk+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CyK+8K30; 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 v5-20020a632f05000000b00563e15edb8csi7439528pgv.360.2023.08.08.13.34.51; Tue, 08 Aug 2023 13:35:02 -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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CyK+8K30; 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 S229695AbjHHTzw (ORCPT + 99 others); Tue, 8 Aug 2023 15:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232250AbjHHTzd (ORCPT ); Tue, 8 Aug 2023 15:55:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4917F6A398 for ; Tue, 8 Aug 2023 11:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=F0tdNJIRRaI2CKblutNUn5ZxrmtAEp1IukyUwjA6V8I=; b=CyK+8K30AGzHC/bxjc3iPjhFBq /Pzq76cxAlSOkm8vRjkiTmd8No/458VSrwqk6agf/RH0Iric780uAes5qXVOC9ZaqaZKrn1Icz1zD Vug5TxvXR5RuCJyxNtZwm4d/qvMjkHj2T+1jl1i11DK/aV72vhUujtG2HGWZCBq8C+sWLx07CdZmH i8aXndeNraM9qcfoz3VAWqiyWOTJ/5iMZVJNy6dRILFtf/irBT9m2cY+F/McrE4mMwQBf7xwuyBsX 7mxkV2bWlxz7Ggcvlnm9ethMO46njv8pBoOHsG4lW/kc5FxDeKLgx6lON6drYLm7R7qrN3fOkMhxp b1vISzFQ==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qTPGv-002uKd-0V; Tue, 08 Aug 2023 16:09:25 +0000 Message-ID: <828497a6-80c2-329f-8b47-2311bf08943d@infradead.org> Date: Tue, 8 Aug 2023 09:09:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v2] powerpc: Use shared font data Content-Language: en-US To: linux@treblig.org, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, sam@ravnborg.org, benh@kernel.crashing.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20230807010721.799613-1-linux@treblig.org> From: Randy Dunlap In-Reply-To: <20230807010721.799613-1-linux@treblig.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham 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 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. -- ~Randy