[PATCH mm-unstable v1 07/20] mm: don't call vm_ops->huge_fault() in wp_huge_pmd()/wp_huge_pud() for private mappings

2022-11-16 Thread David Hildenbrand
ion for more generic FAULT_FLAG_UNSHARE support in COW mappings. Signed-off-by: David Hildenbrand --- mm/memory.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index c35e6cd32b6a..d47ad33c6487 100644 --- a/mm/memory.c +++ b

[PATCH mm-unstable v1 08/20] mm: extend FAULT_FLAG_UNSHARE support to anything in a COW mapping

2022-11-16 Thread David Hildenbrand
such that we can handle FAULT_FLAG_UNSHARE on the PTE level. This change is a requirement for reliable long-term R/O pinning in COW mappings. Signed-off-by: David Hildenbrand --- include/linux/mm_types.h | 8 mm/memory.c | 4 2 files changed, 4 insertions(+), 8 deletions

[PATCH mm-unstable v1 06/20] mm: rework handling in do_wp_page() based on private vs. shared mappings

2022-11-16 Thread David Hildenbrand
of page-based functions where we touch the code either way. Signed-off-by: David Hildenbrand --- mm/memory.c | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index c4fa378ec2a0..c35e6cd32b6a 100644 --- a/mm

[PATCH mm-unstable v1 05/20] mm: add early FAULT_FLAG_WRITE consistency checks

2022-11-16 Thread David Hildenbrand
re that we will never break COW in a read-only private mapping. Signed-off-by: David Hildenbrand --- mm/memory.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index e014435a87db..c4fa378ec2a0 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5170,6 +5170,14

[PATCH mm-unstable v1 02/20] selftests/vm: cow: basic COW tests for non-anonymous pages

2022-11-16 Thread David Hildenbrand
and tmpfile() * Hugetlb pages via memfd Fortunately, all tests pass. Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 338 ++- 1 file changed, 337 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm

[PATCH mm-unstable v1 04/20] mm: add early FAULT_FLAG_UNSHARE consistency checks

2022-11-16 Thread David Hildenbrand
at it, centralize the check for mutual exclusion of FAULT_FLAG_UNSHARE and FAULT_FLAG_WRITE and just drop the check that either flag is set in the WP handler. Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 3 --- mm/hugetlb.c | 5 - mm/memory.c | 23

[PATCH mm-unstable v1 03/20] selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages

2022-11-16 Thread David Hildenbrand
-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm/cow.c index fb07bd44529c..73e05b52c49e 100644 --- a/tools/testing/selftests/vm/cow.c

[PATCH mm-unstable v1 01/20] selftests/vm: anon_cow: prepare for non-anonymous COW tests

2022-11-16 Thread David Hildenbrand
;. Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/.gitignore | 2 +- tools/testing/selftests/vm/Makefile | 10 tools/testing/selftests/vm/check_config.sh| 4 +-- .../selftests/vm/{anon_cow.c => cow.c}| 25 +++ tools/testing

[PATCH mm-unstable v1 00/20] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)

2022-11-16 Thread David Hildenbrand
ys unhappy ... sorry). RFC -> v1: * Use term "ptrace" instead of "debuggers" in patch descriptions * Added ACK/Tested-by * "mm/frame-vector: remove FOLL_FORCE usage" -> Adjust description * "mm: rename FOLL_FORCE to FOLL_PTRACE" -> Added David

Re: [PATCH] mm/memory: Return vm_fault_t result from migrate_to_ram() callback

2022-11-14 Thread David Hildenbrand
(is_hwpoison_entry(entry)) { ret = VM_FAULT_HWPOISON; Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH RFC 00/19] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)

2022-11-14 Thread David Hildenbrand
that very clear, and also break anything in-flight accidentally readding it, which I'd otherwise expect to happen. Good idea; I'll include a patch in v1. -- Thanks, David / dhildenb

Re: [PATCH RFC 16/19] mm/frame-vector: remove FOLL_FORCE usage

