[PATCH next v2 07/11] minmax: minmax: Add __types_ok3() and optimise defines with 3 arguments

2024-02-25 Thread David Laight
min3() and max3() were added to optimise nested min(x, min(y, z)) sequences, but only moved where the expansion was requiested. Add a separate implementation for 3 argument calls. These are never required to generate constant expressions to remove that logic. Signed-off-by: David Laight

[PATCH next v2 06/11] minmax: Remove 'constexpr' check from __careful_clamp()

2024-02-25 Thread David Laight
Nothing requires that clamp() return a constant expression. The logic to do so significantly increases the .i file. Remove the check and directly expand __clamp_once() from clamp_t() since the type check can't fail. Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++-

[PATCH next v2 05/11] minmax: Move the signedness check out of __cmp_once() and __clamp_once()

2024-02-25 Thread David Laight
There is no need to do the signedness/type check when the arguments are being cast to a fixed type. So move the check out of __xxx_once() into __careful_xxx(). Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Changes

[PATCH next v2 04/11] minmax: Replace multiple __UNIQUE_ID() by directly using __COUNTER__

2024-02-25 Thread David Laight
-extension logic. Signed-off-by: David Laight --- include/linux/minmax.h | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) Changes for v2: - Typographical and spelling corrections to the commit messages. Patches unchanged. diff --git a/include/linux

[PATCH next v2 03/11] minmax: Simplify signedness check

2024-02-25 Thread David Laight
#x27;bool' to 'int' and avoid a compiler warning because max() gets used for 'bool' in one place (a very expensive 'or'). (The code is optimised away by two earlier checks - but the compiler still bleats.) Signed-off-by: David Laight --- include/linux/minmax.h

[PATCH next v2 02/11] minmax: Use _Static_assert() instead of static_assert()

2024-02-25 Thread David Laight
The wrapper just adds two more lines of error output when the test fails. Signed-off-by: David Laight --- include/linux/minmax.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) Changes for v2: - Typographical and spelling corrections to the commit messages. Patches unchanged

[PATCH next v2 01/11] minmax: Put all the clamp() definitions together

2024-02-25 Thread David Laight
The defines for clamp() have got separated, move togther for readability. Update description of signedness check. Signed-off-by: David Laight --- include/linux/minmax.h | 120 +++-- 1 file changed, 56 insertions(+), 64 deletions(-) Changes for v2

[PATCH next v2 00/11] minmax: Optimise to reduce .i line length

2024-02-25 Thread David Laight
and 10. Changes for v2: - Typographical and spelling corrections to the commit messages. Patches unchanged. David Laight (11): [1] minmax: Put all the clamp() definitions together [2] minmax: Use _Static_assert() instead of static_assert() [3] minmax: Simplify signedness check [4] minm

[PATCH] drm/amd/display: Remove duplicated function signature from dcn3.01 DCCG

2024-02-22 Thread David Tadokoro
In the header file dc/dcn301/dcn301_dccg.h, the function dccg301_create is declared twice, so remove duplication. Signed-off-by: David Tadokoro --- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_dccg.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn301

