* Applied "ASoC: sun8i-codec-analog: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-33-yuehaibing@huawei.com>
The patch
ASoC: sun8i-codec-analog: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 e12fd61fd7c1bbbb758ede9fdf58ac2bd5de6b33 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:36 +0800
Subject: [PATCH] ASoC: sun8i-codec-analog: use
devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-33-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sunxi/sun8i-codec-analog.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
index e92aeedd6feb..be872eefa61e 100644
--- a/sound/soc/sunxi/sun8i-codec-analog.c
+++ b/sound/soc/sunxi/sun8i-codec-analog.c
@@ -819,12 +819,10 @@ MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match);
static int sun8i_codec_analog_probe(struct platform_device *pdev)
{
- struct resource *res;
struct regmap *regmap;
void __iomem *base;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base)) {
dev_err(&pdev->dev, "Failed to map the registers\n");
return PTR_ERR(base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: spear: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-13-yuehaibing@huawei.com>
The patch
ASoC: spear: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 0fb46f541bb3e6e5bbb155c08b9e75f92c21acb9 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:16 +0800
Subject: [PATCH] ASoC: spear: use devm_platform_ioremap_resource() to simplify
code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-13-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/spear/spdif_in.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index 78a6a360b4a6..4b68d6ee75da 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -202,12 +202,11 @@ static int spdif_in_probe(struct platform_device *pdev)
{
struct spdif_in_dev *host;
struct spear_spdif_platform_data *pdata;
- struct resource *res, *res_fifo;
+ struct resource *res_fifo;
void __iomem *io_base;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- io_base = devm_ioremap_resource(&pdev->dev, res);
+ io_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(io_base))
return PTR_ERR(io_base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: mxs-saif: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-12-yuehaibing@huawei.com>
The patch
ASoC: mxs-saif: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 1327bfe2887c0e29bcdc0c5c3e445da107ccb4e2 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:15 +0800
Subject: [PATCH] ASoC: mxs-saif: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-12-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mxs/mxs-saif.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 269b6d6df250..a2c79426513b 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -732,7 +732,6 @@ static int mxs_saif_mclk_init(struct platform_device *pdev)
static int mxs_saif_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- struct resource *iores;
struct mxs_saif *saif;
int irq, ret = 0;
struct device_node *master;
@@ -786,9 +785,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
return ret;
}
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- saif->base = devm_ioremap_resource(&pdev->dev, iores);
+ saif->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(saif->base))
return PTR_ERR(saif->base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: sirf: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-11-yuehaibing@huawei.com>
The patch
ASoC: sirf: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 c9dbe688983b1d77a9a46cf6b7ac88348a1ca395 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:14 +0800
Subject: [PATCH] ASoC: sirf: use devm_platform_ioremap_resource() to simplify
code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-11-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sirf/sirf-usp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/sirf/sirf-usp.c b/sound/soc/sirf/sirf-usp.c
index 8bab119c753a..2af0c6f14ee6 100644
--- a/sound/soc/sirf/sirf-usp.c
+++ b/sound/soc/sirf/sirf-usp.c
@@ -359,7 +359,6 @@ static int sirf_usp_pcm_probe(struct platform_device *pdev)
int ret;
struct sirf_usp *usp;
void __iomem *base;
- struct resource *mem_res;
usp = devm_kzalloc(&pdev->dev, sizeof(struct sirf_usp),
GFP_KERNEL);
@@ -368,8 +367,7 @@ static int sirf_usp_pcm_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, usp);
- mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, mem_res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
usp->regmap = devm_regmap_init_mmio(&pdev->dev, base,
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: ep93xx-i2s: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-5-yuehaibing@huawei.com>
The patch
ASoC: ep93xx-i2s: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 4b3540074361fc7b97f2da54365c55ceca6333d2 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:08 +0800
Subject: [PATCH] ASoC: ep93xx-i2s: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-5-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/cirrus/ep93xx-i2s.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 0b4355e95f84..7d9cf67129d4 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -430,15 +430,13 @@ static const struct snd_soc_component_driver ep93xx_i2s_component = {
static int ep93xx_i2s_probe(struct platform_device *pdev)
{
struct ep93xx_i2s_info *info;
- struct resource *res;
int err;
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- info->regs = devm_ioremap_resource(&pdev->dev, res);
+ info->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(info->regs))
return PTR_ERR(info->regs);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: fsl_audmix: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-9-yuehaibing@huawei.com>
The patch
ASoC: fsl_audmix: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 959bb6b54d708652fe06097feecc3acd4d6b8c89 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:12 +0800
Subject: [PATCH] ASoC: fsl_audmix: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-9-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/fsl/fsl_audmix.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index 3897a54a11fe..c7e4e9757dce 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -458,7 +458,6 @@ static int fsl_audmix_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct fsl_audmix *priv;
- struct resource *res;
const char *mdrv;
const struct of_device_id *of_id;
void __iomem *regs;
@@ -475,8 +474,7 @@ static int fsl_audmix_probe(struct platform_device *pdev)
return -ENOMEM;
/* Get the addresses */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(dev, res);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: bcm2835-i2s: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-10-yuehaibing@huawei.com>
The patch
ASoC: bcm2835-i2s: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 d400b1b30cbff1c0962bbb3f895e839ccd120cb7 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:13 +0800
Subject: [PATCH] ASoC: bcm2835-i2s: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-10-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/bcm/bcm2835-i2s.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 5ef80f3d446a..e6a12e271b07 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -828,7 +828,6 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
{
struct bcm2835_i2s_dev *dev;
int ret;
- struct resource *mem;
void __iomem *base;
const __be32 *addr;
dma_addr_t dma_base;
@@ -848,8 +847,7 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
}
/* Request ioarea */
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, mem);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: mt6797: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-7-yuehaibing@huawei.com>
The patch
ASoC: mt6797: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 61e799e3658952397da80f6c2e3581e7b65209a8 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:10 +0800
Subject: [PATCH] ASoC: mt6797: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-7-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
index 08a6532da322..e52c032d53aa 100644
--- a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
+++ b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
@@ -749,7 +749,6 @@ static int mt6797_afe_pcm_dev_probe(struct platform_device *pdev)
{
struct mtk_base_afe *afe;
struct mt6797_afe_private *afe_priv;
- struct resource *res;
struct device *dev;
int i, irq_id, ret;
@@ -774,9 +773,7 @@ static int mt6797_afe_pcm_dev_probe(struct platform_device *pdev)
}
/* regmap init */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- afe->base_addr = devm_ioremap_resource(&pdev->dev, res);
+ afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: mt8173: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-6-yuehaibing@huawei.com>
The patch
ASoC: mt8173: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 fceef72b68d63593d8543a8d608ccc8427e13d56 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:09 +0800
Subject: [PATCH] ASoC: mt8173: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-6-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
index 0382896c162e..90bd2c92cae7 100644
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
@@ -1056,7 +1056,6 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
int irq_id;
struct mtk_base_afe *afe;
struct mt8173_afe_private *afe_priv;
- struct resource *res;
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(33));
if (ret)
@@ -1086,8 +1085,7 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- afe->base_addr = devm_ioremap_resource(&pdev->dev, res);
+ afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: imx-audmux: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-8-yuehaibing@huawei.com>
The patch
ASoC: imx-audmux: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 d003e3081c1d069b94d1b5f4c3bc8234d4603282 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:11 +0800
Subject: [PATCH] ASoC: imx-audmux: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-8-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/fsl/imx-audmux.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index b2351cd33b0f..7595f24a006e 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -298,12 +298,10 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
static int imx_audmux_probe(struct platform_device *pdev)
{
- struct resource *res;
const struct of_device_id *of_id =
of_match_device(imx_audmux_dt_ids, &pdev->dev);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- audmux_base = devm_ioremap_resource(&pdev->dev, res);
+ audmux_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(audmux_base))
return PTR_ERR(audmux_base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: rockchip: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-4-yuehaibing@huawei.com>
The patch
ASoC: rockchip: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 f052172a5bb474fef2d0c3911655c9e107a3c024 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:07 +0800
Subject: [PATCH] ASoC: rockchip: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-4-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rk3328_codec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c
index 24f8f86d58e9..287c962ba00d 100644
--- a/sound/soc/codecs/rk3328_codec.c
+++ b/sound/soc/codecs/rk3328_codec.c
@@ -432,7 +432,6 @@ static int rk3328_platform_probe(struct platform_device *pdev)
{
struct device_node *rk3328_np = pdev->dev.of_node;
struct rk3328_codec_priv *rk3328;
- struct resource *res;
struct regmap *grf;
void __iomem *base;
int ret = 0;
@@ -482,8 +481,7 @@ static int rk3328_platform_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: tegra20_das: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-2-yuehaibing@huawei.com>
The patch
ASoC: tegra20_das: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 21cc4ea85879c1b424fb01caa6e481c14286f7f0 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:05 +0800
Subject: [PATCH] ASoC: tegra20_das: use devm_platform_ioremap_resource() to
simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-2-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/tegra/tegra20_das.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c
index 10f9c3b19c88..1070b2710d5e 100644
--- a/sound/soc/tegra/tegra20_das.c
+++ b/sound/soc/tegra/tegra20_das.c
@@ -120,7 +120,6 @@ static const struct regmap_config tegra20_das_regmap_config = {
static int tegra20_das_probe(struct platform_device *pdev)
{
- struct resource *res;
void __iomem *regs;
int ret = 0;
@@ -134,8 +133,7 @@ static int tegra20_das_probe(struct platform_device *pdev)
}
das->dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(&pdev->dev, res);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
goto err;
--
2.20.1
^ permalink raw reply related
* Applied "ASoC: tegra: use devm_platform_ioremap_resource() to simplify code" to the asoc tree
From: Mark Brown @ 2019-07-31 11:29 UTC (permalink / raw)
To: YueHaibing
Cc: mripard, alsa-devel, olivier.moysan, Xiubo.Lee, linux-kernel,
paul, jcmvbkbc, thierry.reding, shawnguo, festevam, linux-stm32,
jbrunet, f.fainelli, khilman, tiwai, michal.simek, jonathanh,
Hulk Robot, wens, bcm-kernel-feedback-list, linux-imx, s.hauer,
matthias.bgg, linux-xtensa, alexandre.torgue, yamada.masahiro,
rjui, robert.jarzmik, haojian.zhuang, nicoleotsuka, Mark Brown,
linux-mediatek, linux-rpi-kernel, linux-tegra, linux-amlogic,
perex, linux-arm-kernel, mcoquelin.stm32, baohua, timur, sbranden,
eric, gregkh, arnaud.pouliquen, lgirdwood, wahrenst, kernel,
linuxppc-dev, daniel
In-Reply-To: <20190727150738.54764-3-yuehaibing@huawei.com>
The patch
ASoC: tegra: use devm_platform_ioremap_resource() to simplify code
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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 7d22808641cdea50baeae636acf5d592a7aa1239 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 27 Jul 2019 23:07:06 +0800
Subject: [PATCH] ASoC: tegra: use devm_platform_ioremap_resource() to simplify
code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-3-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/tegra/tegra30_i2s.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index ac6983c6bd72..e6d548fa980b 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -368,7 +368,6 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
struct tegra30_i2s *i2s;
const struct of_device_id *match;
u32 cif_ids[2];
- struct resource *mem;
void __iomem *regs;
int ret;
@@ -406,8 +405,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
goto err;
}
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(&pdev->dev, mem);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
goto err_clk_put;
--
2.20.1
^ permalink raw reply related
* Re: [PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform
From: Michael Ellerman @ 2019-07-31 11:37 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev
In-Reply-To: <166d8f54-50b8-648d-f839-bee788e68abf@linux.ibm.com>
Andrew Donnellan <ajd@linux.ibm.com> writes:
> On 9/5/19 3:11 pm, Andrew Donnellan wrote:
>> The powernv platform is the only one that directly accesses SCOMs. Move the
>> support code to platforms/powernv, and get rid of the PPC_SCOM Kconfig
>> option, as SCOM support is always selected when compiling for powernv.
>>
>> This also means that the Kconfig item for CONFIG_SCOM_DEBUGFS will actually
>> show up in menuconfig, as previously it was the only labelled option in
>> sysdev/Kconfig and wasn't actually in a menu.
>
> As I've just realised, this isn't actually correct - the option does
> indeed show up... in the root menu, where I've just been trained to
> ignore it, and where you won't get a menu location if you try to search
> for it using / in menuconfig.
>
> I think moving it to the platform menu is obviously a better location.
> mpe would you be able to fix up the commit message in merge?
Yes, done.
cheers
^ permalink raw reply
* [Bug 204375] kernel 5.2.4 w. KASAN enabled fails to boot on a PowerMac G4 3,6 at very early stage
From: bugzilla-daemon @ 2019-07-31 11:37 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <bug-204375-206035@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=204375
--- Comment #10 from Christophe Leroy (christophe.leroy@c-s.fr) ---
Yes feel free to take anything I have attached here.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply
* Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA
From: Michal Hocko @ 2019-07-31 11:40 UTC (permalink / raw)
To: Mike Rapoport
Cc: Heiko Carstens, open list:MEMORY MANAGEMENT, Paul Mackerras,
H . Peter Anvin, sparclinux@vger.kernel.org, Alexander Duyck,
Will Deacon, linux-s390@vger.kernel.org, x86@kernel.org,
willy@infradead.org, Christian Borntraeger, Ingo Molnar,
Hoan Tran OS, Catalin Marinas, Open Source Submission,
Pavel Tatashin, Vasily Gorbik, Will Deacon, Borislav Petkov,
Thomas Gleixner, Vlastimil Babka, Oscar Salvador,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Andrew Morton,
linuxppc-dev@lists.ozlabs.org, David S . Miller
In-Reply-To: <20190731111422.GA14538@rapoport-lnx>
On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:
> > On Wed 31-07-19 09:24:21, Mike Rapoport wrote:
> > > [ sorry for a late reply too, somehow I missed this thread before ]
> > >
> > > On Tue, Jul 30, 2019 at 10:14:15AM +0200, Michal Hocko wrote:
> > > > [Sorry for a late reply]
> > > >
> > > > On Mon 15-07-19 17:55:07, Hoan Tran OS wrote:
> > > > > Hi,
> > > > >
> > > > > On 7/12/19 10:00 PM, Michal Hocko wrote:
> > > > [...]
> > > > > > Hmm, I thought this was selectable. But I am obviously wrong here.
> > > > > > Looking more closely, it seems that this is indeed only about
> > > > > > __early_pfn_to_nid and as such not something that should add a config
> > > > > > symbol. This should have been called out in the changelog though.
> > > > >
> > > > > Yes, do you have any other comments about my patch?
> > > >
> > > > Not really. Just make sure to explicitly state that
> > > > CONFIG_NODES_SPAN_OTHER_NODES is only about __early_pfn_to_nid and that
> > > > doesn't really deserve it's own config and can be pulled under NUMA.
> > > >
> > > > > > Also while at it, does HAVE_MEMBLOCK_NODE_MAP fall into a similar
> > > > > > bucket? Do we have any NUMA architecture that doesn't enable it?
> > > > > >
> > >
> > > HAVE_MEMBLOCK_NODE_MAP makes huge difference in node/zone initialization
> > > sequence so it's not only about a singe function.
> >
> > The question is whether we want to have this a config option or enable
> > it unconditionally for each NUMA system.
>
> We can make it 'default NUMA', but we can't drop it completely because
> microblaze uses sparse_memory_present_with_active_regions() which is
> unavailable when HAVE_MEMBLOCK_NODE_MAP=n.
I suppose you mean that microblaze is using
sparse_memory_present_with_active_regions even without CONFIG_NUMA,
right? I have to confess I do not understand that code. What is the deal
with setting node id there?
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH v2] powerpc/powernv: Restrict OPAL symbol map to only be readable by root
From: Michael Ellerman @ 2019-07-31 11:43 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev; +Cc: Jordan Niethe, stable, Stewart Smith
In-Reply-To: <2a934abd-07c0-2741-8f2e-b9224abde005@linux.ibm.com>
Andrew Donnellan <ajd@linux.ibm.com> writes:
> On 3/5/19 5:52 pm, Andrew Donnellan wrote:
>> Currently the OPAL symbol map is globally readable, which seems bad as it
>> contains physical addresses.
>>
>> Restrict it to root.
>>
>> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: Jordan Niethe <jniethe5@gmail.com>
>> Cc: Stewart Smith <stewart@linux.ibm.com>
>> Fixes: c8742f85125d ("powerpc/powernv: Expose OPAL firmware symbol map")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
>
> mpe: ping?
Picked up for v5.4.
cheers
^ permalink raw reply
* Re: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through
From: Michael Ellerman @ 2019-07-31 11:46 UTC (permalink / raw)
To: Kees Cook
Cc: Stephen Rothwell, Gustavo A. R. Silva, PowerPC,
Linux kernel Mailing List
In-Reply-To: <201907301005.0661E63CF@keescook>
Kees Cook <keescook@chromium.org> writes:
> On Wed, Jul 31, 2019 at 12:28:55AM +1000, Michael Ellerman wrote:
>> Stephen Rothwell <sfr@canb.auug.org.au> writes:
>> > Mark switch cases where we are expecting to fall through.
>> >
>> > This patch fixes the following warning (Building: powerpc):
>> >
>> > drivers/macintosh/smu.c: In function 'smu_queue_i2c':
>> > drivers/macintosh/smu.c:854:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
>> > cmd->info.devaddr &= 0xfe;
>> > ~~~~~~~~~~~~~~~~~~^~~~~~~
>> > drivers/macintosh/smu.c:855:2: note: here
>> > case SMU_I2C_TRANSFER_STDSUB:
>> > ^~~~
>> >
>> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> > Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> > Cc: Kees Cook <keescook@chromium.org>
>> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> > ---
>> > drivers/macintosh/smu.c | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
>> > index 276065c888bc..23f1f41c8602 100644
>> > --- a/drivers/macintosh/smu.c
>> > +++ b/drivers/macintosh/smu.c
>> > @@ -852,6 +852,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd)
>> > break;
>> > case SMU_I2C_TRANSFER_COMBINED:
>> > cmd->info.devaddr &= 0xfe;
>> > + /* fall through */
>> > case SMU_I2C_TRANSFER_STDSUB:
>> > if (cmd->info.sublen > 3)
>> > return -EINVAL;
>>
>> Why do we think it's an expected fall through? I can't really convince
>> myself from the surrounding code that it's definitely intentional.
>
> Yeah, good question. Just now when I went looking for who
> used SMU_I2C_TRANSFER_COMBINED, I found the only caller in
> arch/powerpc/platforms/powermac/low_i2c.c and it is clearly using a
> fall-through for building the command for "stdsub" and "combined",
> so I think that's justification enough:
>
> switch(bus->mode) {
> case pmac_i2c_mode_std:
> if (subsize != 0)
> return -EINVAL;
> cmd->info.type = SMU_I2C_TRANSFER_SIMPLE;
> break;
> case pmac_i2c_mode_stdsub:
> case pmac_i2c_mode_combined:
> if (subsize > 3 || subsize < 1)
> return -EINVAL;
> cmd->info.sublen = subsize;
> /* that's big-endian only but heh ! */
> memcpy(&cmd->info.subaddr, ((char *)&subaddr) + (4 - subsize),
> subsize);
> if (bus->mode == pmac_i2c_mode_stdsub)
> cmd->info.type = SMU_I2C_TRANSFER_STDSUB;
> else
> cmd->info.type = SMU_I2C_TRANSFER_COMBINED;
>
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
Thanks.
cheers
^ permalink raw reply
* Re: [PATCH 107/107] perf vendor events power9: Added missing event descriptions
From: Michael Ellerman @ 2019-07-31 11:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ingo Molnar, Thomas Gleixner
Cc: Arnaldo Carvalho de Melo, Madhavan Srinivasan, linuxppc-dev,
Clark Williams, linux-kernel, linux-perf-users, Michael Petlan,
Paul Clarke, Jiri Olsa, Namhyung Kim, Naveen N . Rao,
Sukadev Bhattiprolu, Carl Love
In-Reply-To: <20190730025610.22603-108-acme@kernel.org>
Arnaldo Carvalho de Melo <acme@kernel.org> writes:
> From: Michael Petlan <mpetlan@redhat.com>
>
> Documentation source:
>
> https://wiki.raptorcs.com/w/images/6/6b/POWER9_PMU_UG_v12_28NOV2018_pub.pdf
>
> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
> Cc: Carl Love <cel@us.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> Cc: Paul Clarke <pc@us.ibm.com>
> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Cc: linuxppc-dev@ozlabs.org
> LPU-Reference: 20190719100837.7503-1-mpetlan@redhat.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply
* Re: [Bug 204371] BUG kmalloc-4k (Tainted: G W ): Object padding overwritten
From: Michael Ellerman @ 2019-07-31 12:00 UTC (permalink / raw)
To: bugzilla-daemon, linuxppc-dev
In-Reply-To: <bug-204371-206035-O9m4mwJN9f@https.bugzilla.kernel.org/>
bugzilla-daemon@bugzilla.kernel.org writes:
> https://bugzilla.kernel.org/show_bug.cgi?id=204371
>
> --- Comment #2 from Andrew Morton (akpm@linux-foundation.org) ---
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
>
> On Mon, 29 Jul 2019 22:35:48 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=204371
>>
>> Bug ID: 204371
>> Summary: BUG kmalloc-4k (Tainted: G W ): Object
>> padding overwritten
>> Product: Memory Management
>> Version: 2.5
>> Kernel Version: 5.3.0-rc2
>> Hardware: PPC-32
>> OS: Linux
>> Tree: Mainline
>> Status: NEW
>> Severity: normal
>> Priority: P1
>> Component: Slab Allocator
>> Assignee: akpm@linux-foundation.org
>> Reporter: erhard_f@mailbox.org
>> Regression: No
>
> cc'ing various people here.
>
> I suspect proc_cgroup_show() is innocent and that perhaps
> bpf_prepare_filter() had a memory scribble. iirc there has been at
> least one recent pretty serious bpf fix applied recently. Can others
> please take a look?
I haven't been able to reproduce this on a 64-bit or 32-bit powerpc
machine here. But I don't run gentoo userspace, so I suspect I'm not
tripping the same path at boot. I did run the seccomp selftest and that
didn't trip it either.
cheers
^ permalink raw reply
* Re: [PATCH v2 5/5] powerpc/configs: Disable SCOM_DEBUGFS in powernv_defconfig
From: Michael Ellerman @ 2019-07-31 12:00 UTC (permalink / raw)
To: Andrew Donnellan, Nicholas Piggin, linuxppc-dev
In-Reply-To: <f6c744a6-3c25-c7a0-f4bf-b3ca239068f9@linux.ibm.com>
Andrew Donnellan <ajd@linux.ibm.com> writes:
> On 9/5/19 3:54 pm, Andrew Donnellan wrote:
>> On 9/5/19 3:37 pm, Nicholas Piggin wrote:
>>> Andrew Donnellan's on May 9, 2019 3:11 pm:
>>>> SCOM_DEBUGFS is really not needed for anything other than low-level
>>>> hardware debugging.
>>>>
>>>> opal-prd uses its own interface (/dev/prd) for SCOM access, so it
>>>> doesn't
>>>> need SCOM_DEBUGFS.
>>>>
>>>> At some point in the future we'll introduce a debug config fragment
>>>> where
>>>> this can go instead.
>>>
>>> That doesn't really explain why you want to disable it. It is useful
>>> for low level hardware debugging, I added it.
>>>
>>> obscurity^Wsecurity?
>>
>> Mostly just a general feeling that it's not something we need to have by
>> default. Security-wise, PRD still provides SCOM access, though we are
>> going to look at how we can further lock that down. Shrinks the build by
>> only a few kilobytes...
>>
>> mpe said he's planning on adding a debug.config where we can shift stuff
>> like this, and if/when we do that I would like to see this moved there,
>> but perhaps this patch can wait until then. I'll let mpe decide.
>
> mpe do you have thoughts on this? I would like to see at least the rest
> of this series merged.
I think it should be off by default, it may be true that root can
attack/break the system in many other ways, but providing unrestricted
SCOM access is a pretty big opening.
This is similar to strict /dev/mem IMO, which "everyone" agrees is a
good idea these days.
It's pretty trivial for folks doing development to turn it on in their
local trees, and I would also welcome a debug.config fragment that
enables it.
So I'll take the whole series.
cheers
^ permalink raw reply
* Re: [PATCH] powerpc: Use nid as fallback for chip_id
From: Srikar Dronamraju @ 2019-07-31 12:09 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Vasant Hegde, Vaidyanathan Srinivasan, linuxppc-dev
In-Reply-To: <87lfwhypv0.fsf@concordia.ellerman.id.au>
* Michael Ellerman <mpe@ellerman.id.au> [2019-07-29 22:41:55]:
> >
> > + chip_id = of_get_ibm_chip_id(np);
> > + if (chip_id == -1)
> > + chip_id = of_node_to_nid(np);
> > +
> > of_node_put(np);
> > - return of_get_ibm_chip_id(np);
> > + return chip_id;
> > }
>
> A nid is not a chip-id.
>
Agree that nid is not a chip-id.
> This obviously happens to work for the case you've identified above but
> it's not something I'm happy to merge in general.
>
Okay.
> We could do a similar change in the topology code, but I'd probably like
> it to be restricted to when we're running under PowerVM and there are no
> chip-ids found at all.
>
So for PowerNV case and KVM guest, of_get_ibm_chip_id() always seems to
returns a valid chip-id. Its *only* in the PowerVM case that we are
returning nid as the fallback chip-id.
Do you think checking for OPAL firmware would help?
chip_id = of_get_ibm_chip_id(np);
if (chip_id == -1 && !firmware_has_feature(FW_FEATURE_OPAL))
chip_id = of_node_to_nid(np);
of_node_put(np);
or should we do
int topology_physical_package_id(int cpu)
{
int chip_id = cpu_to_chip_id(cpu)
if (chip_id == -1 && !firmware_has_feature(FW_FEATURE_OPAL))
//Fallback to nid instead of chip-id.
....
return chip_id;
}
> I'm also not clear how it will interact with migration.
>
On migration, this function would be triggered when the cpumasks are getting
updated. So I would expect this to continue working.
Or Am I missing someother migration related quirk?
> cheers
>
The other alternative that I see is
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
* [Bug 204371] BUG kmalloc-4k (Tainted: G W ): Object padding overwritten
From: bugzilla-daemon @ 2019-07-31 12:09 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <bug-204371-206035@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=204371
--- Comment #4 from mpe@ellerman.id.au ---
bugzilla-daemon@bugzilla.kernel.org writes:
> https://bugzilla.kernel.org/show_bug.cgi?id=204371
>
> --- Comment #2 from Andrew Morton (akpm@linux-foundation.org) ---
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
>
> On Mon, 29 Jul 2019 22:35:48 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=204371
>>
>> Bug ID: 204371
>> Summary: BUG kmalloc-4k (Tainted: G W ): Object
>> padding overwritten
>> Product: Memory Management
>> Version: 2.5
>> Kernel Version: 5.3.0-rc2
>> Hardware: PPC-32
>> OS: Linux
>> Tree: Mainline
>> Status: NEW
>> Severity: normal
>> Priority: P1
>> Component: Slab Allocator
>> Assignee: akpm@linux-foundation.org
>> Reporter: erhard_f@mailbox.org
>> Regression: No
>
> cc'ing various people here.
>
> I suspect proc_cgroup_show() is innocent and that perhaps
> bpf_prepare_filter() had a memory scribble. iirc there has been at
> least one recent pretty serious bpf fix applied recently. Can others
> please take a look?
I haven't been able to reproduce this on a 64-bit or 32-bit powerpc
machine here. But I don't run gentoo userspace, so I suspect I'm not
tripping the same path at boot. I did run the seccomp selftest and that
didn't trip it either.
cheers
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply
* Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA
From: Mike Rapoport @ 2019-07-31 12:26 UTC (permalink / raw)
To: Michal Hocko
Cc: Heiko Carstens, open list:MEMORY MANAGEMENT, Paul Mackerras,
H . Peter Anvin, sparclinux@vger.kernel.org, Alexander Duyck,
Will Deacon, linux-s390@vger.kernel.org, x86@kernel.org,
willy@infradead.org, Christian Borntraeger, Ingo Molnar,
Hoan Tran OS, Catalin Marinas, Open Source Submission,
Pavel Tatashin, Vasily Gorbik, Will Deacon, Borislav Petkov,
Thomas Gleixner, Vlastimil Babka, Oscar Salvador,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Andrew Morton,
linuxppc-dev@lists.ozlabs.org, David S . Miller
In-Reply-To: <20190731114016.GI9330@dhcp22.suse.cz>
On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote:
> On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> > On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:
> > > On Wed 31-07-19 09:24:21, Mike Rapoport wrote:
> > > > [ sorry for a late reply too, somehow I missed this thread before ]
> > > >
> > > > On Tue, Jul 30, 2019 at 10:14:15AM +0200, Michal Hocko wrote:
> > > > > [Sorry for a late reply]
> > > > >
> > > > > On Mon 15-07-19 17:55:07, Hoan Tran OS wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On 7/12/19 10:00 PM, Michal Hocko wrote:
> > > > > [...]
> > > > > > > Hmm, I thought this was selectable. But I am obviously wrong here.
> > > > > > > Looking more closely, it seems that this is indeed only about
> > > > > > > __early_pfn_to_nid and as such not something that should add a config
> > > > > > > symbol. This should have been called out in the changelog though.
> > > > > >
> > > > > > Yes, do you have any other comments about my patch?
> > > > >
> > > > > Not really. Just make sure to explicitly state that
> > > > > CONFIG_NODES_SPAN_OTHER_NODES is only about __early_pfn_to_nid and that
> > > > > doesn't really deserve it's own config and can be pulled under NUMA.
> > > > >
> > > > > > > Also while at it, does HAVE_MEMBLOCK_NODE_MAP fall into a similar
> > > > > > > bucket? Do we have any NUMA architecture that doesn't enable it?
> > > > > > >
> > > >
> > > > HAVE_MEMBLOCK_NODE_MAP makes huge difference in node/zone initialization
> > > > sequence so it's not only about a singe function.
> > >
> > > The question is whether we want to have this a config option or enable
> > > it unconditionally for each NUMA system.
> >
> > We can make it 'default NUMA', but we can't drop it completely because
> > microblaze uses sparse_memory_present_with_active_regions() which is
> > unavailable when HAVE_MEMBLOCK_NODE_MAP=n.
>
> I suppose you mean that microblaze is using
> sparse_memory_present_with_active_regions even without CONFIG_NUMA,
> right?
Yes.
> I have to confess I do not understand that code. What is the deal
> with setting node id there?
The sparse_memory_present_with_active_regions() iterates over
memblock.memory regions and uses the node id of each region as the
parameter to memory_present(). The assumption here is that sometime before
each region was assigned a proper non-negative node id.
microblaze uses device tree for memory enumeration and the current FDT code
does memblock_add() that implicitly sets nid in memblock.memory regions to -1.
So in order to have proper node id passed to memory_present() microblaze
has to call memblock_set_node() before it can use
sparse_memory_present_with_active_regions().
> --
> Michal Hocko
> SUSE Labs
--
Sincerely yours,
Mike.
^ permalink raw reply
* [RFC PATCH] powerpc/64s/radix: introduce option to disable broadcast tlbie
From: Nicholas Piggin @ 2019-07-31 12:32 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Aneesh Kumar K . V, Paul Mackerras, Nicholas Piggin
This is an initial hack of a quick option to disable use of the tlbie
instruction. This takes the simplest possible initial pass of just
replacing low level tlbie functions with IPIs. This means it's not as
performant as it could be if we spend some time optmizing it, but on
the other hand having a 1:1 replacement of tlbie is simple and can be
useful for comparisons so I think it's the right initial approach.
It's not entirely complete, doesn't deal with accelerators (reverts to
tlbie), not all the boot code is converted, kernel space invalidations
not converted, and KVM not converted, also radix only to start with. We
can start to add more cases if this will be useful.
Thanks,
Nick
---
arch/powerpc/mm/book3s64/radix_tlb.c | 149 +++++++++++++++++++++++++--
1 file changed, 140 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3s64/radix_tlb.c
index 71f7fede2fa4..56ceecbd3d5c 100644
--- a/arch/powerpc/mm/book3s64/radix_tlb.c
+++ b/arch/powerpc/mm/book3s64/radix_tlb.c
@@ -11,6 +11,7 @@
#include <linux/mmu_context.h>
#include <linux/sched/mm.h>
+#include <asm/debugfs.h>
#include <asm/ppc-opcode.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
@@ -285,6 +286,30 @@ static inline void _tlbie_pid(unsigned long pid, unsigned long ric)
asm volatile("eieio; tlbsync; ptesync": : :"memory");
}
+struct tlbiel_pid {
+ unsigned long pid;
+ unsigned long ric;
+};
+
+static void do_tlbiel_pid(void *info)
+{
+ struct tlbiel_pid *t = info;
+
+ if (t->ric == RIC_FLUSH_TLB)
+ _tlbiel_pid(t->pid, RIC_FLUSH_TLB);
+ else if (t->ric == RIC_FLUSH_PWC)
+ _tlbiel_pid(t->pid, RIC_FLUSH_PWC);
+ else
+ _tlbiel_pid(t->pid, RIC_FLUSH_ALL);
+}
+
+static inline void _tlbiel_pid_broadcast(const struct cpumask *cpus,
+ unsigned long pid, unsigned long ric)
+{
+ struct tlbiel_pid t = { .pid = pid, .ric = ric };
+ on_each_cpu_mask(cpus, do_tlbiel_pid, &t, 1);
+}
+
static inline void _tlbiel_lpid(unsigned long lpid, unsigned long ric)
{
int set;
@@ -420,6 +445,61 @@ static __always_inline void _tlbie_va(unsigned long va, unsigned long pid,
asm volatile("eieio; tlbsync; ptesync": : :"memory");
}
+struct tlbiel_va {
+ unsigned long pid;
+ unsigned long va;
+ unsigned long psize;
+ unsigned long ric;
+};
+
+static void do_tlbiel_va(void *info)
+{
+ struct tlbiel_va *t = info;
+
+ if (t->ric == RIC_FLUSH_TLB)
+ _tlbiel_va(t->va, t->pid, t->psize, RIC_FLUSH_TLB);
+ else if (t->ric == RIC_FLUSH_PWC)
+ _tlbiel_va(t->va, t->pid, t->psize, RIC_FLUSH_PWC);
+ else
+ _tlbiel_va(t->va, t->pid, t->psize, RIC_FLUSH_ALL);
+}
+
+static inline void _tlbiel_va_broadcast(const struct cpumask *cpus,
+ unsigned long va, unsigned long pid,
+ unsigned long psize, unsigned long ric)
+{
+ struct tlbiel_va t = { .va = va, .pid = pid, .psize = psize, .ric = ric };
+ on_each_cpu_mask(cpus, do_tlbiel_va, &t, 1);
+}
+
+struct tlbiel_va_range {
+ unsigned long pid;
+ unsigned long start;
+ unsigned long end;
+ unsigned long page_size;
+ unsigned long psize;
+ bool also_pwc;
+};
+
+static void do_tlbiel_va_range(void *info)
+{
+ struct tlbiel_va_range *t = info;
+
+ _tlbiel_va_range(t->start, t->end, t->pid, t->page_size,
+ t->psize, t->also_pwc);
+}
+
+static inline void _tlbiel_va_range_broadcast(const struct cpumask *cpus,
+ unsigned long start, unsigned long end,
+ unsigned long pid, unsigned long page_size,
+ unsigned long psize, bool also_pwc)
+{
+ struct tlbiel_va_range t = { .start = start, .end = end,
+ .pid = pid, .page_size = page_size,
+ .psize = psize, .also_pwc = also_pwc };
+ on_each_cpu_mask(cpus, do_tlbiel_va_range, &t, 1);
+}
+
static __always_inline void _tlbie_lpid_va(unsigned long va, unsigned long lpid,
unsigned long psize, unsigned long ric)
{
@@ -524,6 +604,12 @@ static bool mm_needs_flush_escalation(struct mm_struct *mm)
return false;
}
+static bool tlbie_enabled = true;
+static bool use_tlbie(void)
+{
+ return tlbie_enabled;
+}
+
#ifdef CONFIG_SMP
static void do_exit_flush_lazy_tlb(void *arg)
{
@@ -582,8 +668,10 @@ void radix__flush_tlb_mm(struct mm_struct *mm)
if (mm_needs_flush_escalation(mm))
_tlbie_pid(pid, RIC_FLUSH_ALL);
- else
+ else if (use_tlbie())
_tlbie_pid(pid, RIC_FLUSH_TLB);
+ else
+ _tlbiel_pid_broadcast(mm_cpumask(mm), pid, RIC_FLUSH_TLB);
} else {
local:
_tlbiel_pid(pid, RIC_FLUSH_TLB);
@@ -609,7 +697,10 @@ static void __flush_all_mm(struct mm_struct *mm, bool fullmm)
goto local;
}
}
- _tlbie_pid(pid, RIC_FLUSH_ALL);
+ if (mm_needs_flush_escalation(mm) || use_tlbie())
+ _tlbie_pid(pid, RIC_FLUSH_ALL);
+ else
+ _tlbiel_pid_broadcast(mm_cpumask(mm), pid, RIC_FLUSH_ALL);
} else {
local:
_tlbiel_pid(pid, RIC_FLUSH_ALL);
@@ -644,7 +735,11 @@ void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr,
exit_flush_lazy_tlbs(mm);
goto local;
}
- _tlbie_va(vmaddr, pid, psize, RIC_FLUSH_TLB);
+ if (mm_needs_flush_escalation(mm) || use_tlbie())
+ _tlbie_va(vmaddr, pid, psize, RIC_FLUSH_TLB);
+ else
+ _tlbiel_va_broadcast(mm_cpumask(mm),
+ vmaddr, pid, psize, RIC_FLUSH_TLB);
} else {
local:
_tlbiel_va(vmaddr, pid, psize, RIC_FLUSH_TLB);
@@ -731,8 +826,11 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
} else {
if (mm_needs_flush_escalation(mm))
_tlbie_pid(pid, RIC_FLUSH_ALL);
- else
+ else if (use_tlbie())
_tlbie_pid(pid, RIC_FLUSH_TLB);
+ else
+ _tlbiel_pid_broadcast(mm_cpumask(mm),
+ pid, RIC_FLUSH_TLB);
}
} else {
bool hflush = flush_all_sizes;
@@ -757,8 +855,8 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
gflush = false;
}
- asm volatile("ptesync": : :"memory");
if (local) {
+ asm volatile("ptesync": : :"memory");
__tlbiel_va_range(start, end, pid, page_size, mmu_virtual_psize);
if (hflush)
__tlbiel_va_range(hstart, hend, pid,
@@ -767,7 +865,8 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
__tlbiel_va_range(gstart, gend, pid,
PUD_SIZE, MMU_PAGE_1G);
asm volatile("ptesync": : :"memory");
- } else {
+ } else if (use_tlbie()) {
+ asm volatile("ptesync": : :"memory");
__tlbie_va_range(start, end, pid, page_size, mmu_virtual_psize);
if (hflush)
__tlbie_va_range(hstart, hend, pid,
@@ -777,6 +876,15 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
PUD_SIZE, MMU_PAGE_1G);
fixup_tlbie();
asm volatile("eieio; tlbsync; ptesync": : :"memory");
+ } else {
+ _tlbiel_va_range_broadcast(mm_cpumask(mm),
+ start, end, pid, page_size, mmu_virtual_psize, false);
+ if (hflush)
+ _tlbiel_va_range_broadcast(mm_cpumask(mm),
+ hstart, hend, pid, PMD_SIZE, MMU_PAGE_2M, false);
+ if (gflush)
+ _tlbiel_va_range_broadcast(mm_cpumask(mm),
+ gstart, gend, pid, PUD_SIZE, MMU_PAGE_1G, false);
}
}
preempt_enable();
@@ -969,13 +1077,22 @@ static __always_inline void __radix__flush_tlb_range_psize(struct mm_struct *mm,
if (mm_needs_flush_escalation(mm))
also_pwc = true;
- _tlbie_pid(pid, also_pwc ? RIC_FLUSH_ALL : RIC_FLUSH_TLB);
+ if (use_tlbie())
+ _tlbie_pid(pid,
+ also_pwc ? RIC_FLUSH_ALL : RIC_FLUSH_TLB);
+ else
+ _tlbiel_pid_broadcast(mm_cpumask(mm), pid,
+ also_pwc ? RIC_FLUSH_ALL : RIC_FLUSH_TLB);
+
}
} else {
if (local)
_tlbiel_va_range(start, end, pid, page_size, psize, also_pwc);
- else
+ else if (mm_needs_flush_escalation(mm) || use_tlbie())
_tlbie_va_range(start, end, pid, page_size, psize, also_pwc);
+ else
+ _tlbiel_va_range_broadcast(mm_cpumask(mm),
+ start, end, pid, page_size, psize, also_pwc);
}
preempt_enable();
}
@@ -1017,7 +1134,11 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
exit_flush_lazy_tlbs(mm);
goto local;
}
- _tlbie_va_range(addr, end, pid, PAGE_SIZE, mmu_virtual_psize, true);
+ if (mm_needs_flush_escalation(mm) || use_tlbie())
+ _tlbie_va_range(addr, end, pid, PAGE_SIZE, mmu_virtual_psize, true);
+ else
+ _tlbiel_va_range_broadcast(mm_cpumask(mm),
+ addr, end, pid, PAGE_SIZE, mmu_virtual_psize, true);
} else {
local:
_tlbiel_va_range(addr, end, pid, PAGE_SIZE, mmu_virtual_psize, true);
@@ -1100,3 +1221,13 @@ extern void radix_kvm_prefetch_workaround(struct mm_struct *mm)
}
EXPORT_SYMBOL_GPL(radix_kvm_prefetch_workaround);
#endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
+
+static int __init radix_tlb_setup(void)
+{
+ debugfs_create_bool("tlbie_enabled", 0600,
+ powerpc_debugfs_root,
+ &tlbie_enabled);
+
+ return 0;
+}
+arch_initcall(radix_tlb_setup);
--
2.22.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox