On Fri, 8 May 2020 at 18:23, Greg Kroah-Hartman
<gregkh(a)linuxfoundation.org> wrote:
>
> From: Christoph Hellwig <hch(a)lst.de>
>
> commit 68a33b1794665ba8a1d1ef1d3bfcc7c587d380a6 upstream.
>
> The valid memory address check in dma_capable only makes sense when mapping
> normal memory, not when using dma_map_resource to map a device resource.
> Add a new boolean argument to dma_capable to exclude that check for the
> dma_map_resource case.
>
> Fixes: b12d66278dd6 ("dma-direct: check for overflows on 32 bit DMA addresses")
> Reported-by: Marek Szyprowski <m.szyprowski(a)samsung.com>
> Signed-off-by: Christoph Hellwig <hch(a)lst.de>
> Acked-by: Marek Szyprowski <m.szyprowski(a)samsung.com>
> Tested-by: Marek Szyprowski <m.szyprowski(a)samsung.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
<trim>
>
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -327,7 +327,7 @@ static inline bool dma_direct_possible(s
> size_t size)
> {
> return swiotlb_force != SWIOTLB_FORCE &&
> - dma_capable(dev, dma_addr, size);
> + dma_capable(dev, dma_addr, size, true);
While building kernel Image for arm architecture the following error noticed
on stale-rc 5.4 kernel branch.
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
#
../kernel/dma/direct.c: In function ‘dma_direct_possible’:
../kernel/dma/direct.c:330:3: error: too many arguments to function
‘dma_capable’
330 | dma_capable(dev, dma_addr, size, true);
| ^~~~~~~~~~~
In file included from ../include/linux/dma-direct.h:12,
from ../kernel/dma/direct.c:10:
../arch/arm/include/asm/dma-direct.h:17:20: note: declared here
17 | static inline bool dma_capable(struct device *dev, dma_addr_t
addr, size_t size)
| ^~~~~~~~~~~
In file included from ../include/linux/init.h:5,
from ../include/linux/memblock.h:12,
from ../kernel/dma/direct.c:7:
../kernel/dma/direct.c: In function ‘dma_direct_map_resource’:
../kernel/dma/direct.c:379:16: error: too many arguments to function
‘dma_capable’
379 | if (unlikely(!dma_capable(dev, dma_addr, size, false))) {
| ^~~~~~~~~~~
../include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
In file included from ../include/linux/dma-direct.h:12,
from ../kernel/dma/direct.c:10:
../arch/arm/include/asm/dma-direct.h:17:20: note: declared here
17 | static inline bool dma_capable(struct device *dev, dma_addr_t
addr, size_t size)
| ^~~~~~~~~~~
make[3]: *** [../scripts/Makefile.build:266: kernel/dma/direct.o] Error 1
In file included from ../include/linux/string.h:6,
from ../include/linux/dma-mapping.h:6,
from ../include/linux/dma-direct.h:5,
from ../kernel/dma/swiotlb.c:24:
../kernel/dma/swiotlb.c: In function ‘swiotlb_map’:
../kernel/dma/swiotlb.c:681:16: error: too many arguments to function
‘dma_capable’
681 | if (unlikely(!dma_capable(dev, *dma_addr, size, true))) {
| ^~~~~~~~~~~
../include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
In file included from ../include/linux/dma-direct.h:12,
from ../kernel/dma/swiotlb.c:24:
../arch/arm/include/asm/dma-direct.h:17:20: note: declared here
17 | static inline bool dma_capable(struct device *dev, dma_addr_t
addr, size_t size)
| ^~~~~~~~~~~
Hello!
On Wed, 22 Apr 2020 at 07:09, Ingo Molnar <mingo(a)kernel.org> wrote:
> * Arnaldo Carvalho de Melo <acme(a)kernel.org> wrote:
>
> > Hi Ingo/Thomas,
> >
> > Please consider pulling,
> >
> > Best regards,
> >
> > - Arnaldo
> >
> > Test results at the end of this message, as usual.
> >
> > The following changes since commit cd0943357bc7570f081701d005318c20982178b8:
> >
> > Merge tag 'perf-urgent-for-mingo-5.7-20200414' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2020-04-16 10:21:31 +0200)
> >
> > are available in the Git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-5.8-20200420
> >
> > for you to fetch changes up to 12e89e65f446476951f42aedeef56b6bd6f7f1e6:
> >
> > perf hist: Add fast path for duplicate entries check (2020-04-18 09:05:01 -0300)
>
> > 85 files changed, 1851 insertions(+), 513 deletions(-)
>
> Pulled, thanks a lot Arnaldo!
Our OpenEmbedded builds detected an issue with 5287f9269206 ("perf
script: Add flamegraph.py script"):
ERROR: perf-1.0-r9 do_package_qa: QA Issue:
/usr/libexec/perf-core/scripts/python/bin/flamegraph-report contained
in package perf-python requires /usr/bin/sh, but no providers found in
RDEPENDS_perf-python? [file-rdeps]
This means that there is a new binary pulled in in the shebang line
which was unaccounted for: `/usr/bin/sh`. I don't see any other usage
of /usr/bin/sh in the kernel tree (does not even exist on my Ubuntu
dev machine) but plenty of /bin/sh. This patch is needed:
-----8<----------8<----------8<-----
diff --git a/tools/perf/scripts/python/bin/flamegraph-record
b/tools/perf/scripts/python/bin/flamegraph-record
index 725d66e71570..a2f3fa25ef81 100755
--- a/tools/perf/scripts/python/bin/flamegraph-record
+++ b/tools/perf/scripts/python/bin/flamegraph-record
@@ -1,2 +1,2 @@
-#!/usr/bin/sh
+#!/bin/sh
perf record -g "$@"
diff --git a/tools/perf/scripts/python/bin/flamegraph-report
b/tools/perf/scripts/python/bin/flamegraph-report
index b1a79afd903b..b0177355619b 100755
--- a/tools/perf/scripts/python/bin/flamegraph-report
+++ b/tools/perf/scripts/python/bin/flamegraph-report
@@ -1,3 +1,3 @@
-#!/usr/bin/sh
+#!/bin/sh
# description: create flame graphs
perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py -- "$@"
----->8---------->8---------->8-----
Greetings!
Daniel Díaz
daniel.diaz(a)linaro.org
On Tue, 29 Nov 2016 at 00:00, Johan Hovold <johan(a)kernel.org> wrote:
>
> Make sure to deregister and free any fixed-link PHY registered using
> of_phy_register_fixed_link() on probe errors and on driver unbind.
>
> Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
> Signed-off-by: Johan Hovold <johan(a)kernel.org>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 0c0a45af950f..707bc4680b9b 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -4191,6 +4191,8 @@ static int mvneta_probe(struct platform_device *pdev)
> clk_disable_unprepare(pp->clk);
> err_put_phy_node:
> of_node_put(phy_node);
> + if (of_phy_is_fixed_link(dn))
> + of_phy_deregister_fixed_link(dn);
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
drivers/net/ethernet/marvell/mvneta.c:3442:3: error: implicit
declaration of function 'of_phy_deregister_fixed_link'; did you mean
'of_phy_register_fixed_link'? [-Werror=implicit-function-declaration]
| of_phy_deregister_fixed_link(dn);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_phy_register_fixed_link
ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/541374729
- Naresh