2022-11-08 Thread David Hildenbrand
On 08.11.22 05:45, Tomasz Figa wrote: Hi David, Hi Tomasz, thanks for looking into this! On Tue, Nov 8, 2022 at 1:19 AM David Hildenbrand wrote: FOLL_FORCE is really only for debugger access. According to commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are a

Re: [PATCH RFC 00/19] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)

2022-11-08 Thread David Hildenbrand
On 07.11.22 18:27, Linus Torvalds wrote: On Mon, Nov 7, 2022 at 8:18 AM David Hildenbrand wrote: So instead, make R/O long-term pinning work as expected, by breaking COW in a COW mapping early, such that we can remove any FOLL_FORCE usage from drivers. Nothing makes me unhappy from a quick

Re: KUnit issues - Was: [igt-dev] [PATCH RFC v2 8/8] drm/i915: check if current->mm is not NULL

2022-11-07 Thread David Gow
isn't ideal, but you could eventually use the test filtering to split them up. Ultimately, supporting more deeply nested tests is something we're not opposed to doing in KUnit, we've just not had any need for it thus far, so haven't really looked into how we'd design and implement it. Now there's a potential user, we can look into it, though it's likely to be lower-priority here, given there are workarounds. Thanks again, and I hope that helps a bit! Cheers, -- David smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH RFC 05/19] mm: add early FAULT_FLAG_WRITE consistency checks

2022-11-07 Thread David Hildenbrand
On 07.11.22 20:03, Nadav Amit wrote: On Nov 7, 2022, at 8:17 AM, David Hildenbrand wrote: !! External Email Let's catch abuse of FAULT_FLAG_WRITE early, such that we don't have to care in all other handlers and might get "surprises" if we forget to do so. Write faults without V

[PATCH RFC 18/19] RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
: Leon Romanovsky Signed-off-by: David Hildenbrand --- drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index f4b5f05058e4..f693bc753b6b 100644

[PATCH RFC 19/19] habanalabs: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
Bergmann Cc: Greg Kroah-Hartman Signed-off-by: David Hildenbrand --- drivers/misc/habanalabs/common/memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index ef28f3b37b93..e35cca96bbef

[PATCH RFC 16/19] mm/frame-vector: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
Cc: Marek Szyprowski Cc: Mauro Carvalho Chehab Signed-off-by: David Hildenbrand --- drivers/media/common/videobuf2/frame_vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vect

[PATCH RFC 17/19] drm/exynos: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Signed-off-by: David Hildenbrand --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index

[PATCH RFC 15/19] media: pci/ivtv: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
probably, FOLL_FORCE usage is just some legacy leftover. Cc: Andy Walls Cc: Mauro Carvalho Chehab Signed-off-by: David Hildenbrand --- drivers/media/pci/ivtv/ivtv-udma.c | 2 +- drivers/media/pci/ivtv/ivtv-yuv.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH RFC 14/19] drm/etnaviv: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
t. So stop using FOLL_FORCE, which is really only for debugger access. Cc: Daniel Vetter Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: David Airlie Signed-off-by: David Hildenbrand --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletion

[PATCH RFC 13/19] media: videobuf-dma-sg: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for debugger access. Cc: Mauro Carvalho Chehab Signed-off-by: David Hildenbrand --- drivers/media/v4l2-core

[PATCH RFC 12/19] RDMA/siw: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for debugger access. Cc: Bernard Metzler Cc: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: David

[PATCH RFC 11/19] RDMA/usnic: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
-off-by: David Hildenbrand --- drivers/infiniband/hw/usnic/usnic_uiom.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index 67923ced6e2d..c301b3be9f30 100644 --- a/drivers/infiniband

[PATCH RFC 10/19] RDMA/umem: remove FOLL_FORCE usage

2022-11-07 Thread David Hildenbrand
()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for debugger access. Cc: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: David Hildenbrand --- drivers

[PATCH RFC 08/19] mm: extend FAULT_FLAG_UNSHARE support to anything in a COW mapping

