* [ulf.hansson-mmc:next 135/144] ERROR: "__ffsdi2" [drivers/mmc/host/meson-gx-mmc.ko] undefined!
@ 2017-08-31 0:21 kbuild test robot
2017-08-31 9:29 ` Jerome Brunet
0 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2017-08-31 0:21 UTC (permalink / raw)
To: Jerome Brunet; +Cc: kbuild-all, linux-mmc, Ulf Hansson
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next
head: a027b2c5fed78851e69fab395b02d127a7759fc7
commit: 033d7168595b5cb2f0983221f32cd2b33e10f343 [135/144] mmc: meson-gx: use CCF to handle the clock phases
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 033d7168595b5cb2f0983221f32cd2b33e10f343
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
>> ERROR: "__ffsdi2" [drivers/mmc/host/meson-gx-mmc.ko] undefined!
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62851 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mmc: meson-gx: fix __ffsdi2 undefined on arm32
2017-08-31 0:21 [ulf.hansson-mmc:next 135/144] ERROR: "__ffsdi2" [drivers/mmc/host/meson-gx-mmc.ko] undefined! kbuild test robot
@ 2017-08-31 9:29 ` Jerome Brunet
0 siblings, 0 replies; 5+ messages in thread
From: Jerome Brunet @ 2017-08-31 9:29 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Jerome Brunet, linux-mmc, Kevin Hilman, linux-amlogic
Using __bf_shf does not compile on arm 32 architecture.
This has gone unnoticed till now cause the driver is only used on arm64.
In addition, __bf_shf was already used in the driver without any issue.
It was used on a constant value, so the call was probably optimized
away.
Replace __bf_shf by __ffs fixes the problem
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Hi Ulf,
Sorry for not catching this earlier.
If you still intend to keep the series applied in next, here is a fixup patch
to squash with the offending commit during your rebase.
Regards
Jerome
drivers/mmc/host/meson-gx-mmc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2fa18faa7f0f..7d7aa2389b7c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -201,13 +201,13 @@ static int meson_mmc_clk_get_phase(struct clk_hw *hw)
u32 val;
val = readl(mmc->reg);
- p = (val & mmc->phase_mask) >> __bf_shf(mmc->phase_mask);
+ p = (val & mmc->phase_mask) >> __ffs(mmc->phase_mask);
degrees = p * 360 / phase_num;
if (mmc->delay_mask) {
period_ps = DIV_ROUND_UP((unsigned long)NSEC_PER_SEC * 1000,
clk_get_rate(hw->clk));
- d = (val & mmc->delay_mask) >> __bf_shf(mmc->delay_mask);
+ d = (val & mmc->delay_mask) >> __ffs(mmc->delay_mask);
degrees += d * mmc->delay_step_ps * 360 / period_ps;
degrees %= 360;
}
@@ -223,11 +223,11 @@ static void meson_mmc_apply_phase_delay(struct meson_mmc_phase *mmc,
val = readl(mmc->reg);
val &= ~mmc->phase_mask;
- val |= phase << __bf_shf(mmc->phase_mask);
+ val |= phase << __ffs(mmc->phase_mask);
if (mmc->delay_mask) {
val &= ~mmc->delay_mask;
- val |= delay << __bf_shf(mmc->delay_mask);
+ val |= delay << __ffs(mmc->delay_mask);
}
writel(val, mmc->reg);
@@ -254,7 +254,7 @@ static int meson_mmc_clk_set_phase(struct clk_hw *hw, int degrees)
r = do_div(p, 360 / phase_num);
d = DIV_ROUND_CLOSEST(r * period_ps,
360 * mmc->delay_step_ps);
- d = min(d, mmc->delay_mask >> __bf_shf(mmc->delay_mask));
+ d = min(d, mmc->delay_mask >> __ffs(mmc->delay_mask));
}
meson_mmc_apply_phase_delay(mmc, p, d);
@@ -518,7 +518,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
init.num_parents = MUX_CLK_NUM_PARENTS;
mux->reg = host->regs + SD_EMMC_CLOCK;
- mux->shift = __bf_shf(CLK_SRC_MASK);
+ mux->shift = __ffs(CLK_SRC_MASK);
mux->mask = CLK_SRC_MASK >> mux->shift;
mux->hw.init = &init;
@@ -540,7 +540,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
init.num_parents = 1;
div->reg = host->regs + SD_EMMC_CLOCK;
- div->shift = __bf_shf(CLK_DIV_MASK);
+ div->shift = __ffs(CLK_DIV_MASK);
div->width = __builtin_popcountl(CLK_DIV_MASK);
div->hw.init = &init;
div->flags = (CLK_DIVIDER_ONE_BASED |
--
2.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] mmc: meson-gx: fix __ffsdi2 undefined on arm32
@ 2017-08-31 9:29 ` Jerome Brunet
0 siblings, 0 replies; 5+ messages in thread
From: Jerome Brunet @ 2017-08-31 9:29 UTC (permalink / raw)
To: linus-amlogic
Using __bf_shf does not compile on arm 32 architecture.
This has gone unnoticed till now cause the driver is only used on arm64.
In addition, __bf_shf was already used in the driver without any issue.
It was used on a constant value, so the call was probably optimized
away.
Replace __bf_shf by __ffs fixes the problem
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Hi Ulf,
Sorry for not catching this earlier.
If you still intend to keep the series applied in next, here is a fixup patch
to squash with the offending commit during your rebase.
Regards
Jerome
drivers/mmc/host/meson-gx-mmc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2fa18faa7f0f..7d7aa2389b7c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -201,13 +201,13 @@ static int meson_mmc_clk_get_phase(struct clk_hw *hw)
u32 val;
val = readl(mmc->reg);
- p = (val & mmc->phase_mask) >> __bf_shf(mmc->phase_mask);
+ p = (val & mmc->phase_mask) >> __ffs(mmc->phase_mask);
degrees = p * 360 / phase_num;
if (mmc->delay_mask) {
period_ps = DIV_ROUND_UP((unsigned long)NSEC_PER_SEC * 1000,
clk_get_rate(hw->clk));
- d = (val & mmc->delay_mask) >> __bf_shf(mmc->delay_mask);
+ d = (val & mmc->delay_mask) >> __ffs(mmc->delay_mask);
degrees += d * mmc->delay_step_ps * 360 / period_ps;
degrees %= 360;
}
@@ -223,11 +223,11 @@ static void meson_mmc_apply_phase_delay(struct meson_mmc_phase *mmc,
val = readl(mmc->reg);
val &= ~mmc->phase_mask;
- val |= phase << __bf_shf(mmc->phase_mask);
+ val |= phase << __ffs(mmc->phase_mask);
if (mmc->delay_mask) {
val &= ~mmc->delay_mask;
- val |= delay << __bf_shf(mmc->delay_mask);
+ val |= delay << __ffs(mmc->delay_mask);
}
writel(val, mmc->reg);
@@ -254,7 +254,7 @@ static int meson_mmc_clk_set_phase(struct clk_hw *hw, int degrees)
r = do_div(p, 360 / phase_num);
d = DIV_ROUND_CLOSEST(r * period_ps,
360 * mmc->delay_step_ps);
- d = min(d, mmc->delay_mask >> __bf_shf(mmc->delay_mask));
+ d = min(d, mmc->delay_mask >> __ffs(mmc->delay_mask));
}
meson_mmc_apply_phase_delay(mmc, p, d);
@@ -518,7 +518,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
init.num_parents = MUX_CLK_NUM_PARENTS;
mux->reg = host->regs + SD_EMMC_CLOCK;
- mux->shift = __bf_shf(CLK_SRC_MASK);
+ mux->shift = __ffs(CLK_SRC_MASK);
mux->mask = CLK_SRC_MASK >> mux->shift;
mux->hw.init = &init;
@@ -540,7 +540,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
init.num_parents = 1;
div->reg = host->regs + SD_EMMC_CLOCK;
- div->shift = __bf_shf(CLK_DIV_MASK);
+ div->shift = __ffs(CLK_DIV_MASK);
div->width = __builtin_popcountl(CLK_DIV_MASK);
div->hw.init = &init;
div->flags = (CLK_DIVIDER_ONE_BASED |
--
2.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: meson-gx: fix __ffsdi2 undefined on arm32
2017-08-31 9:29 ` Jerome Brunet
@ 2017-08-31 10:45 ` Ulf Hansson
-1 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2017-08-31 10:45 UTC (permalink / raw)
To: Jerome Brunet; +Cc: linux-mmc, Kevin Hilman, open list:ARM/Amlogic Meson...
On 31 August 2017 at 11:29, Jerome Brunet <jbrunet@baylibre.com> wrote:
> Using __bf_shf does not compile on arm 32 architecture.
> This has gone unnoticed till now cause the driver is only used on arm64.
>
> In addition, __bf_shf was already used in the driver without any issue.
> It was used on a constant value, so the call was probably optimized
> away.
>
> Replace __bf_shf by __ffs fixes the problem
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Thanks, applied for next!
> ---
>
> Hi Ulf,
>
> Sorry for not catching this earlier.
> If you still intend to keep the series applied in next, here is a fixup patch
> to squash with the offending commit during your rebase.
I decided to put it on top. Thanks for posting the fixup quickly.
Kind regards
Uffe
>
> Regards
> Jerome
>
> drivers/mmc/host/meson-gx-mmc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 2fa18faa7f0f..7d7aa2389b7c 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -201,13 +201,13 @@ static int meson_mmc_clk_get_phase(struct clk_hw *hw)
> u32 val;
>
> val = readl(mmc->reg);
> - p = (val & mmc->phase_mask) >> __bf_shf(mmc->phase_mask);
> + p = (val & mmc->phase_mask) >> __ffs(mmc->phase_mask);
> degrees = p * 360 / phase_num;
>
> if (mmc->delay_mask) {
> period_ps = DIV_ROUND_UP((unsigned long)NSEC_PER_SEC * 1000,
> clk_get_rate(hw->clk));
> - d = (val & mmc->delay_mask) >> __bf_shf(mmc->delay_mask);
> + d = (val & mmc->delay_mask) >> __ffs(mmc->delay_mask);
> degrees += d * mmc->delay_step_ps * 360 / period_ps;
> degrees %= 360;
> }
> @@ -223,11 +223,11 @@ static void meson_mmc_apply_phase_delay(struct meson_mmc_phase *mmc,
>
> val = readl(mmc->reg);
> val &= ~mmc->phase_mask;
> - val |= phase << __bf_shf(mmc->phase_mask);
> + val |= phase << __ffs(mmc->phase_mask);
>
> if (mmc->delay_mask) {
> val &= ~mmc->delay_mask;
> - val |= delay << __bf_shf(mmc->delay_mask);
> + val |= delay << __ffs(mmc->delay_mask);
> }
>
> writel(val, mmc->reg);
> @@ -254,7 +254,7 @@ static int meson_mmc_clk_set_phase(struct clk_hw *hw, int degrees)
> r = do_div(p, 360 / phase_num);
> d = DIV_ROUND_CLOSEST(r * period_ps,
> 360 * mmc->delay_step_ps);
> - d = min(d, mmc->delay_mask >> __bf_shf(mmc->delay_mask));
> + d = min(d, mmc->delay_mask >> __ffs(mmc->delay_mask));
> }
>
> meson_mmc_apply_phase_delay(mmc, p, d);
> @@ -518,7 +518,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
> init.num_parents = MUX_CLK_NUM_PARENTS;
>
> mux->reg = host->regs + SD_EMMC_CLOCK;
> - mux->shift = __bf_shf(CLK_SRC_MASK);
> + mux->shift = __ffs(CLK_SRC_MASK);
> mux->mask = CLK_SRC_MASK >> mux->shift;
> mux->hw.init = &init;
>
> @@ -540,7 +540,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
> init.num_parents = 1;
>
> div->reg = host->regs + SD_EMMC_CLOCK;
> - div->shift = __bf_shf(CLK_DIV_MASK);
> + div->shift = __ffs(CLK_DIV_MASK);
> div->width = __builtin_popcountl(CLK_DIV_MASK);
> div->hw.init = &init;
> div->flags = (CLK_DIVIDER_ONE_BASED |
> --
> 2.9.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mmc: meson-gx: fix __ffsdi2 undefined on arm32
@ 2017-08-31 10:45 ` Ulf Hansson
0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2017-08-31 10:45 UTC (permalink / raw)
To: linus-amlogic
On 31 August 2017 at 11:29, Jerome Brunet <jbrunet@baylibre.com> wrote:
> Using __bf_shf does not compile on arm 32 architecture.
> This has gone unnoticed till now cause the driver is only used on arm64.
>
> In addition, __bf_shf was already used in the driver without any issue.
> It was used on a constant value, so the call was probably optimized
> away.
>
> Replace __bf_shf by __ffs fixes the problem
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Thanks, applied for next!
> ---
>
> Hi Ulf,
>
> Sorry for not catching this earlier.
> If you still intend to keep the series applied in next, here is a fixup patch
> to squash with the offending commit during your rebase.
I decided to put it on top. Thanks for posting the fixup quickly.
Kind regards
Uffe
>
> Regards
> Jerome
>
> drivers/mmc/host/meson-gx-mmc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 2fa18faa7f0f..7d7aa2389b7c 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -201,13 +201,13 @@ static int meson_mmc_clk_get_phase(struct clk_hw *hw)
> u32 val;
>
> val = readl(mmc->reg);
> - p = (val & mmc->phase_mask) >> __bf_shf(mmc->phase_mask);
> + p = (val & mmc->phase_mask) >> __ffs(mmc->phase_mask);
> degrees = p * 360 / phase_num;
>
> if (mmc->delay_mask) {
> period_ps = DIV_ROUND_UP((unsigned long)NSEC_PER_SEC * 1000,
> clk_get_rate(hw->clk));
> - d = (val & mmc->delay_mask) >> __bf_shf(mmc->delay_mask);
> + d = (val & mmc->delay_mask) >> __ffs(mmc->delay_mask);
> degrees += d * mmc->delay_step_ps * 360 / period_ps;
> degrees %= 360;
> }
> @@ -223,11 +223,11 @@ static void meson_mmc_apply_phase_delay(struct meson_mmc_phase *mmc,
>
> val = readl(mmc->reg);
> val &= ~mmc->phase_mask;
> - val |= phase << __bf_shf(mmc->phase_mask);
> + val |= phase << __ffs(mmc->phase_mask);
>
> if (mmc->delay_mask) {
> val &= ~mmc->delay_mask;
> - val |= delay << __bf_shf(mmc->delay_mask);
> + val |= delay << __ffs(mmc->delay_mask);
> }
>
> writel(val, mmc->reg);
> @@ -254,7 +254,7 @@ static int meson_mmc_clk_set_phase(struct clk_hw *hw, int degrees)
> r = do_div(p, 360 / phase_num);
> d = DIV_ROUND_CLOSEST(r * period_ps,
> 360 * mmc->delay_step_ps);
> - d = min(d, mmc->delay_mask >> __bf_shf(mmc->delay_mask));
> + d = min(d, mmc->delay_mask >> __ffs(mmc->delay_mask));
> }
>
> meson_mmc_apply_phase_delay(mmc, p, d);
> @@ -518,7 +518,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
> init.num_parents = MUX_CLK_NUM_PARENTS;
>
> mux->reg = host->regs + SD_EMMC_CLOCK;
> - mux->shift = __bf_shf(CLK_SRC_MASK);
> + mux->shift = __ffs(CLK_SRC_MASK);
> mux->mask = CLK_SRC_MASK >> mux->shift;
> mux->hw.init = &init;
>
> @@ -540,7 +540,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
> init.num_parents = 1;
>
> div->reg = host->regs + SD_EMMC_CLOCK;
> - div->shift = __bf_shf(CLK_DIV_MASK);
> + div->shift = __ffs(CLK_DIV_MASK);
> div->width = __builtin_popcountl(CLK_DIV_MASK);
> div->hw.init = &init;
> div->flags = (CLK_DIVIDER_ONE_BASED |
> --
> 2.9.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-31 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 0:21 [ulf.hansson-mmc:next 135/144] ERROR: "__ffsdi2" [drivers/mmc/host/meson-gx-mmc.ko] undefined! kbuild test robot
2017-08-31 9:29 ` [PATCH] mmc: meson-gx: fix __ffsdi2 undefined on arm32 Jerome Brunet
2017-08-31 9:29 ` Jerome Brunet
2017-08-31 10:45 ` Ulf Hansson
2017-08-31 10:45 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.