From 5066fe1a3a64d8b699c572342c7673bab5f9fce8 Mon Sep 17 00:00:00 2001 From: Arun Shamanna Lakshmi Date: Thu, 2 Oct 2014 10:24:44 -0700 Subject: [PATCH] ASoC: tegra-alt: Use flat regcache When using RBTREE cache, there can be allocations the first time a register is accessed. This can cause an attempt to schedule while atomic in the case that the regmap is using a spinlock. This can be resolved by using a flat cache. Bug 200041820 Change-Id: Id69592cd5fadbb5ad9ccfdbb1f184733a332512c Signed-off-by: Arun Shamanna Lakshmi Reviewed-on: http://git-master/r/552940 --- sound/soc/tegra-alt/tegra210_admaif_alt.c | 2 +- sound/soc/tegra-alt/tegra210_adx_alt.c | 2 +- sound/soc/tegra-alt/tegra210_afc_alt.c | 2 +- sound/soc/tegra-alt/tegra210_amx_alt.c | 2 +- sound/soc/tegra-alt/tegra210_dmic_alt.c | 2 +- sound/soc/tegra-alt/tegra210_i2s_alt.c | 2 +- sound/soc/tegra-alt/tegra210_iqc_alt.c | 2 +- sound/soc/tegra-alt/tegra210_mbdrc_alt.c | 2 +- sound/soc/tegra-alt/tegra210_mixer_alt.c | 2 +- sound/soc/tegra-alt/tegra210_mvc_alt.c | 2 +- sound/soc/tegra-alt/tegra210_ope_alt.c | 2 +- sound/soc/tegra-alt/tegra210_peq_alt.c | 2 +- sound/soc/tegra-alt/tegra210_sfc_alt.c | 2 +- sound/soc/tegra-alt/tegra210_spdif_alt.c | 2 +- sound/soc/tegra-alt/tegra210_xbar_alt.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sound/soc/tegra-alt/tegra210_admaif_alt.c b/sound/soc/tegra-alt/tegra210_admaif_alt.c index 99ef4b5f..87fbbfe5 100644 --- a/sound/soc/tegra-alt/tegra210_admaif_alt.c +++ b/sound/soc/tegra-alt/tegra210_admaif_alt.c @@ -110,7 +110,7 @@ static const struct regmap_config tegra210_admaif_regmap_config = { .writeable_reg = tegra210_admaif_wr_reg, .readable_reg = tegra210_admaif_rd_reg, .volatile_reg = tegra210_admaif_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static void tegra210_admaif_global_enable(struct tegra210_admaif *admaif, diff --git a/sound/soc/tegra-alt/tegra210_adx_alt.c b/sound/soc/tegra-alt/tegra210_adx_alt.c index aabdcb65..15b00ee6 100644 --- a/sound/soc/tegra-alt/tegra210_adx_alt.c +++ b/sound/soc/tegra-alt/tegra210_adx_alt.c @@ -592,7 +592,7 @@ static const struct regmap_config tegra210_adx_regmap_config = { .writeable_reg = tegra210_adx_wr_reg, .readable_reg = tegra210_adx_rd_reg, .volatile_reg = tegra210_adx_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_adx_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_afc_alt.c b/sound/soc/tegra-alt/tegra210_afc_alt.c index ef3b6f81..1d8d3df0 100644 --- a/sound/soc/tegra-alt/tegra210_afc_alt.c +++ b/sound/soc/tegra-alt/tegra210_afc_alt.c @@ -325,7 +325,7 @@ static const struct regmap_config tegra210_afc_regmap_config = { .writeable_reg = tegra210_afc_wr_rd_reg, .readable_reg = tegra210_afc_wr_rd_reg, .volatile_reg = tegra210_afc_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_afc_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_amx_alt.c b/sound/soc/tegra-alt/tegra210_amx_alt.c index f7da5c12..d2f2502c 100644 --- a/sound/soc/tegra-alt/tegra210_amx_alt.c +++ b/sound/soc/tegra-alt/tegra210_amx_alt.c @@ -625,7 +625,7 @@ static const struct regmap_config tegra210_amx_regmap_config = { .writeable_reg = tegra210_amx_wr_reg, .readable_reg = tegra210_amx_rd_reg, .volatile_reg = tegra210_amx_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_amx_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_dmic_alt.c b/sound/soc/tegra-alt/tegra210_dmic_alt.c index aa2d3550..0ca2381c 100644 --- a/sound/soc/tegra-alt/tegra210_dmic_alt.c +++ b/sound/soc/tegra-alt/tegra210_dmic_alt.c @@ -270,7 +270,7 @@ static const struct regmap_config tegra210_dmic_regmap_config = { .readable_reg = tegra210_dmic_rd_reg, .volatile_reg = tegra210_dmic_volatile_reg, .precious_reg = NULL, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_dmic_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c index c4d32d26..ed7cea5b 100644 --- a/sound/soc/tegra-alt/tegra210_i2s_alt.c +++ b/sound/soc/tegra-alt/tegra210_i2s_alt.c @@ -721,7 +721,7 @@ static const struct regmap_config tegra210_i2s_regmap_config = { .writeable_reg = tegra210_i2s_wr_reg, .readable_reg = tegra210_i2s_rd_reg, .volatile_reg = tegra210_i2s_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_i2s_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_iqc_alt.c b/sound/soc/tegra-alt/tegra210_iqc_alt.c index fd752133..70eb61f2 100644 --- a/sound/soc/tegra-alt/tegra210_iqc_alt.c +++ b/sound/soc/tegra-alt/tegra210_iqc_alt.c @@ -289,7 +289,7 @@ static const struct regmap_config tegra210_iqc_regmap_config = { .writeable_reg = tegra210_iqc_wr_reg, .readable_reg = tegra210_iqc_rd_reg, .volatile_reg = tegra210_iqc_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_iqc_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_mbdrc_alt.c b/sound/soc/tegra-alt/tegra210_mbdrc_alt.c index fdb5378e..c0921666 100644 --- a/sound/soc/tegra-alt/tegra210_mbdrc_alt.c +++ b/sound/soc/tegra-alt/tegra210_mbdrc_alt.c @@ -579,7 +579,7 @@ static const struct regmap_config tegra210_mbdrc_regmap_config = { .readable_reg = tegra210_mbdrc_rd_reg, .volatile_reg = tegra210_mbdrc_volatile_reg, .precious_reg = tegra210_mbdrc_precious_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; int tegra210_mbdrc_codec_init(struct snd_soc_codec *codec) diff --git a/sound/soc/tegra-alt/tegra210_mixer_alt.c b/sound/soc/tegra-alt/tegra210_mixer_alt.c index d2a24673..acd29f13 100644 --- a/sound/soc/tegra-alt/tegra210_mixer_alt.c +++ b/sound/soc/tegra-alt/tegra210_mixer_alt.c @@ -524,7 +524,7 @@ static const struct regmap_config tegra210_mixer_regmap_config = { .readable_reg = tegra210_mixer_rd_reg, .volatile_reg = tegra210_mixer_volatile_reg, .precious_reg = tegra210_mixer_precious_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_mixer_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_mvc_alt.c b/sound/soc/tegra-alt/tegra210_mvc_alt.c index 8c413ffa..b4225665 100644 --- a/sound/soc/tegra-alt/tegra210_mvc_alt.c +++ b/sound/soc/tegra-alt/tegra210_mvc_alt.c @@ -369,7 +369,7 @@ static const struct regmap_config tegra210_mvc_regmap_config = { .writeable_reg = tegra210_mvc_wr_rd_reg, .readable_reg = tegra210_mvc_wr_rd_reg, .volatile_reg = tegra210_mvc_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_mvc_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_ope_alt.c b/sound/soc/tegra-alt/tegra210_ope_alt.c index ccc3676e..736e125f 100644 --- a/sound/soc/tegra-alt/tegra210_ope_alt.c +++ b/sound/soc/tegra-alt/tegra210_ope_alt.c @@ -283,7 +283,7 @@ static const struct regmap_config tegra210_ope_regmap_config = { .writeable_reg = tegra210_ope_wr_reg, .readable_reg = tegra210_ope_rd_reg, .volatile_reg = tegra210_ope_volatile_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_ope_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_peq_alt.c b/sound/soc/tegra-alt/tegra210_peq_alt.c index 1a76c678..cc175428 100644 --- a/sound/soc/tegra-alt/tegra210_peq_alt.c +++ b/sound/soc/tegra-alt/tegra210_peq_alt.c @@ -225,7 +225,7 @@ static const struct regmap_config tegra210_peq_regmap_config = { .readable_reg = tegra210_peq_rd_reg, .volatile_reg = tegra210_peq_volatile_reg, .precious_reg = tegra210_peq_precious_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; int tegra210_peq_codec_init(struct snd_soc_codec *codec) diff --git a/sound/soc/tegra-alt/tegra210_sfc_alt.c b/sound/soc/tegra-alt/tegra210_sfc_alt.c index 4a8721a9..a46a4b29 100644 --- a/sound/soc/tegra-alt/tegra210_sfc_alt.c +++ b/sound/soc/tegra-alt/tegra210_sfc_alt.c @@ -427,7 +427,7 @@ static const struct regmap_config tegra210_sfc_regmap_config = { .readable_reg = tegra210_sfc_rd_reg, .volatile_reg = tegra210_sfc_volatile_reg, .precious_reg = tegra210_sfc_precious_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_sfc_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_spdif_alt.c b/sound/soc/tegra-alt/tegra210_spdif_alt.c index 447151c3..9b74b6ca 100644 --- a/sound/soc/tegra-alt/tegra210_spdif_alt.c +++ b/sound/soc/tegra-alt/tegra210_spdif_alt.c @@ -315,7 +315,7 @@ static const struct regmap_config tegra210_spdif_regmap_config = { .max_register = TEGRA210_SPDIF_LCOEF_2_4_2, .writeable_reg = tegra210_spdif_wr_rd_reg, .readable_reg = tegra210_spdif_wr_rd_reg, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static const struct tegra210_spdif_soc_data soc_data_tegra210 = { diff --git a/sound/soc/tegra-alt/tegra210_xbar_alt.c b/sound/soc/tegra-alt/tegra210_xbar_alt.c index b68ee02a..7b735477 100644 --- a/sound/soc/tegra-alt/tegra210_xbar_alt.c +++ b/sound/soc/tegra-alt/tegra210_xbar_alt.c @@ -40,7 +40,7 @@ static const struct regmap_config tegra210_xbar_regmap_config = { .reg_stride = 4, .max_register = TEGRA210_XBAR_PART2_RX + (TEGRA210_XBAR_RX_STRIDE * (TEGRA210_XBAR_AUDIO_RX_COUNT - 1)), - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_FLAT, }; static int tegra210_xbar_runtime_suspend(struct device *dev)