2022-11-07 Thread David Hildenbrand
such that we can handle FAULT_FLAG_UNSHARE on the PTE level. This change is a requirement for reliable long-term R/O pinning in COW mappings. Signed-off-by: David Hildenbrand --- include/linux/mm_types.h | 8 mm/memory.c | 4 2 files changed, 4 insertions(+), 8 deletions

[PATCH RFC 09/19] mm/gup: reliable R/O long-term pinning in COW mappings

2022-11-07 Thread David Hildenbrand
ail to run. However, we essentially had the same behavior already in commit 17839856fd58 ("gup: document and work around "COW can break either way" issue") which got merged into some enterprise distros, and there were not any such complaints. So most probably, we're fine. Si

[PATCH RFC 07/19] mm: don't call vm_ops->huge_fault() in wp_huge_pmd()/wp_huge_pud() for private mappings

2022-11-07 Thread David Hildenbrand
ion for more generic FAULT_FLAG_UNSHARE support in COW mappings. Signed-off-by: David Hildenbrand --- mm/memory.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 41e4c697033a..d2f9673755be 100644 --- a/mm/memory.c +++ b

[PATCH RFC 06/19] mm: rework handling in do_wp_page() based on private vs. shared mappings

2022-11-07 Thread David Hildenbrand
of page-based functions where we touch the code either way. Signed-off-by: David Hildenbrand --- mm/memory.c | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 826353da7b23..41e4c697033a 100644 --- a/mm

[PATCH RFC 04/19] mm: add early FAULT_FLAG_UNSHARE consistency checks

2022-11-07 Thread David Hildenbrand
at it, centralize the check for mutual exclusion of FAULT_FLAG_UNSHARE and FAULT_FLAG_WRITE and just drop the check that either flag is set in the WP handler. Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 3 --- mm/hugetlb.c | 5 - mm/memory.c | 23

[PATCH RFC 05/19] mm: add early FAULT_FLAG_WRITE consistency checks

2022-11-07 Thread David Hildenbrand
re that we will never break COW in a read-only private mapping. Signed-off-by: David Hildenbrand --- mm/memory.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index fe131273217a..826353da7b23 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5159,6 +5159,14

[PATCH RFC 03/19] selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages

2022-11-07 Thread David Hildenbrand
-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm/cow.c index 93c643bcdcf5..40ba45d0c6b4 100644 --- a/tools/testing/selftests/vm/cow.c

[PATCH RFC 02/19] selftests/vm: cow: basic COW tests for non-anonymous pages

2022-11-07 Thread David Hildenbrand
and tmpfile() * Hugetlb pages via memfd Fortunately, all tests pass. Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 338 ++- 1 file changed, 337 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm

[PATCH RFC 01/19] selftests/vm: anon_cow: prepare for non-anonymous COW tests

2022-11-07 Thread David Hildenbrand
;. Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/.gitignore | 2 +- tools/testing/selftests/vm/Makefile | 10 tools/testing/selftests/vm/check_config.sh| 4 +-- .../selftests/vm/{anon_cow.c => cow.c}| 25 +++ tools/testing

[PATCH RFC 00/19] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)

2022-11-07 Thread David Hildenbrand
racle) Cc: Mike Kravetz Cc: Muchun Song Cc: Shuah Khan Cc: David Airlie Cc: Oded Gabbay Cc: Arnd Bergmann David Hildenbrand (19): selftests/vm: anon_cow: prepare for non-anonymous COW tests selftests/vm: cow: basic COW tests for non-anonymous pages selftests/vm: cow: R/O long-te

Re: [PATCH v2 21/65] clk: davinci: da8xx-cfgchip: Add a determine_rate hook

2022-11-07 Thread David Lechner
On 11/7/22 6:06 AM, Maxime Ripard wrote: Hi David, On Fri, Nov 04, 2022 at 11:45:17AM -0500, David Lechner wrote: On 11/4/22 8:17 AM, Maxime Ripard wrote: The Davinci DA8xxx cfgchip mux clock implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation

dcn321_fpu.c:626: Array index check in wrong place ?

