Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbdFFTKk (ORCPT ); Tue, 6 Jun 2017 15:10:40 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:59094 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751445AbdFFTHC (ORCPT ); Tue, 6 Jun 2017 15:07:02 -0400 From: Mark Brown To: Jonas Gorski Cc: Mark Brown , linux-kernel@vger.kernel.org, Mark Brown , Greg Kroah-Hartman , Dimitris Papastamos , linux-kernel@vger.kernel.org In-Reply-To: <20170602131537.22180-1-jonas.gorski@gmail.com> Message-Id: Date: Tue, 06 Jun 2017 20:06:53 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "regmap: make LZO cache optional" to the regmap tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3302 Lines: 98 The patch regmap: make LZO cache optional has been applied to the regmap tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 34a730aa74c7c743f4ca9635e0d0b2479d6ed53c Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Fri, 2 Jun 2017 15:15:37 +0200 Subject: [PATCH] regmap: make LZO cache optional Commit 2cbbb579bcbe3 ("regmap: Add the LZO cache support") added support for LZO compression in regcache, but there were never any users added afterwards. Since LZO support itself has its own size, it currently is rather a deoptimization. So make it optional by introducing a symbol that can be selected by drivers wanting to make use of it. Saves e.g. ~46 kB on MIPS (size of LZO support + regcache LZO code). Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown --- drivers/base/regmap/Kconfig | 5 ++++- drivers/base/regmap/Makefile | 3 ++- drivers/base/regmap/regcache.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index db9d00c36a3e..48b3fc1ee514 100644 --- a/drivers/base/regmap/Kconfig +++ b/drivers/base/regmap/Kconfig @@ -4,9 +4,12 @@ config REGMAP default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ) + select IRQ_DOMAIN if REGMAP_IRQ + bool + +config REGCACHE_COMPRESSED select LZO_COMPRESS select LZO_DECOMPRESS - select IRQ_DOMAIN if REGMAP_IRQ bool config REGMAP_AC97 diff --git a/drivers/base/regmap/Makefile b/drivers/base/regmap/Makefile index 609e4c84f485..6271ea9b758a 100644 --- a/drivers/base/regmap/Makefile +++ b/drivers/base/regmap/Makefile @@ -2,7 +2,8 @@ CFLAGS_regmap.o := -I$(src) obj-$(CONFIG_REGMAP) += regmap.o regcache.o -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o +obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o +obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index b0a0dcf32fb7..f3a435ee5fe8 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -21,7 +21,9 @@ static const struct regcache_ops *cache_types[] = { ®cache_rbtree_ops, +#if IS_ENABLED(CONFIG_REGCHACHE_COMPRESSED) ®cache_lzo_ops, +#endif ®cache_flat_ops, }; -- 2.11.0