Re: [PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
On Thu, 22 Feb 2024 at 04:10, 'Justin Stitt' via KUnit Development wrote: > > Hi, > > On Wed, Feb 21, 2024 at 05:27:15PM +0800, David Gow wrote: > > The correct format specifier for p - n (both p and n are pointers) is > > %td, as the type should be ptrdi

[PATCH 9/9] kunit: Annotate _MSG assertion variants with gnu printf specifiers

2024-02-21 Thread David Gow
d not have the __printf attribute, so gcc couldn't warn on incorrect agruments. It turns out there were quite a few tests with such incorrect arguments. Add the __printf() specifier now that we've fixed these errors, to prevent them from recurring. Suggested-by: Linus Torvalds Signed-of

[PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test

2024-02-21 Thread David Gow
an error pointer, just use '%pe', instead of extracting the error code manually with PTR_ERR(). (This also results in a nicer output when the error code is known.) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: David Gow --- driver

[PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-21 Thread David Gow
hese some more detailed error messages, which should be more useful anyway. Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") Fixes: fca7526b7d89 ("drm/tests/drm_buddy: fix build failure on 32-bit targets") Fixes: fc8d29e298cf ("drm: selftest: convert

[PATCH 6/9] net: test: Fix printf format specifier in skb_segment kunit test

2024-02-21 Thread David Gow
rather than a number if available, which should make the output more readable, too). Fixes: b3098d32ed6e ("net: add skb_segment kunit test") Signed-off-by: David Gow --- net/core/gso_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/gso_test.c

[PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-21 Thread David Gow
'days' is a s64 (from div_s64), and so should use a %lld specifier. This was found by extending KUnit's assertion macros to use gcc's __printf attribute. Fixes: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add tests.") Signed-off-by: David Gow -

[PATCH 4/9] time: test: Fix incorrect format specifier

2024-02-21 Thread David Gow
'days' is a s64 (from div_s64), and so should use a %lld specifier. This was found by extending KUnit's assertion macros to use gcc's __printf attribute. Fixes: 276010551664 ("time: Improve performance of time64_to_tm()") Signed-off-by: David Gow --- kernel/t

[PATCH 3/9] lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
The 'i' passed as an assertion message is a size_t, so should use '%zu', not '%d'. This was found by annotating the _MSG() variants of KUnit's assertions to let gcc validate the format strings. Fixes: bb95ebbe89a7 ("lib: Introduce CONFIG_MEMCPY_KUNIT_T

[PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
f the architecture being built). Fixes: 0ea09083116d ("lib/cmdline: Allow get_options() to take 0 to validate the input") Signed-off-by: David Gow --- lib/cmdline_kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdline_kunit.c b/lib/cmdline_kunit.c ind

[PATCH 1/9] kunit: test: Log the correct filter string in executor_test

2024-02-21 Thread David Gow
filtering attributes") Signed-off-by: David Gow --- lib/kunit/executor_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kunit/executor_test.c b/lib/kunit/executor_test.c index 22d4ee86dbed..3f7f967e3688 100644 --- a/lib/kunit/executor_test.c +++ b/lib/kunit/executor_t

[PATCH 0/9] kunit: Fix printf format specifier issues in KUnit assertions

2024-02-21 Thread David Gow
o get these (or equivalent) in for 6.9 if possible, so please do take a look if possible. Thanks, -- David Reported-by: Linus Torvalds Closes: https://lore.kernel.org/linux-kselftest/CAHk-=wgjmoqudo5f8shh1f4rzzwzapnvcw643m5-yj+bfsf...@mail.gmail.com/ David Gow (9): kunit: test: Log the correct f

[PATCH 3/3] drm/amd/display: add prefix to rv1_clk_mgr_vbios_smu.c functions

2024-02-21 Thread David Tadokoro
The functions defined in dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c don't have names that indicate where they were declared. To better filter results in debug tools like ftrace, prefix these functions with 'rv1_clk_mgr_vbios_smu_'. Signed-off-by: David Tadokoro --- .../drm/amd/dis

[PATCH 1/3] drm/amd/display: add prefix to rv1_clk_mgr_clk.c function

2024-02-21 Thread David Tadokoro
The function defined in dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c doesn't have a name that indicates where it was declared. To better filter results in debug tools like ftrace, prefix this function with 'rv1_clk_mgr_clk_'. Signed-off-by: David Tadokoro --- drivers/gpu/drm/amd/display/d

[PATCH 2/3] drm/amd/display: add prefix to rv1_clk_mgr.c functions

2024-02-21 Thread David Tadokoro
The functions defined in dc/clk_mgr/dcn10/rv1_clk_mgr.c don't have names that indicates where they were declared. To better filter results in debug tools like ftrace, prefix these functions with 'rv1_clk_mgr_'. Signed-off-by: David Tadokoro --- .../display/dc/clk_mgr/dcn1

[PATCH 0/3] drm/amd/display: add prefix to dc/clk_mgr/dcn10 functions

2024-02-21 Thread David Tadokoro
This patchset has three commits that add prefix to all the functions defined in dc/clk_mgr/dcn10 that indicate the file that they were defined. Enforcing this pattern makes filtering results in debug tools like ftrace better. David Tadokoro (3): drm/amd/display: add prefix to rv1_clk_mgr_clk.c

Re: [PATCH v2 1/2] dt-bindings: display/msm: gpu: Allow multiple digits for patchid

2024-02-10 Thread David Heidelberg
Reviewed-by: David Heidelberg

Re: [PATCH v2 2/2] drm/msm/adreno: Add A305B support

2024-02-10 Thread David Heidelberg
Reviewed-by: David Heidelberg

RE: Re: [PATCH v3 2/3] bits: Introduce fixed-type BIT

2024-02-10 Thread David Laight
es get converted to int. If you want them to be an unsigned type then you need to cast them to (unsigned int). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: Making drm_gpuvm work across gpu devices

2024-01-30 Thread David Airlie
On Wed, Jan 31, 2024 at 8:29 AM Zeng, Oak wrote: > > Hi Christian, > > > > Nvidia Nouveau driver uses exactly the same concept of SVM with HMM, GPU > address in the same process is exactly the same with CPU virtual address. It > is already in upstream Linux kernel. We Intel just follow the same

RE: [PATCH next 10/11] block: Use a boolean expression instead of max() on booleans

2024-01-29 Thread David Laight
From: Jani Nikula > Sent: 29 January 2024 09:08 > > On Sun, 28 Jan 2024, David Laight wrote: > > blk_stack_limits() contains: > > t->zoned = max(t->zoned, b->zoned); > > These are bool, so it is just a bitwise or. > > Should be a logical or, reall

Re: [PATCH next 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const()

2024-01-29 Thread David Sterba
On Sun, Jan 28, 2024 at 07:34:23PM +, David Laight wrote: > These are the only uses of max() that require a constant value > from constant parameters. > There don't seem to be any similar uses of min(). > > Replacing the max() by max_const() lets min()/max() be simp

RE: [PATCH next 10/11] block: Use a boolean expression instead of max() on booleans

2024-01-28 Thread David Laight
From: Linus Torvalds > Sent: 28 January 2024 19:59 > > On Sun, 28 Jan 2024 at 11:36, David Laight wrote: > > > > However it generates: > > error: comparison of constant ‘0’ with boolean expression is always > > true [-Werror=bool-compare] > > insi

[PATCH next 11/11] minmax: min() and max() don't need to return constant expressions

2024-01-28 Thread David Laight
d max(bool, bool). Fixup the initial block comment to match current reality. Signed-off-by: David Laight --- include/linux/minmax.h | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/include/linux/minmax.h b/include/linux/minmax.h index c08916588425..5e

[PATCH next 10/11] block: Use a boolean expression instead of max() on booleans

2024-01-28 Thread David Laight
ss a '+ 0' is added. It is a shame the compiler generates this warning for code that will be optimised away. Change so that the extra '+ 0' can be removed. Signed-off-by: David Laight --- block/blk-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH next 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const()

2024-01-28 Thread David Laight
that the casts added by max_t() are no longer needed. Signed-off-by: David Laight --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +- drivers/gpu/drm/drm_color_mgmt.c | 4 ++-- drivers/input/touchscreen/cyttsp4_core.c | 2 +- drivers/net/can/usb/etas_es58x/es58x_devlink.

[PATCH next 08/11 minmax: Add min_const() and max_const()

2024-01-28 Thread David Laight
values. Using these to size on-stack arrays lets min/max be simplified. Zero is added before the compare to convert enum values to integers avoinding the need for casts when enums have been used for constants. Signed-off-by: David Laight --- include/linux/minmax.h | 15 +++ 1 file

RE: [PATCH next 02/11] minmax: Use _Static_assert() instead of static_assert()

2024-01-28 Thread David Laight
The wrapper just adds two more lines of error output when the test fails. Signed-off-by: David Laight --- include/linux/minmax.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/minmax.h b/include/linux/minmax.h index 63c45865b48a..900eec7a28e5 100644

RE: [PATCH next 01/11] minmax: Put all the clamp() definitions together

2024-01-28 Thread David Laight
The defines for clamp() have got separated, move togther for readability. Update description of signedness check. Signed-off-by: David Laight --- include/linux/minmax.h | 120 +++-- 1 file changed, 56 insertions(+), 64 deletions(-) diff --git a/include/linux

[PATCH next 00/11] minmax: Optimise to reduce .i line length.

2024-01-28 Thread David Laight
few cases seems 'suboptimal'. Instead I've added min_const() and max_const() for VLA and static initialisers, these check the arguments are constant to avoid misuse. Patch [9] is dependent on the earlier patches. Patch [10] isn't dependant on them. Patch [11] depends on both 9 a

RE: [PATCH next 00611] minmax: Remove 'constexpr' check from __careful_clamp()

2024-01-28 Thread David Laight
Nothing requires that clamp() return a constant expression. The logic to do so significantly increases the .i file. Remove the check and directly expand __clamp_once() from clamp_t() since the type check can't fail. Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++-

RE: [PATCH next 0711] minmax: minmax: Add __types_ok3() and optimise defines with 3 arguments

2024-01-28 Thread David Laight
min3() and max3() were added to optimise nested min(x, min(y, z)) sequences, bit only moved where the expansion was requiested. Add a separate implementation for 3 argument calls. These are never required to generate constant expressiions to remove that logic. Signed-off-by: David Laight

RE: [PATCH next 04/11] minmax: Replace multiple __UNIQUE_ID() by directly using __COUNTER__

2024-01-28 Thread David Laight
-extension logic. Signed-off-by: David Laight --- include/linux/minmax.h | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/include/linux/minmax.h b/include/linux/minmax.h index c32b4b40ce01..8ee003d8abaf 100644 --- a/include/linux/minmax.h

RE: [PATCH next 05/11] minmax: Move the signedness check out of __cmp_once() and __clamp_once()

2024-01-28 Thread David Laight
There is no need to do the signedness/type check when the arguments are being cast to a fixed type. So move the check out of __xxx_once() into __careful_xxx(). Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

RE: [PATCH next 03/11] minmax: Simplify signedness check

2024-01-28 Thread David Laight
#x27;bool' to 'int' and avoid a compiler warning because max() gets used for 'bool' in one place (a very expensive 'or'). (The code is optimised away by two earlier checks - but the compiler still bleats.) Signed-off-by: David Laight --- include/linux/minmax.h |

Re: Making drm_gpuvm work across gpu devices

2024-01-24 Thread David Airlie
> > > For us, Xekmd doesn't need to know it is running under bare metal or > virtualized environment. Xekmd is always a guest driver. All the virtual > address used in xekmd is guest virtual address. For SVM, we require all the > VF devices share one single shared address space with guest CPU pr

Re: [PATCH AUTOSEL 6.1 5/5] nouveau: fix disp disabling with GSP

2024-01-08 Thread David Airlie
NAK for backporting this to anything, it is just a fix for 6.7 On Mon, Jan 8, 2024 at 10:28 PM Sasha Levin wrote: > > From: Dave Airlie > > [ Upstream commit 7854ea0e408d7f2e8faaada1773f3ddf9cb538f5 ] > > This func ptr here is normally static allocation, but gsp r535 > uses a dynamic pointer, s

RE: [PATCH 00/27] sparc32: sunset sun4m and sun4d

2023-12-20 Thread David Laight
rt when (I think) the sun3 in my cupboard would still work - if only it had a working psu. (The 110/220V switch wasn't connected and the FET wasn't rated for 450V. UK mains can be 240+10% if you are near a substation.) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH v7 3/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v7)

2023-12-13 Thread David Hildenbrand
like this: [1m][ 512k ] ^0 ^256^384 Assume we call filemap_get_folios_contig() and get back the first folio and get start_idx=256 Then, someone fallocate(PUNCH_HOLE) the whole range and re-populates the whole range with a 2m folio. [ 2m ] ^0 ^256^384 if we call filemap_get_folios_contig() with 256, we get another "large folio with offset". Of course, we can detect that, and simply fail/retry. Just wondering if that could happen. -- Cheers, David / dhildenb

Re: [net-next v1 08/16] memory-provider: dmabuf devmem memory provider

2023-12-12 Thread David Ahern
On 12/12/23 6:09 PM, Mina Almasry wrote: > OK, I imagine this is not that hard to implement - it's really whether > the change is acceptable to reviewers. > > I figure I can start by implementing a no-op abstraction to page*: > > typedef struct page netmem_t > > and replace the page* in the foll

Re: [PATCH] dt-bindings: panel-simple-dsi: move LG 5" HD TFT LCD panel into DSI yaml

2023-12-12 Thread David Heidelberg
Good catch, thank you! Sent v2. David On 12/12/2023 20:41, Jessica Zhang wrote: On 12/12/2023 9:53 AM, David Heidelberg wrote: Originally was in the panel-simple, but belongs to panel-simple-dsi. See arch/arm/boot/dts/nvidia/tegra114-roth.dts for more details. Fixes: ``` arch/arm/boot/dts

[PATCH v2] dt-bindings: panel-simple-dsi: move LG 5" HD TFT LCD panel into DSI yaml

2023-12-12 Thread David Heidelberg
+' From schema: Documentation/devicetree/bindings/display/panel/panel-simple.yaml ``` Fixes: 310abcea76e9 ("dt-bindings: display: convert simple lg panels to DT Schema") Signed-off-by: David Heidelberg --- v2: added Fixes tag (thx to Jessica) .../devicetree/bindings/displ

[PATCH] dt-bindings: panel-simple-dsi: move LG 5" HD TFT LCD panel into DSI yaml

2023-12-12 Thread David Heidelberg
hema: Documentation/devicetree/bindings/display/panel/panel-simple.yaml ``` Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 ++ .../devicetree/bindings/display/panel/panel-simple.yaml | 2 -- 2 files changed, 2 insertions(+), 2 deletio

Re: [PATCH v7 0/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v7)

2023-12-12 Thread David Hildenbrand
data coherency after potential page migration. We should probably get started with the first two patches, they are independent of the remaining discussion regarding memfd_pin_folios(). -- Cheers, David / dhildenb

Re: [PATCH v7 3/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v7)

2023-12-12 Thread David Hildenbrand
pinned. Otherwise, they need to be allocated using the filesystem specific APIs and then pinned. v2: - Drop gup_flags and improve comments and commit message (David) - Allocate a page if we cannot find in page cache for the hugetlbfs case as well (David) - Don't unpin pages if there is a migr

Re: [net-next v1 06/16] netdev: support binding dma-buf to netdevice

2023-12-09 Thread David Ahern
On 12/8/23 12:22 PM, Mina Almasry wrote: > On Fri, Dec 8, 2023 at 9:48 AM David Ahern wrote: >> >> On 12/7/23 5:52 PM, Mina Almasry wrote: > ... >>> + >>> + xa_for_each(&binding->bound_rxq_list, xa_idx, rxq) { >>> + if (rxq-&g

Re: [net-next v1 00/16] Device Memory TCP

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > Major changes in v1: > -- > > 1. Implemented MVP queue API ndos to remove the userspace-visible >driver reset. > > 2. Fixed issues in the napi_pp_put_page() devmem frag unref path. > > 3. Removed RFC tag. > > Many smaller addressed comme

Re: [net-next v1 07/16] netdev: netdevice devmem allocator

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index b8c8be5a912e..30667e4c3b95 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -2120,6 +2120,41 @@ static int netdev_restart_rx_queue(struct net_device > *dev, int rxq_idx) > return err; > }

Re: [net-next v1 13/16] tcp: RX path for devmem TCP

2023-12-08 Thread David Ahern
pages are released when the socket is > destroyed. > > Signed-off-by: Willem de Bruijn > Signed-off-by: Kaiyuan Zhang > Signed-off-by: Mina Almasry > > --- > > Changes in v1: > - Added dmabuf_id to dmabuf_cmsg (David/Stan). > - Devmem -> dmabuf (Davi

Re: [net-next v1 06/16] netdev: support binding dma-buf to netdevice

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > + > +static int netdev_restart_rx_queue(struct net_device *dev, int rxq_idx) > +{ > + void *new_mem; > + void *old_mem; > + int err; > + > + if (!dev || !dev->netdev_ops) > + return -EINVAL; > + > + if (!dev->netdev_ops->ndo_

Re: [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6)

2023-12-08 Thread David Hildenbrand
On 08.12.23 08:57, Kasireddy, Vivek wrote: Hi David, On 05.12.23 06:35, Vivek Kasireddy wrote: For drivers that would like to longterm-pin the pages associated with a memfd, the pin_user_pages_fd() API provides an option to not only pin the pages via FOLL_PIN but also to check and migrate

Re: [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6)

2023-12-07 Thread David Hildenbrand
On 07.12.23 14:05, Jason Gunthorpe wrote: On Thu, Dec 07, 2023 at 10:44:14AM +0100, David Hildenbrand wrote: If you always want to return folios, then better name it "memfd_pin_user_folios" (or just "memfd_pin_folios") and pass in a range (instead of a nr_pages parameter),

Re: [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6)

2023-12-07 Thread David Hildenbrand
On 07.12.23 06:09, Kasireddy, Vivek wrote: Hi David, On 05.12.23 06:35, Vivek Kasireddy wrote: For drivers that would like to longterm-pin the pages associated with a memfd, the pin_user_pages_fd() API provides an option to not only pin the pages via FOLL_PIN but also to check and migrate

Re: [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6)

2023-12-06 Thread David Hildenbrand
pinned. Otherwise, they need to be allocated using the filesystem specific APIs and then pinned. v2: - Drop gup_flags and improve comments and commit message (David) - Allocate a page if we cannot find in page cache for the hugetlbfs case as well (David) - Don't unpin pages if there is a migr

Re: [RFC PATCH 2/6] mm/gmem: add arch-independent abstraction to track address mapping status

2023-12-04 Thread David Hildenbrand
On 02.12.23 15:50, Pedro Falcato wrote: On Fri, Dec 1, 2023 at 9:23 AM David Hildenbrand wrote: On 28.11.23 13:50, Weixi Zhu wrote: This patch adds an abstraction layer, struct vm_object, that maintains per-process virtual-to-physical mapping status stored in struct gm_mapping. For example

Re: [PATCH v5 3/5] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v5)

2023-12-04 Thread David Hildenbrand
#x27;ll defer to the MM maintainers. As mentioned above, this API is mainly intended for memfds and FWICS, memfds are backed by files from either shmemfs or hugetlbfs. Ok. Witht better naming this should be more obvious. All sounds reasonable to me! -- Cheers, David / dhildenb

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-12-01 Thread David Hildenbrand
things remain in place. (3) New MMAP flags. Usually you have a hard time getting this in. Sometimes, there are other ways (e.g., special-purpose file- systems). (4) Changing controversial core-mm design decisions to handle corner cases. -- Cheers, David / dhildenb

Re: [RFC PATCH 2/6] mm/gmem: add arch-independent abstraction to track address mapping status

2023-12-01 Thread David Hildenbrand
out going too much into detail why it's all unsolvable without that. The first thing to sort out if we even want that, and some discussions here already went into the direction of "likely not". Let's see. -- Cheers, David / dhildenb

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread David Hildenbrand
On 29.11.23 09:27, zhuweixi wrote: Glad to hear that more sharable code is desirable. IMHO, for a common MM subsystem, it is more beneficial for GMEM to extend core MM instead of building a separate one. More core-mm complexity, awesome, we all love that! ;) -- Cheers, David / dhildenb

Re: [PATCH v4 3/5] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v4)

2023-11-20 Thread David Hildenbrand
allocated using the filesystem specific APIs and then pinned. v2: - Drop gup_flags and improve comments and commit message (David) - Allocate a page if we cannot find in page cache for the hugetlbfs case as well (David) - Don't unpin pages if there is a migration related failure (David) - Dro

Re: [PATCH] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v3)

2023-11-14 Thread David Hildenbrand
allocated using the filesystem specific APIs and then pinned. v2: - Drop gup_flags and improve comments and commit message (David) - Allocate a page if we cannot find in page cache for the hugetlbfs case as well (David) - Don't unpin pages if there is a migration related failure (David) - Dro

Re: [PATCH v2 1/3] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v2)

2023-11-13 Thread David Hildenbrand
allocated using the filesystem specific APIs and then pinned. v2: - Drop gup_flags and improve comments and commit message (David) - Allocate a page if we cannot find in page cache for the hugetlbfs case as well (David) - Don't unpin pages if there is a migration related failure (David) - Dro

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-11 Thread David Ahern
On 11/10/23 7:26 AM, Pavel Begunkov wrote: > On 11/7/23 23:03, Mina Almasry wrote: >> On Tue, Nov 7, 2023 at 2:55 PM David Ahern wrote: >>> >>> On 11/7/23 3:10 PM, Mina Almasry wrote: >>>> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >>>

[PATCH 3/3] drm/vc4: tests: Use KUNIT_DEFINE_ACTION_WRAPPER

2023-11-10 Thread David Gow
, so replace the manual implementation. Signed-off-by: David Gow --- This patch should be a no-op, just moving to use a standard macro to implement these wrappers rather than hand-coding them. Let me know if you'd prefer to take these in separately via the drm trees, or if you're okay w

[PATCH 2/3] drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER()

2023-11-10 Thread David Gow
reduces the boilerplate needed. Signed-off-by: David Gow --- This patch should be a no-op, just moving to use a standard macro to implement these wrappers rather than hand-coding them. Let me know if you'd prefer to take these in separately via the drm trees, or if you're okay with h

[PATCH 1/3] kunit: Add a macro to wrap a deferred action function

2023-11-10 Thread David Gow
https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: David Gow --- This is a follow-up to the RFC here: https://lore.kernel.org/linux-kselftest/20230915050125.3609689-1-david...@google.com/ There's no difference in the macro implementation, just an update to the KUnit test

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-08 Thread David Wei
On 2023-11-07 15:03, Mina Almasry wrote: > On Tue, Nov 7, 2023 at 2:55 PM David Ahern wrote: >> >> On 11/7/23 3:10 PM, Mina Almasry wrote: >>> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >>>> >>>> On 11/5/23 7:44 PM, Mina Almasry wrote

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-08 Thread David Wei
On 2023-11-07 14:55, David Ahern wrote: > On 11/7/23 3:10 PM, Mina Almasry wrote: >> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >>> >>> On 11/5/23 7:44 PM, Mina Almasry wrote: >>>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.

Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-08 Thread David Wei
On 2023-11-05 18:44, Mina Almasry wrote: > Add a netdev_dmabuf_binding struct which represents the > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to > rx queues on the netdevice. On the binding, the dma_buf_attach > & dma_buf_map_attachment will occur. The entries in the sg_t

RE: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-08 Thread David Laight
ct sk_buff? I'm not sure there are any spare bits available. Although CONFIG_NET_SWITCHDEV and CONFIG_NET_SCHED seem to already add padding. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [RFC PATCH v3 06/12] memory-provider: dmabuf devmem memory provider

2023-11-07 Thread David Ahern
On 11/7/23 5:02 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 1:02 PM Stanislav Fomichev wrote: >> >> On 11/05, Mina Almasry wrote: >>> +static inline bool page_is_page_pool_iov(const struct page *page) >>> +{ >>> + return (unsigned long)page & PP_DEVMEM; >>> +} >> >> Speaking of bpf: one t

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-07 Thread David Ahern
On 11/7/23 4:55 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 4:03 PM Willem de Bruijn > wrote: >> >> On Mon, Nov 6, 2023 at 3:55 PM David Ahern wrote: >>> >>> On 11/6/23 4:32 PM, Stanislav Fomichev wrote: >>>>> The concise notification

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-07 Thread David Ahern
On 11/7/23 3:10 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >> >> On 11/5/23 7:44 PM, Mina Almasry wrote: >>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >>> index eeeda849115c..1c351c138a5b 100644 &g

Re: [RFC PATCH v3 00/12] Device Memory TCP

2023-11-07 Thread David Ahern
Is there a policy about cc'ing moderated lists on patch sets? I thought there was, but not finding anything under Documentation/. Getting a 'needs moderator approval response' on every message is rather annoying.

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread David Ahern
On 11/6/23 5:20 PM, Mina Almasry wrote: > The user is free to modify or delete flow steering rules outside of the > lifetime of the socket. Technically it's possible for the user to > reconfigure flow steering while the socket is simultaneously receiving, > and the result will be packets switching

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/net/core/datagram.c b/net/core/datagram.c > index 176eb5834746..cdd4fb129968 100644 > --- a/net/core/datagram.c > +++ b/net/core/datagram.c > @@ -425,6 +425,9 @@ static int __skb_datagram_iter(const struct sk_buff *skb, > int offset, >

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread David Ahern
On 11/6/23 4:32 PM, Stanislav Fomichev wrote: >> The concise notification API returns tokens as a range for >> compression, encoding as two 32-bit unsigned integers start + length. >> It allows for even further batching by returning multiple such ranges >> in a single call. > > Tangential: should

Re: [RFC PATCH v3 06/12] memory-provider: dmabuf devmem memory provider

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h > index 78cbb040af94..b93243c2a640 100644 > --- a/include/net/page_pool/helpers.h > +++ b/include/net/page_pool/helpers.h > @@ -111,6 +112,45 @@ page_pool_iov_binding(const struc

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index eeeda849115c..1c351c138a5b 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -843,6 +843,9 @@ struct netdev_dmabuf_binding { > }; > > #ifdef CONFIG_

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread David Ahern
mem' sk_buff flag to >>>>> 'not_readable'? >>>>> It better communicates the fact that the stack shouldn't dereference the >>>>> frags (because it has 'devmem' fragments or for some other potential >>>>> futur

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread David Ahern
On 11/6/23 11:47 AM, Stanislav Fomichev wrote: > On 11/05, Mina Almasry wrote: >> For device memory TCP, we expect the skb headers to be available in host >> memory for access, and we expect the skb frags to be in device memory >> and unaccessible to the host. We expect there to be no mixing and >>

Re: [PULL] drm-misc-next

2023-11-06 Thread David Edelsohn
On Mon, Nov 6, 2023 at 5:55 AM Maxime Ripard wrote: > On Mon, Nov 06, 2023 at 11:37:34AM +0100, Thomas Hellström wrote: > > On 11/6/23 11:20, Maxime Ripard wrote: > > > On Mon, Nov 06, 2023 at 11:01:51AM +0100, Thomas Hellström wrote: > > > > Hi, David. > >

Re: [PULL] drm-misc-next

2023-11-03 Thread David Edelsohn
.0-only OR MIT Thanks, David

Evoc proposal

2023-10-24 Thread DAVID WALTERS
Hello, I have a draft of a proposal that I would like feedback on from Maíra Canal (or another mentor). If you could please let me know their email address (or I could send you the draft and you could forward it to them). It's for the KUnit and DRM project. Thanks, David Walters.

Re: [PATCH 1/9] drm/ci: uprev mesa version - fix container build

2023-10-11 Thread David Heidelberg
Reviewed-by: David Heidelberg On 09/10/2023 02:49, Helen Koike wrote: When building containers, some rust packages were installed without locking the dependencies version, which got updated and started giving errors like: error: failed to compile `bindgen-cli v0.62.0`, intermediate artifacts

Re: [PATCH] dt-bindings: display: remove backlight node from panel examples

2023-10-11 Thread David Lechner
/20230724143152.ga3430423-r...@kernel.org/ Suggested-by: Rob Herring Signed-off-by: Luca Ceresoli --- Acked-by: David Lechner

Re: [PATCH v1 1/3] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages

2023-10-06 Thread David Hildenbrand
be found in the page cache. An error is returned if they are not found. However, shmem pages can be swapped in or allocated if they are not present in the page cache. Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Gerd Hoffmann Cc: Dongwon Kim Cc

Re: [PATCH v2 10/15] vrf: Remove the now superfluous sentinel element from ctl_table array

2023-10-02 Thread David Ahern
n time > memory bloat by ~64 bytes per sentinel (further information Link : > https://lore.kernel.org/all/zo5yx5jfoggi%2f...@bombadil.infradead.org/) > > Remove sentinel from vrf_table > > Signed-off-by: Joel Granados > --- > drivers/net/vrf.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: David Ahern

Re: [PATCH 2/3] kunit: Add kunit_move_action_to_top_or_reset() to reorder actions

2023-09-22 Thread David Gow
ich they were created is the right thing to do. It looks like, from the comments on patch 3, this may no longer be necessary? Is that so? Otherwise, if you have a real use case for it, I've no objection to KUnit adding this as a feature (though I'd probably add some documentation sugges

Re: [PATCH v1 0/3] udmabuf: Add support for page migration out of movable zone or CMA

2023-09-14 Thread David Hildenbrand
uch a core infrastructure. -- Cheers, David / dhildenb

linux-6.6-rc1/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c:2175:26: style: Array index 'i' is used before limits check. [arrayIndexThenCheck]

2023-09-11 Thread David Binderman
lt; optimal_dcfclk_for_uclk[j]) { Regards David Binderman

Re: [PATCH 4/6] drm: ci: Enable configs to fix mt8173 boot hang issue

2023-09-08 Thread David Heidelberg
or generic kernel, I assume CONFIG_REGULATOR_DA9211=m should be added. David Regards, Vignesh -- David Heidelberg Consultant Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718 OpenPGP_0x6

<    1   2   3   4   5   6   7   8   9   10   >