2022-11-07 Thread David Binderman
amp;& i < num_dcfclk_sta_targets) { It might be wise to move the limits check to before use. Regards David Binderman

Re: [PATCH v2 22/65] clk: davinci: da8xx-cfgchip: Add a determine_rate hook

2022-11-04 Thread David Lechner
On 11/4/22 8:17 AM, Maxime Ripard wrote: The Davinci DA8xxx cfgchip "clk48" clock implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most

Re: [PATCH v2 54/65] clk: da8xx: clk48: Switch to determine_rate

2022-11-04 Thread David Lechner
On 11/4/22 8:18 AM, Maxime Ripard wrote: The TI DA8xx USB0 clk48 clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most likely

Re: [PATCH v2 21/65] clk: davinci: da8xx-cfgchip: Add a determine_rate hook

2022-11-04 Thread David Lechner
On 11/4/22 8:17 AM, Maxime Ripard wrote: The Davinci DA8xxx cfgchip mux clock implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most

RE: [PATCH] video: fbdev: sis: use explicitly signed char

2022-10-25 Thread David Laight
; > unsigned char REFindex; > - char ROMMODEIDX661; > + signed char ROMMODEIDX661; Isn't the correct fix to use u8 and s8 ? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
On Wed, Oct 19, 2022 at 7:36 PM MaĆ­ra Canal wrote: > > [cc Javier] > > Hi David, > > On 10/19/22 04:32, David Gow wrote: > > The xrgb2101010 format conversion test (unlike for other formats) does > > an endianness conversion on the results. However, it always con

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
;> -buf = le32buf_to_cpu(test, buf, TEST_BUF_SIZE); > >> +buf = le32buf_to_cpu(test, buf, dst_size / sizeof(u32)); > >> KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); > >> } > > > > Thanks a lot for fixing this b

[PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread David Gow
.*xrgb2101010 Reported-by: Linux Kernel Functional Testing Fixes: 453114319699 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_xrgb2101010()") Signed-off-by: David Gow --- This is a fix for the issue reported here: https://lore.kernel.org/dri-devel/CA+G9fYs

Re: not ok 1 - single_pixel_source_buffer: The buggy address belongs to the physical page

2022-10-18 Thread David Gow
rnel/git/torvalds/linux.git/tree/drivers/gpu/drm/tests/drm_format_helper_test.c#n441 That second call to le32buf_to_cpu() should probably take dst_size (or rather, dst_size / sizeof(u32)) rather than using TEST_BUF_SIZE, which is the maximum possible size of the buffer, not the actual size. That fixes it here for me, though a proper fix would avoid the division. Cheers, -- David smime.p7s Description: S/MIME Cryptographic Signature

RE: [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-12 Thread David Laight
will generate the same code. The real question is WTF is the code doing? The '& ~7u' clears the bottom 3 bits. The '- 1' then sets the bottom 3 bits and decrements the (random) high bits. So is the same as get_random_u32() | 7. But I bet the coder had something else in mind. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH v4 4/6] treewide: use get_random_u32() when possible

2022-10-08 Thread David Laight
unsigned long delay; > > - delay = (u64)msecs_to_jiffies(mrp_join_time) * prandom_u32() >> 32; > + delay = (u64)msecs_to_jiffies(mrp_join_time) * get_random_u32() >> 32; > mod_timer(>join_timer, jiffies + delay); > } > Aren't those: delay = prando

