stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Naresh Kamboju <naresh.kamboju@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Christoph Hellwig <hch@lst.de>,
	m.szyprowski@samsung.com
Cc: open list <linux-kernel@vger.kernel.org>,
	linux- stable <stable@vger.kernel.org>,
	lkft-triage@lists.linaro.org
Subject: Re: [PATCH 5.4 40/50] dma-direct: exclude dma_direct_map_resource from the min_low_pfn check
Date: Fri, 8 May 2020 18:50:02 +0530	[thread overview]
Message-ID: <CA+G9fYvdD3dhMhGL5=nfT+7xTEdD36zUtceF2fROPF4OQQZbLQ@mail.gmail.com> (raw)
In-Reply-To: <20200508123048.730720753@linuxfoundation.org>

On Fri, 8 May 2020 at 18:23, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> From: Christoph Hellwig <hch@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@samsung.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@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)
       |                    ^~~~~~~~~~~

  reply	other threads:[~2020-05-08 13:20 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 12:35 [PATCH 5.4 00/50] 5.4.40-rc1 review Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 01/50] vhost: vsock: kick send_pkt worker once device is started Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 02/50] drm/bridge: analogix_dp: Split bind() into probe() and real bind() Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 03/50] ASoC: topology: Check return value of soc_tplg_create_tlv Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 04/50] ASoC: topology: Check return value of soc_tplg_*_create Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 05/50] ASoC: topology: Check soc_tplg_add_route return value Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 06/50] ASoC: topology: Check return value of pcm_new_ver Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 07/50] ASoC: topology: Check return value of soc_tplg_dai_config Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 08/50] selftests/ipc: Fix test failure seen after initial test run Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 09/50] ASoC: sgtl5000: Fix VAG power-on handling Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 10/50] ASoC: topology: Fix endianness issue Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 11/50] usb: dwc3: gadget: Properly set maxpacket limit Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 12/50] ASoC: rsnd: Fix parent SSI start/stop in multi-SSI mode Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 13/50] ASoC: rsnd: Fix HDMI channel mapping for " Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 14/50] ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 15/50] remoteproc: qcom_q6v5_mss: fix a bug in q6v5_probe() Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 16/50] drm/amdgpu: Correctly initialize thermal controller for GPUs with Powerplay table v0 (e.g Hawaii) Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 17/50] wimax/i2400m: Fix potential urb refcnt leak Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 18/50] net: stmmac: fix enabling socfpgas ptp_ref_clock Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 19/50] net: stmmac: Fix sub-second increment Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 20/50] ASoC: rsnd: Dont treat master SSI in multi SSI setup as parent Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 21/50] ASoC: rsnd: Fix "status check failed" spam for multi-SSI Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 22/50] cifs: protect updating server->dstaddr with a spinlock Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 23/50] scripts/config: allow colons in option strings for sed Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 24/50] cifs: do not share tcons with DFS Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 25/50] tracing: Fix memory leaks in trace_events_hist.c Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 26/50] lib/mpi: Fix building for powerpc with clang Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 27/50] mac80211: sta_info: Add lockdep condition for RCU list usage Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 28/50] net: bcmgenet: suppress warnings on failed Rx SKB allocations Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 29/50] net: systemport: " Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 30/50] drm/i915: Extend WaDisableDARBFClkGating to icl,ehl,tgl Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 31/50] sctp: Fix SHUTDOWN CTSN Ack in the peer restart case Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 32/50] drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 33/50] Revert "software node: Simplify software_node_release() function" Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 34/50] lib: devres: add a helper function for ioremap_uc Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 35/50] mfd: intel-lpss: Use devm_ioremap_uc for MMIO Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 36/50] hexagon: clean up ioremap Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 37/50] hexagon: define ioremap_uc Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 38/50] ALSA: hda: Match both PCI ID and SSID for driver blacklist Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 39/50] x86/kvm: fix a missing-prototypes "vmread_error" Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 40/50] dma-direct: exclude dma_direct_map_resource from the min_low_pfn check Greg Kroah-Hartman
2020-05-08 13:20   ` Naresh Kamboju [this message]
2020-05-08 13:27     ` Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 41/50] platform/x86: GPD pocket fan: Fix error message when temp-limits are out of range Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 42/50] ACPI: PM: s2idle: Fix comment in acpi_s2idle_prepare_late() Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 43/50] mac80211: add ieee80211_is_any_nullfunc() Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 44/50] cgroup, netclassid: remove double cond_resched Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 45/50] libbpf: Fix readelf output parsing for Fedora Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 46/50] mm/mremap: Add comment explaining the untagging behaviour of mremap() Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 47/50] Revert "drm/amd/display: setting the DIG_MODE to the correct value." Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 48/50] tools headers UAPI: Sync copy of arm64s asm/unistd.h with the kernel sources Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 49/50] udp: document udp_rcv_segment special case for looped packets Greg Kroah-Hartman
2020-05-08 12:35 ` [PATCH 5.4 50/50] PM / devfreq: Add missing locking while setting suspend_freq Greg Kroah-Hartman
2020-05-08 13:22 ` [PATCH 5.4 00/50] 5.4.40-rc1 review Naresh Kamboju
2020-05-11 16:35 ` shuah
2020-05-11 17:21   ` Ben Hutchings
2020-05-11 17:49     ` shuah
2020-05-11 17:51     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+G9fYvdD3dhMhGL5=nfT+7xTEdD36zUtceF2fROPF4OQQZbLQ@mail.gmail.com' \
    --to=naresh.kamboju@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=m.szyprowski@samsung.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).