From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EE5DC433E6 for ; Wed, 17 Feb 2021 14:22:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CFA764E76 for ; Wed, 17 Feb 2021 14:22:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233448AbhBQOWg (ORCPT ); Wed, 17 Feb 2021 09:22:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:45350 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233314AbhBQOWU (ORCPT ); Wed, 17 Feb 2021 09:22:20 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 182F3B768; Wed, 17 Feb 2021 14:21:39 +0000 (UTC) Date: Wed, 17 Feb 2021 15:21:39 +0100 Message-ID: From: Takashi Iwai To: Greg Kroah-Hartman Cc: Luis Chamberlain , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 1/4] firmware: Add the support for ZSTD-compressed firmware files In-Reply-To: References: <20210127154939.13288-1-tiwai@suse.de> <20210127154939.13288-2-tiwai@suse.de> <20210217132419.GN4332@42.do-not-panic.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Feb 2021 15:17:52 +0100, Greg Kroah-Hartman wrote: > > On Wed, Feb 17, 2021 at 02:34:34PM +0100, Takashi Iwai wrote: > > On Wed, 17 Feb 2021 14:24:19 +0100, > > Luis Chamberlain wrote: > > > > > > On Wed, Jan 27, 2021 at 04:49:36PM +0100, Takashi Iwai wrote: > > > > Due to the popular demands on ZSTD, here is a patch to add a support > > > > of ZSTD-compressed firmware files via the direct firmware loader. > > > > It's just like XZ-compressed file support, providing a decompressor > > > > with ZSTD. Since ZSTD API can give the decompression size beforehand, > > > > the code is even simpler than XZ. > > > > > > > > Signed-off-by: Takashi Iwai > > > > > > It also occurs to me that having a simple like #define HAVE_FIRMWARE_COMPRESS_ZSTD > > > on include/linux/firmware.h would enable userspace to be aware (if they > > > have kernel sources) to determine if the kernels supports this format. > > > > Extending that idea, we might want to have a sysfs entry showing the > > supported formats instead? This will allow to judge dynamically. > > What could userspace do with that information? Decide whether to store the firmware files on the system in the supported compression format or not. But admittedly it can be little help, as that's rather information you want not for the running kernel but for the system to be installed... Takashi