RE: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread David Laight
sprintf(in, "%s%u", str, get_random_int() % 256); > /* >* Only first and leading '-' not followed by integer >* will advance the pointer. Something has gone backwards here And get_random_u8() looks a better fit. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH v3 3/5] treewide: use get_random_u32() when possible

2022-10-08 Thread David Laight
return get_random_u16() & (val - 1); return get_random_u32() & (val - 1); } } BUILD_BUG_ON(sizeof (val) > 4); return ((u64)get_random_u32() * val) >> 32; } get_random_below() is a much better na

RE: [PATCH v3 3/5] treewide: use get_random_u32() when possible

2022-10-07 Thread David Laight
_u8() << 4 You also seem to have removed prandom_u32() in favour of get_random_u32() but have added more prandom_() functions. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: linux-next: build failure after merge of the drm tree

2022-10-03 Thread David Airlie
On Tue, Oct 4, 2022 at 12:21 PM Stephen Rothwell wrote: > > Hi broo...@kernel.org, > > On Fri, 30 Sep 2022 11:54:34 +0100 broo...@kernel.org wrote: > > > > After merging the drm tree, today's linux-next build (x86_64 > > allmodconfig) failed like this: > > > >

Re: [PATCH v2 2/2] drm/tests: Split drm_test_dp_mst_sideband_msg_req_decode into parameterized tests

2022-09-30 Thread David Gow
y real benefit. We've also had a few requests in the past for being able to pass in a custom set of parameters from userspace, which opens up some other interesting possibilities, though it's not a priority at the moment. Cheers, -- David smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 04/12] btrfs: send: Proactively round up to kmalloc bucket size

2022-09-22 Thread David Sterba
; the buffer through the existing __alloc_size() hint. > > Cc: linux-bt...@vger.kernel.org > Signed-off-by: Kees Cook Acked-by: David Sterba

RE: [PATCH] drm/amd/display: fix i386 frame size warning

2022-08-24 Thread David Laight
play_mode_vba_30.c > @@ -396,64 +396,10 @@ static void CalculateUrgentBurstFactor( > > static void UseMinimumDCFCLK( > struct display_mode_lib *mode_lib, > - int MaxInterDCNTileRepeaters, > + struct vba_vars_st *v, You should probably add 'const' in th

RE: mainline build failure for x86_64 allmodconfig with clang

2022-08-07 Thread David Laight
ng conventions that take a pointer to 'mode_lib->vba' and another > one to 'v', so these are no longer passed on the stack individually. Or, if it is only called once (I can't find the source) force it to be inlined. Or just shoot the software engineer who thinks 100 arguments is sane. :-

RE: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread David Laight
... > * NOTE: > * This file is gcc-parsable HW gospel, coming straight from HW engineers. I never trust hardware engineers to write code :-) (Although at the moment they trust me to write VHDL...) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, M

Re: [PATCH] mm/gup.c: Fix formating in check_and_migrate_movable_page()

2022-07-21 Thread David Hildenbrand
On 21.07.22 04:05, Alistair Popple wrote: > Commit b05a79d4377f ("mm/gup: migrate device coherent pages when pinning > instead of failing") added a badly formatted if statement. Fix it. > > Signed-off-by: Alistair Popple > Reported-by: David Hildenbrand > --- >

Re: [PATCH v9 06/14] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-19 Thread David Hildenbrand
On 18.07.22 22:32, Andrew Morton wrote: > On Mon, 18 Jul 2022 12:56:29 +0200 David Hildenbrand wrote: > >>> /* >>> * Try to move out any movable page before pinning the range. >>> */ >>> @@ -1919,7 +1948,8 @@ s

RE: [Intel-gfx] [PATCH v2 01/21] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-07-19 Thread David Laight
s 3600 (4 bytes/pixel) and the whole function takes around 3.3ms. IIRC the first few page flushes are quick (I bet they go into a fifo) and then they all get slow. The flushes are actually requested from userspace. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH v9 02/14] mm: move page zone helpers from mm.h to mmzone.h

2022-07-18 Thread David Hildenbrand
On 18.07.22 19:52, Felix Kuehling wrote: > On 2022-07-18 06:50, David Hildenbrand wrote: >> On 15.07.22 17:05, Alex Sierra wrote: >>> [WHY] >>> It makes more sense to have these helpers in zone specific header >>> file, rather than the generic mm.h >>

RE: [Intel-gfx] [PATCH v2 01/21] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-07-18 Thread David Laight
e is a loop that forces a write-back of all the frame buffer pages. With a large display and some cpu (like my Ivy bridge one) that takes long enough with pre-emption disabled that wakeup of RT processes (and any pinned to the cpu) takes far longer than one might have wished for. Since some X servers reque

Re: [PATCH v9 06/14] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-18 Thread David Hildenbrand
tion_error_count) > + if (!list_empty(_page_list) || isolation_error_count > + || coherent_pages) The common style is to a) add the || to the end of the previous line b) indent such the we have a nice-to-read alignment if (!list_empty(_page_list) || isolation_error_count || coherent

Re: [PATCH v9 04/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-07-18 Thread David Hildenbrand
: Felix Kuehling (v2) > Reviewed-by: Alistair Popple (v6) > Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v9 02/14] mm: move page zone helpers from mm.h to mmzone.h

2022-07-18 Thread David Hildenbrand
On 15.07.22 17:05, Alex Sierra wrote: > [WHY] > It makes more sense to have these helpers in zone specific header > file, rather than the generic mm.h > > Signed-off-by: Alex Sierra Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v8 07/15] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-11 Thread David Hildenbrand
On 11.07.22 16:00, Matthew Wilcox wrote: > On Mon, Jul 11, 2022 at 03:35:42PM +0200, David Hildenbrand wrote: >>> + /* >>> +* Device coherent pages are managed by a driver and should not >>> +* be pinned indefinitely as

Re: [PATCH v8 02/15] mm: move page zone helpers into new header-specific file

2022-07-11 Thread David Hildenbrand
On 08.07.22 23:25, Felix Kuehling wrote: > On 2022-07-08 07:28, David Hildenbrand wrote: >> On 07.07.22 21:03, Alex Sierra wrote: >>> [WHY] >>> Have a cleaner way to expose all page zone helpers in one header >> What exactly is a "page zone"? Do y

Re: [PATCH v8 06/15] mm: remove the vma check in migrate_vma_setup()

2022-07-11 Thread David Hildenbrand
;src[i] & MIGRATE_PFN_MIGRATE)) > continue; > if (!notified) { -- Thanks, David / dhildenb

Re: [PATCH v8 07/15] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-11 Thread David Hildenbrand
copy_highpage(dpage, page); migrate_vma_finalize(); - if (dpage && !(src_pfn & MIGRATE_PFN_MIGRATE)) { - if (gup_flags & FOLL_PIN) - unpin_user_page(dpage); - else - put_page(dpage); - dpage = NULL; - } - return dpage; + if (src_pfn & MIGRATE_PFN_MIGRATE) + return 0; + return -EBUSY; } -- 2.35.3 -- Thanks, David / dhildenb

Re: [PATCH v8 02/15] mm: move page zone helpers into new header-specific file

2022-07-08 Thread David Hildenbrand
On 07.07.22 21:03, Alex Sierra wrote: > [WHY] > Have a cleaner way to expose all page zone helpers in one header What exactly is a "page zone"? Do you mean a buddy zone as in include/linux/mmzone.h ? -- Thanks, David / dhildenb

Re: [PATCH v8 01/15] mm: rename is_pinnable_pages to is_longterm_pinnable_pages

2022-07-08 Thread David Hildenbrand
--- > include/linux/mm.h | 8 > mm/gup.c | 4 ++-- > mm/gup_test.c | 2 +- > mm/hugetlb.c | 2 +- > 4 files changed, 8 insertions(+), 8 deletions(-) > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 04/14] mm: add device coherent vma selection for memory migration

2022-06-30 Thread David Hildenbrand
On 30.06.22 13:44, Alistair Popple wrote: > > David Hildenbrand writes: > >> On 29.06.22 05:54, Alex Sierra wrote: >>> This case is used to migrate pages from device memory, back to system >>> memory. Device coherent type memory is cache coherent from

Re: [PATCH v7 04/14] mm: add device coherent vma selection for memory migration

2022-06-30 Thread David Hildenbrand
> + (!(migrate->flags & > MIGRATE_VMA_SELECT_DEVICE_COHERENT) || > + page->pgmap->owner != migrate->pgmap_owner)) In general LGTM -- Thanks, David / dhildenb

Re: [PATCH v7 01/14] mm: rename is_pinnable_pages to is_pinnable_longterm_pages

2022-06-29 Thread David Hildenbrand
On 30.06.22 00:08, Felix Kuehling wrote: > On 2022-06-29 03:33, David Hildenbrand wrote: >> On 29.06.22 05:54, Alex Sierra wrote: >>> is_pinnable_page() and folio_is_pinnable() were renamed to >>> is_longterm_pinnable_page() and folio_is_longterm_pinnable() >&g

Re: [PATCH v7 02/14] mm: add zone device coherent type memory support

2022-06-29 Thread David Hildenbrand
toph Hellwig >From what I can tell, this looks good to me Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 03/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-29 Thread David Hildenbrand
continue; > > /* Also skip shared copy-on-write pages */ In -next/-mm there is now an additional can_change_pte_writable() that calls vm_normal_page() -- added by me. I assume that that is indeed fine because we can simply map device coherent pages writable. Besides the nits, LGTM Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 01/14] mm: rename is_pinnable_pages to is_pinnable_longterm_pages

2022-06-29 Thread David Hildenbrand
Can you elaborate why the move from mm.h to memremap.h is justified? I'd have called it "is_longterm_pinnable_page", but I am not a native speaker, so no strong opinion :) -- Thanks, David / dhildenb

Re: [PATCH v6 02/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-28 Thread David Hildenbrand
: Alistair Popple > --- I think my review feedback regarding FOLL_LRU has been ignored. -- Thanks, David / dhildenb

Re: [PATCH v6 06/14] mm: add device coherent checker to is_pinnable_page

2022-06-28 Thread David Hildenbrand
of the function should be a separate cleanup patch before any other changes, and the remaining change should be squashed into patch #1, to logically make sense, because it still states "no one should be allowed to pin such memory so that it can always be evicted." Or am I missing something? -- Thanks, David / dhildenb

[PATCH] staging: fbtft: fix alignment should match open parenthesis

2022-06-26 Thread David Reaver
, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00, + 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); Signed-off-by: David Reaver --- drivers/staging/fbtft/fb_tinylcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft

Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis

2022-06-26 Thread David Reaver
Joe Perches writes: > On Sat, 2022-06-25 at 19:00 -0700, David Reaver wrote: >> Fix alignment of this line of code with the previous parenthesis, as >> suggested by checkpatch.pl: > [] >> diff --git a/drivers/staging/fbtft/fb_tinylcd.c >> b/drivers/staging/fbtft

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-23 Thread David Hildenbrand
On 23.06.22 20:20, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/23/2022 2:57 AM, David Hildenbrand wrote: >> On 23.06.22 01:16, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/21/2022 11:16 AM, David Hildenbrand wrote: >>>> On 21.06.22 18:08, Sierra Guiza, Alej

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-23 Thread David Hildenbrand
On 23.06.22 01:16, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/21/2022 11:16 AM, David Hildenbrand wrote: >> On 21.06.22 18:08, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/21/2022 7:25 AM, David Hildenbrand wrote: >>>> On 21.06.22 13:55, Alistair Popp

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 18:08, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/21/2022 7:25 AM, David Hildenbrand wrote: >> On 21.06.22 13:55, Alistair Popple wrote: >>> David Hildenbrand writes: >>> >>>> On 21.06.22 13:25, Felix Kuehling wrote: >>&

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 13:55, Alistair Popple wrote: > > David Hildenbrand writes: > >> On 21.06.22 13:25, Felix Kuehling wrote: >>> >>> Am 6/17/22 um 23:19 schrieb David Hildenbrand: >>>> On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: >>

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 13:25, Felix Kuehling wrote: > > Am 6/17/22 um 23:19 schrieb David Hildenbrand: >> On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/17/2022 12:33 PM, David Hildenbrand wrote: >>>> On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex)

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/17/2022 12:33 PM, David Hildenbrand wrote: >> On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/17/2022 4:40 AM, David Hildenbrand wrote: >>>> On 31.05.22 22:00, Alex Sierra wrote:

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/17/2022 4:40 AM, David Hildenbrand wrote: >> On 31.05.22 22:00, Alex Sierra wrote: >>> Device memory that is cache coherent from device and CPU point of view. >>> This is used on platforms that hav

Re: [PATCH v5 02/13] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-17 Thread David Hildenbrand
flags with unclear semantics. Alternatively, properly document what that flag is actually doing and where it applies. I know, there was discussion on ... sorry for jumping in now, but this doesn't look clean to me yet. -- Thanks, David / dhildenb

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
RY_DEVICE_GENERIC, > MEMORY_DEVICE_PCI_P2PDMA, > @@ -143,6 +151,17 @@ static inline bool folio_is_device_private(const struct > folio *folio) In general, this LGTM, and it should be correct with PageAnonExclusive I think. However, where exactly is pinning forbidden? -- Thanks, David / dhildenb

Re: [PATCH v5 00/13] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-06-17 Thread David Hildenbrand
; few days. Unless sternly told not to do so! > I want to double-check some things regarding PageAnonExclusive interaction. I'm busy, but I'll try prioritizing it. -- Thanks, David / dhildenb

Re: [PATCH v2 01/12] dt-bindings: display/msm: hdmi: split and convert to yaml

2022-06-08 Thread David Heidelberg
not documented PHY: - moved into phy/ directory - split into QMP and non-QMP PHY schemas Co-developed-by: David Heidelberg David also needs to SoB here. no problem, for this or any later version of patches developed by me: Signed-off-by: David Heidelberg Signed-off-by: Dmitry

Re: [PATCH v1 1/7] dt-bindings: display/msm: hdmi: split and convert to yaml

2022-06-08 Thread David Heidelberg
Thank you for bringing it back to life! Reviewed-by: David Heidelberg On 07/06/2022 20:58, Dmitry Baryshkov wrote: Convert Qualcomm HDMI binding into HDMI TX and PHY yaml bindings. Changes to schema: HDMI: - fixed reg-names numbering to match 0..3 instead 0,1,3,4 PHY: - moved into phy

Re: [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before()

2022-06-07 Thread David Hildenbrand
el Vetter > Cc: Christoph Lameter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim > Cc: Andrew Morton > Cc: Vlastimil Babka > Cc: Roman Gushchin > Cc: linux...@kvack.org > --- LGTM Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 1/3] mm/page_alloc: use might_alloc()

2022-06-07 Thread David Hildenbrand
(should_fail_alloc_page(gfp_mask, order)) > return false; Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

RE: [PATCH 2/2] procfs: Add 'path' to /proc//fdinfo/

2022-06-01 Thread David Laight
Not to mention leading and trailing spaces! Anyone using filenames that only contain spaces does need shooting. Deliberately adding non-printables isn't really a good idea. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH] drm/st7735r: Fix module autoloading for Okaya RH128128T

2022-05-20 Thread David Lechner
28T") Signed-off-by: Javier Martinez Canillas --- Acked-by: David Lechner

RE: [PATCH v2 1/2] module: update dependencies at try_module_get()

2022-05-01 Thread David Laight
e zero, and a module unload in progress. The thread doing the unload is blocked somewhere. Another thread makes a callback into the module for some request that (for instance) would need to create a kernel thread. It tries to get a reference for the thread. So try_module_get(THIS_MODULE) is

Re: [PATCH 1/1] drm: add PSR2 support and capability definition as per eDP 1.5

2022-04-01 Thread Zhang, Dingchen (David)
[AMD Official Use Only] Hi Paul and Harry, Thanks for reviewing the patch and commit msg has been revised as per your comments in the v2. From: Paul Menzel Sent: Friday, April 1, 2022 1:46 AM To: Zhang, Dingchen (David) Cc: amd-...@lists.freedesktop.org ; dri-devel@lists.freedesktop.org

[PATCH v2] drm: add PSR2 support and capability definition as per eDP 1.5

2022-04-01 Thread David Zhang
-off-by: David Zhang Reviewed-by: Harry Wentland --- include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 30359e434c3f..ac7b7571ae66 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_help

[PATCH 1/1] drm: add PSR2 support and capability definition as per eDP 1.5

2022-03-31 Thread David Zhang
[why & how] In eDP 1.5 spec, some new DPCD bit fileds are defined for PSR-SU support. Signed-off-by: David Zhang --- include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 30359e434c3f..ac7b7571

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