id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
39ebd6dce62d8cfe3864e16148927a139f11bc9a | Analyze and fix the following issue in the Linux kernel code: mm/memory-failure: cast index to loff_t before shifting it | Problem Details:
On 32-bit systems, we'll lose the top bits of index because arithmetic
will be performed in unsigned long instead of unsigned long long. This
affects files over 4GB in size.
Link: https://lkml.kernel.org/r/20231218135837.3310403-4-willy@infradead.org
Fixes: 6100e34b2526 ("mm, memory_failure: Teach me... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 82e15baabb48..455093f73a70 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1704,7 +1704,7 @@ static void unmap_and_kill(struct list_head *to_kill, unsigned long pfn,
* mapping being torn down is communicated in siginfo, see
* ki... |
c79c5a0a00a9457718056b588f312baadf44e471 | Analyze and fix the following issue in the Linux kernel code: mm/memory-failure: check the mapcount of the precise page | Problem Details:
A process may map only some of the pages in a folio, and might be missed
if it maps the poisoned page but not the head page. Or it might be
unnecessarily hit if it maps the head page, but not the poisoned page.
Link: https://lkml.kernel.org/r/20231218135837.3310403-3-willy@infradead.org
Fixes: 7af446... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 6953bda11e6e..82e15baabb48 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1570,7 +1570,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn,
* This check implies we don't kill processes if their pages
* are i... |
376907f3a0b34a17e80417825f8cc1c40fcba81b | Analyze and fix the following issue in the Linux kernel code: mm/memory-failure: pass the folio and the page to collect_procs() | Problem Details:
Patch series "Three memory-failure fixes".
I've been looking at the memory-failure code and I believe I have found
three bugs that need fixing -- one going all the way back to 2010! I'll
have more patches later to use folios more extensively but didn't want
these bugfixes to get caught up in that.
... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 660c21859118..6953bda11e6e 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -595,10 +595,9 @@ struct task_struct *task_early_kill(struct task_struct *tsk, int force_early)
/*
* Collect processes when the error hit an anonymous page.
... |
0aac13add26d546ac74c89d2883b3a5f0fbea039 | Analyze and fix the following issue in the Linux kernel code: selftests: secretmem: floor the memory size to the multiple of page_size | Problem Details:
The "locked-in-memory size" limit per process can be non-multiple of
page_size. The mmap() fails if we try to allocate locked-in-memory with
same size as the allowed limit if it isn't multiple of the page_size
because mmap() rounds off the memory size to be allocated to next multiple
of page_size.
Fi... | ```diff
diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c
index 957b9e18c729..9b298f6a04b3 100644
--- a/tools/testing/selftests/mm/memfd_secret.c
+++ b/tools/testing/selftests/mm/memfd_secret.c
@@ -62,6 +62,9 @@ static void test_mlock_limit(int fd)
char *mem;
len =... |
fc346d0a70a13d52fe1c4bc49516d83a42cd7c4c | Analyze and fix the following issue in the Linux kernel code: mm: migrate high-order folios in swap cache correctly | Problem Details:
Large folios occupy N consecutive entries in the swap cache instead of
using multi-index entries like the page cache. However, if a large folio
is re-added to the LRU list, it can be migrated. The migration code was
not aware of the difference between the swap cache and the page cache and
assumed tha... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 35a88334bb3c..397f2a6e34cb 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -405,6 +405,7 @@ int folio_migrate_mapping(struct address_space *mapping,
int dirty;
int expected_count = folio_expected_refs(mapping, folio) + extra_count;
long nr = folio_nr_pages(fo... |
4249f13c11be8b8b7bf93204185e150c3bdc968d | Analyze and fix the following issue in the Linux kernel code: maple_tree: do not preallocate nodes for slot stores | Problem Details:
mas_preallocate() defaults to requesting 1 node for preallocation and then
,depending on the type of store, will update the request variable. There
isn't a check for a slot store type, so slot stores are preallocating the
default 1 node. Slot stores do not require any additional nodes, so add a
check... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index bb24d84a4922..684689457d77 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -5501,6 +5501,17 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)
mas_wr_end_piv(&wr_mas);
node_size = mas_wr_new_end(&wr_mas);
+
+ /* Slot store, d... |
e2c27b803bb664748e090d99042ac128b3f88d92 | Analyze and fix the following issue in the Linux kernel code: mm/filemap: avoid buffered read/write race to read inconsistent data | Problem Details:
The following concurrency may cause the data read to be inconsistent with
the data on disk:
cpu1 cpu2
------------------------------|------------------------------
// Buffered write 2048 from 0
ext4_bu... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index f1c8c278310f..ad5b4aa049a3 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2607,6 +2607,15 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
goto put_folios;
end_offset = min_t(loff_t, isize, iocb->ki_pos + iter->count);
+ /*
+ * Pairs... |
b2325bf860faa2f304a7e188f00cf9f7dc9b5ee8 | Analyze and fix the following issue in the Linux kernel code: kunit: kasan_test: disable fortify string checker on kmalloc_oob_memset | Problem Details:
Similar to commit 09c6304e38e4 ("kasan: test: fix compatibility with
FORTIFY_SOURCE") the kernel is panicing in kmalloc_oob_memset_*.
This is due to the `ptr` not being hidden from the optimizer which would
disable the runtime fortify string checker.
kernel BUG at lib/string_helpers.c:1048!
Call Trac... | ```diff
diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
index 8281eb42464b..34515a106ca5 100644
--- a/mm/kasan/kasan_test.c
+++ b/mm/kasan/kasan_test.c
@@ -493,14 +493,17 @@ static void kmalloc_oob_memset_2(struct kunit *test)
{
char *ptr;
size_t size = 128 - KASAN_GRANULE_SIZE;
+ size_t memset_size = 2... |
e63bde3d9417f8318d6dd0d0fafa35ebf307aabd | Analyze and fix the following issue in the Linux kernel code: kexec: select CRYPTO from KEXEC_FILE instead of depending on it | Problem Details:
All other users of crypto code use 'select' instead of 'depends on', so do
the same thing with KEXEC_FILE for consistency.
In practice this makes very little difference as kernels with kexec
support are very likely to also include some other feature that already
selects both crypto and crypto_sha256, ... | ```diff
diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
index 92120e396008..946dffa048b7 100644
--- a/kernel/Kconfig.kexec
+++ b/kernel/Kconfig.kexec
@@ -36,7 +36,8 @@ config KEXEC
config KEXEC_FILE
bool "Enable kexec file based system call"
depends on ARCH_SUPPORTS_KEXEC_FILE
- depends on CRYPTO_SHA256=y... |
c1ad12ee0efc07244be37f69311e6f7c4ac98e62 | Analyze and fix the following issue in the Linux kernel code: kexec: fix KEXEC_FILE dependencies | Problem Details:
The cleanup for the CONFIG_KEXEC Kconfig logic accidentally changed the
'depends on CRYPTO=y' dependency to a plain 'depends on CRYPTO', which
causes a link failure when all the crypto support is in a loadable module
and kexec_file support is built-in:
x86_64-linux-ld: vmlinux.o: in function `__x64_sy... | ```diff
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6f105ee4f3cf..1f11a62809f2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -608,10 +608,10 @@ config ARCH_SUPPORTS_KEXEC
def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)
config ARCH_SUPPORTS_KEXEC_FILE
- def_bool PPC64 && CRYPTO... |
2596e51ad3e26236657b63e5b37405454a858c35 | Analyze and fix the following issue in the Linux kernel code: m68k: Fix missing include | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index 7a2da780830b..8f2676c3a988 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -8,6 +8,7 @@
#ifndef __ASM_M68K_PROCESSOR_H
#define __ASM_M68K_PROCESSOR_H
+#include <linux/preempt.h>... |
a5a0abfdb319713261f43a7fac0a1c3eb0e9d8ea | Analyze and fix the following issue in the Linux kernel code: x86: fix missing includes/forward declarations | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h
index 66eb5e1ac4fb..0cec92c430cc 100644
--- a/arch/x86/include/asm/debugreg.h
+++ b/arch/x86/include/asm/debugreg.h
@@ -5,6 +5,7 @@
#include <linux/bug.h>
#include <linux/percpu.h>
#include <uapi/asm/debugreg.h>
+#include <asm/cpu... |
367e753d5c54a414d82610eb709fe71fda6cf1c3 | Analyze and fix the following issue in the Linux kernel code: dlm: fix format seq ops type 4 | Problem Details:
This patch fixes to set the type 4 format ops in case of table_open4().
It got accidentially changed by commit 541adb0d4d10 ("fs: dlm: debugfs
for queued callbacks") and since them toss debug dumps the same format
as format 5 that are the queued ast callbacks for lkbs.
Fixes: 541adb0d4d10 ("fs: dlm: d... | ```diff
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index 42f332f46359..c587bfadeff4 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -748,7 +748,7 @@ static int table_open4(struct inode *inode, struct file *file)
struct seq_file *seq;
int ret;
- ret = seq_open(file, &format5_seq_ops);
+ ret = seq... |
7ac5c53e00735d183a0f5e2cfce5eeb6c16319f2 | Analyze and fix the following issue in the Linux kernel code: bpf: Use c->unit_size to select target cache during free | Problem Details:
At present, bpf memory allocator uses check_obj_size() to ensure that
ksize() of allocated pointer is equal with the unit_size of used
bpf_mem_cache. Its purpose is to prevent bpf_mem_free() from selecting
a bpf_mem_cache which has different unit_size compared with the
bpf_mem_cache used for allocation... | ```diff
diff --git a/kernel/bpf/memalloc.c b/kernel/bpf/memalloc.c
index 6a51cfe4c2d6..aa0fbf000a12 100644
--- a/kernel/bpf/memalloc.c
+++ b/kernel/bpf/memalloc.c
@@ -490,27 +490,6 @@ static void prefill_mem_cache(struct bpf_mem_cache *c, int cpu)
alloc_bulk(c, c->unit_size <= 256 ? 4 : 1, cpu_to_node(cpu), false);
... |
3ac4b57ca12d5baaedd0d1a0cd532fa50911eaf0 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: coex: Still show hardware grant signal info even Wi-Fi is PS | Problem Details:
This can help to debug the grant signal and antenna path control issue
during Wi-Fi power saving mode.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231218061341.51255-6-pkshih@... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index 278ebe1333cc..a5373660da5b 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -7922,7 +7922,8 @@ static void _get_gnt(struct rtw89_dev *rtwdev, struct r... |
acc55d7dd4de525ac07e43e90ea3cc630677ec8a | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: coex: Fix wrong Wi-Fi role info and FDDT parameter members | Problem Details:
The Wi-Fi firmware 29.29.X should use version 2 role info format. FDDT
mechanism version 5 use the same cell members to judge traffic situation,
don't need to add another new format.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index 9c0db35d3e13..1ff04ff79cd1 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -131,7 +131,7 @@ static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = ... |
3b201c9af7c0cad2e8311d96c0c1b399606c70fa | Analyze and fix the following issue in the Linux kernel code: regmap: fix kcalloc() arguments order | Problem Details:
When compiling with gcc version 14.0.0 20231220 (experimental)
and W=1, I've noticed a bunch of four similar warnings like:
drivers/base/regmap/regmap-ram.c: In function '__regmap_init_ram':
drivers/base/regmap/regmap-ram.c:68:37: warning: 'kcalloc' sizes specified with
'sizeof' in the earlier argumen... | ```diff
diff --git a/drivers/base/regmap/regmap-ram.c b/drivers/base/regmap/regmap-ram.c
index 85f34a5dee04..192d6b131dff 100644
--- a/drivers/base/regmap/regmap-ram.c
+++ b/drivers/base/regmap/regmap-ram.c
@@ -65,12 +65,12 @@ struct regmap *__regmap_init_ram(const struct regmap_config *config,
return ERR_PTR(-EINVA... |
7887097c65446ff229099221975f6fc9ad9e378b | Analyze and fix the following issue in the Linux kernel code: perf maps: Fix up overlaps during fixup_end | Problem Details:
Maps are sometimes made overlapping, in particular kernel maps. If the
end of a map overlaps the start of the next, shorten the overlapping
map. This should remove potential non-determinism in maps__find, ie
finding maps by address.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adr... | ```diff
diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c
index dcd67384d877..0334fc18d9c6 100644
--- a/tools/perf/util/maps.c
+++ b/tools/perf/util/maps.c
@@ -701,7 +701,7 @@ void maps__fixup_end(struct maps *maps)
down_write(maps__lock(maps));
maps__for_each_entry(maps, curr) {
- if (prev != NULL &&... |
07ef14d50cf1af1caa49cd183216a517e75e8a93 | Analyze and fix the following issue in the Linux kernel code: perf maps: Refactor maps__fixup_overlappings() | Problem Details:
Rename to maps__fixup_overlap_and_insert() as the given mapping is
always inserted. Factor out first_ending_after() as a utility
function. Minor variable name changes. Switch to using debug_file()
rather than passing a debug FILE*.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adri... | ```diff
diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c
index f13fd3a9686b..94a97923527d 100644
--- a/tools/perf/util/maps.c
+++ b/tools/perf/util/maps.c
@@ -334,20 +334,16 @@ size_t maps__fprintf(struct maps *maps, FILE *fp)
return args.printed;
}
-int maps__fixup_overlappings(struct maps *maps, stru... |
ec49230cf6dda70437bf878281566dd82af9affa | Analyze and fix the following issue in the Linux kernel code: perf debug: Expose debug file | Problem Details:
Some dumping call backs need to be passed a FILE*. Expose debug file
via an accessor API for a consistent way to do this. Catch the
unlikely failure of it not being set. Switch two cases where stderr
was being used instead of debug_file.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyun... | ```diff
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 88378c4c5dd9..e282b4ceb4d2 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -38,12 +38,21 @@ bool dump_trace = false, quiet = false;
int debug_ordered_events;
static int redirect_to_stderr;
int debug_data_convert;
-stat... |
7beb82b7d590e51f698b1cf590b0e2785db1c498 | Analyze and fix the following issue in the Linux kernel code: tracing/synthetic: fix kernel-doc warnings | Problem Details:
scripts/kernel-doc warns about using @args: for variadic arguments to
functions. Documentation/doc-guide/kernel-doc.rst says that this should
be written as @...: instead, so update the source code to match that,
preventing the warnings.
trace_events_synth.c:1165: warning: Excess function parameter 'ar... | ```diff
diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index 846e02c0fb59..e7af286af4f1 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -1137,7 +1137,7 @@ EXPORT_SYMBOL_GPL(synth_event_add_fields);
* @cmd: A pointer to the dynevent_cmd stru... |
16f533ade706d33e60324ff32e526bda20bccbd9 | Analyze and fix the following issue in the Linux kernel code: perf unwind: Use function to add missing maps lock | Problem Details:
Switch read_unwind_spec_eh_frame() from loop macro
maps__for_each_entry() to maps__for_each_map() function that takes a
callback. The function holds the maps lock, which should be held during
iteration.
Committer notes:
Fixed up conflict with:
4fb54994b2360ab5 ("perf unwind-libunwind: Fix base add... | ```diff
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 5e5c3395a499..dac536e28360 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -302,12 +302,31 @@ static int unwind_spec_ehframe(struct dso *dso, struct mach... |
2d98dbb4c9c5b09c8d2411581ab17921f872dbd3 | Analyze and fix the following issue in the Linux kernel code: perf scripts python arm-cs-trace-disasm.py: Do not ignore disam first sample | Problem Details:
arm-cs-trace-disasm ignore disam the first branch sample, For example as
follow, the instructions beteween 0x0000ffffae878750 and
0x0000ffffae878754 is lose:
ARM CoreSight Trace Data Assembler Dump
Event type: branches:uH
Sample = { cpu: 0000 addr: 0x0000ffffae878750 phys_addr: 0x000000000000000... | ```diff
diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py
index e33aee5c78d7..d973c2baed1c 100755
--- a/tools/perf/scripts/python/arm-cs-trace-disasm.py
+++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py
@@ -188,6 +188,17 @@ def process_event(param_dict... |
881791886bfa8e353c3203f95bfbaaeee25d2d50 | Analyze and fix the following issue in the Linux kernel code: pwm: cros-ec: Drop documentation for dropped struct member | Problem Details:
Recently an unused member was removed from struct cros_ec_pwm_device,
but the kernel doc wasn't adapted accordingly. Catch up and drop the
documentation, too.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312190757.O4M9dsln-lkp@intel.com/
Fixes: 6c4406... | ```diff
diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 9a8f1b6a4e13..5fe303b8656d 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -18,7 +18,6 @@
/**
* struct cros_ec_pwm_device - Driver data for EC PWM
*
- * @dev: Device node
* @ec: Pointer to EC device
* @ch... |
b7760cf94d4f2665bf40d08dd69aa5d0b4aa593f | Analyze and fix the following issue in the Linux kernel code: tools/counter: Remove unneeded semicolon | Problem Details:
./tools/counter/counter_watch_events.c:233:3-4: Unneeded semicolon
./tools/counter/counter_watch_events.c:234:2-3: Unneeded semicolon
./tools/counter/counter_watch_events.c:333:2-3: Unneeded semicolon
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cg... | ```diff
diff --git a/tools/counter/counter_watch_events.c b/tools/counter/counter_watch_events.c
index 37d1b4b3e63d..107631e0f2e3 100644
--- a/tools/counter/counter_watch_events.c
+++ b/tools/counter/counter_watch_events.c
@@ -230,8 +230,8 @@ int main(int argc, char **argv)
break;
default:
return EXIT_FAILUR... |
0647537df442e0ec818fc0bca347f13c11268202 | Analyze and fix the following issue in the Linux kernel code: tools/counter: Fix spelling mistake "componend" -> "component" | Problem Details:
There are two spelling mistakes in the help text. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20231219133015.365943-1-colin.i.king@gmail.com
Signed-off-by: William Breathitt Gray <william.gr... | ```diff
diff --git a/tools/counter/counter_watch_events.c b/tools/counter/counter_watch_events.c
index 3898fe7e35ec..37d1b4b3e63d 100644
--- a/tools/counter/counter_watch_events.c
+++ b/tools/counter/counter_watch_events.c
@@ -120,8 +120,8 @@ static void print_usage(void)
" evt_capture (COUNTER_EVENT... |
e43c64c971e48d11ee100c5a8b2eadbed056f924 | Analyze and fix the following issue in the Linux kernel code: perf archive: Add new option '--unpack' to expand tarballs | Problem Details:
Archives generated by the command 'perf archive' have to be unpacked
manually.
Following the addition of option '--all' now there also exist a nested
structure of tars, and after further discussion with Red Hat Global
Support Services, they found a feature correctly unpacking archives of
'perf archive... | ```diff
diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
index a92042eae95a..f94795794b36 100755
--- a/tools/perf/perf-archive.sh
+++ b/tools/perf/perf-archive.sh
@@ -7,17 +7,72 @@ PERF_DATA=perf.data
PERF_SYMBOLS=perf.symbols
PERF_ALL=perf.all
ALL=0
+UNPACK=0
while [ $# -gt 0 ] ; do
if [ $1... |
da65f29dada7f7cbbf0d6375b88a0316f5f7d6f5 | Analyze and fix the following issue in the Linux kernel code: timers: Fix nextevt calculation when no timers are pending | Problem Details:
When no timer is queued into an empty timer base, the next_expiry will not
be updated. It was originally calculated as
base->clk + NEXT_TIMER_MAX_DELTA
When the timer base stays empty long enough (> NEXT_TIMER_MAX_DELTA), the
next_expiry value of the empty base suggests that there is a timer pendin... | ```diff
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index cf51655add64..352b161113cd 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1922,8 +1922,8 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expires)
u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
{
struct timer_base ... |
cb665db94fc61512c9c94ed1d42af67e7bf6ce01 | Analyze and fix the following issue in the Linux kernel code: tick-sched: Fix function names in comments | Problem Details:
When referencing functions in comments, it might be helpful to use full
function names (including the prefix) to be able to find it when grepping.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic... | ```diff
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index be77b021e5d6..ff25fdff6b7c 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -920,11 +920,11 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
}
/*
- * nohz_stop_sched_tick() can be called severa... |
daca194876a94565194f6e32ddb0355af8cf30f7 | Analyze and fix the following issue in the Linux kernel code: vfio/virtio: Declare virtiovf_pci_aer_reset_done() static | Problem Details:
Declare virtiovf_pci_aer_reset_done() as a static function to prevent
the below build warning.
"warning: no previous prototype for 'virtiovf_pci_aer_reset_done'
[-Wmissing-prototypes]"
Fixes: eb61eca0e8c3 ("vfio/virtio: Introduce a vfio driver over virtio devices")
Reported-by: Stephen Rothwell <sfr@... | ```diff
diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
index 291c55b641f1..d5af683837d3 100644
--- a/drivers/vfio/pci/virtio/main.c
+++ b/drivers/vfio/pci/virtio/main.c
@@ -547,7 +547,7 @@ static const struct pci_device_id virtiovf_pci_table[] = {
MODULE_DEVICE_TABLE(pci, virtiovf_pci_t... |
19f1016ea9600ed89bc24247c36ff5934ad94fbb | Analyze and fix the following issue in the Linux kernel code: pwm: stm32: Fix enable count for clk in .probe() | Problem Details:
Make the driver take over hardware state without disabling in .probe()
and enable the clock for each enabled channel.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[ukleinek: split off from a patch that also implemented .get_state()]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix... | ```diff
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 9a7d7891edde..5f10cba492ec 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -605,17 +605,21 @@ static void stm32_pwm_detect_complementary(struct stm32_pwm *priv)
priv->have_complementary_output = (ccer != 0);
}
-stati... |
e56ec7b7527c2be54a0c15064c71838fd5c49d4b | Analyze and fix the following issue in the Linux kernel code: pwm: stm32: Implement .get_state() | Problem Details:
Implement the &pwm_ops->get_state callback so drivers can inherit PWM
state set by the bootloader.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[ukl: split off from a patch that also fixes clk enable count in .probe()]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-... | ```diff
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 0da371291cef..9a7d7891edde 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -471,8 +471,50 @@ static int stm32_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device *pwm,
return ret;
}
+static int stm32_pwm_get_st... |
0360a48733729f9329483409acd048d04b43ee17 | Analyze and fix the following issue in the Linux kernel code: pwm: Mention PWM chip ID in /sys/kernel/debug/pwm | Problem Details:
While it's not hard to match the entries from /sys/kernel/debug/pwm to
the corresponding pwmchip in /sys/class/pwm, it's a bit simpler to have
the number mentioned in /sys/kernel/debug/pwm.
Link: https://lore.kernel.org/r/20230808165250.942396-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine... | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index ebe404dfdf5b..fb36b3d559a7 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -1062,7 +1062,8 @@ static int pwm_seq_show(struct seq_file *s, void *v)
{
struct pwm_chip *chip = v;
- seq_printf(s, "%s%s/%s, %d PWM device%s\n", (char *)s->pri... |
54c86dd20bba23109e32e4e2f94ff93dd9863bc3 | Analyze and fix the following issue in the Linux kernel code: pwm: Replace PWM chip unique base by unique ID | Problem Details:
Traditionally each PWM device had a unique ID stored in the "pwm" member
of struct pwm_device. However this number was hardly used and dropped
in the previous commit. To identify a certain PWM you're supposed to use
the chip's ID and the hwpwm of the PWM device now.
With the PWM chip base gone PWM chi... | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 24bb796d15f6..ebe404dfdf5b 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -8,6 +8,7 @@
#include <linux/acpi.h>
#include <linux/module.h>
+#include <linux/idr.h>
#include <linux/of.h>
#include <linux/pwm.h>
#include <linux/list.h>
@@ ... |
32f24938a1fce95fce314c1fa9a72af74588ea6c | Analyze and fix the following issue in the Linux kernel code: samples/bpf: Use %lu format specifier for unsigned long values | Problem Details:
Currently %ld format specifiers are being used for unsigned long
values. Fix this by using %lu instead. Cleans up cppcheck warnings:
warning: %ld in format string (no. 1) requires 'long' but the argument
type is 'unsigned long'. [invalidPrintfArgType_sint]
Signed-off-by: Colin Ian King <colin.i.king@... | ```diff
diff --git a/samples/bpf/cpustat_user.c b/samples/bpf/cpustat_user.c
index ab90bb08a2b4..356f756cba0d 100644
--- a/samples/bpf/cpustat_user.c
+++ b/samples/bpf/cpustat_user.c
@@ -66,10 +66,10 @@ static void cpu_stat_print(void)
printf("CPU-%-6d ", j);
for (i = 0; i < MAX_CSTATE_ENTRIES; i++)
- printf(... |
fa3d6c7183106a187a8d399216db3f088a6aab81 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360 | Problem Details:
This patch fix the warning introduced by mt6360 node in
mt8395-genio-1200-evk.dts.
arch/arm64/boot/dts/mediatek/mt8195.dtsi:464.4-27: Warning (interrupts_property): /soc/i2c@11d01000/pmic@34:#interrupt-cells: size is (8), expected multiple of 16
Add a missing 'interrupt-parent' to fix this warning.
... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts b/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
index 70b465f7c6a7..00ac59a873e8 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
@@ -238,6 +238,7 @@
mt6... |
7315dc1e122c85ffdfc8defffbb8f8b616c2eb1a | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: skip set commit for deleted/destroyed sets | Problem Details:
NFT_MSG_DELSET deactivates all elements in the set, skip
set->ops->commit() to avoid the unnecessary clone (for the pipapo case)
as well as the sync GC cycle, which could deactivate again expired
elements in such set.
Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with co... | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index c5c17c6e80ed..be04af433988 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9887,7 +9887,7 @@ static void nft_set_commit_update(struct list_head *set_update_list)
list_for_each_entry_safe(set, ne... |
11f9eb899ecc8c02b769cf8d2532ba12786a7af7 | Analyze and fix the following issue in the Linux kernel code: drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE | Problem Details:
When mgag200 switched from simple KMS to regular atomic helpers,
the initialization of the gamma settings was lost.
This leads to a black screen, if the bios/uefi doesn't use the same
pixel color depth.
This has been fixed with commit ad81e23426a6 ("drm/mgag200: Fix gamma
lut not initialized.") for mos... | ```diff
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 57c7edcab602..765e49fd8911 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -392,6 +392,11 @@ void mgag200_primary_plane_helper_atomic_disable(struct drm_plane *plane... |
78403b37f6770441f80a78d13772394731afe055 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8180x: Fix up PCIe nodes | Problem Details:
Duplicated clock output names cause probe errors and wrong clocks cause
hardware not to work. Fix such issues.
Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231219-topic-8180_pcie-v1-1-c2a... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 953179e70c9b..0430d99091e3 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -1762,7 +1762,7 @@
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AH... |
45e8c72712345263208f7c94f334fa718634f557 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8180x: Mark PCIe hosts cache-coherent | Problem Details:
The PCIe controllers on 8180 are cache-coherent. Mark them as such.
Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231219-topic-8180_pcie_dmac-v1-1-5d00fc1b23fd@linaro.org
Signed-off-by: Bj... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 25e41d195374..953179e70c9b 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -1751,6 +1751,7 @@
phys = <&pcie0_phy>;
phy-names = "pciephy";
+ dma-coherent;... |
94c71705cc49092cef60ece13a28680809096fd4 | Analyze and fix the following issue in the Linux kernel code: pinctrl: cy8c95x0: Fix get_pincfg | Problem Details:
Invert the register value for PIN_CONFIG_OUTPUT_ENABLE to return
the opposite of PIN_CONFIG_INPUT_ENABLE.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20231219125120.4028862-3-patrick.rudolph@9elements.com
Signed-off-by: Linus Walleij <linus.walleij@li... | ```diff
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index b925789a035f..fe9545c630a2 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -715,6 +715,8 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip,
ret = regmap_rea... |
04dfca968cf7349773126340991b68a83378aca2 | Analyze and fix the following issue in the Linux kernel code: pinctrl: cy8c95x0: Fix regression | Problem Details:
Commit 1fa3df901f2c ("pinctrl: cy8c95x0: Remove custom ->set_config()")
removed support for PIN_CONFIG_INPUT_ENABLE and
PIN_CONFIG_OUTPUT.
Add the following options to restore functionality:
- PIN_CONFIG_INPUT_ENABLE
- PIN_CONFIG_OUTPUT_ENABLE
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements... | ```diff
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index a8c7f00cceef..b925789a035f 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -308,6 +308,9 @@ static const char * const cy8c95x0_groups[] = {
"gp77",
};
+static int cy8c95x0_... |
47b1fa48116238208c1b1198dba10f56fc1b6eb2 | Analyze and fix the following issue in the Linux kernel code: pinctrl: cy8c95x0: Fix typo | Problem Details:
Fix typo to make pinctrl-cy8c95x compile again.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20231219125120.4028862-1-patrick.rudolph@9elements.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index 4ccfa99ed93a..a8c7f00cceef 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -822,7 +822,7 @@ static int cy8c95x0_setup_gpiochip(struct cy8c95x0_pinctrl *chip)
gc->get_direction... |
74cef6872ceaefb5b6c5c60641371ea28702d358 | Analyze and fix the following issue in the Linux kernel code: afs: Fix dynamic root lookup DNS check | Problem Details:
In the afs dynamic root directory, the ->lookup() function does a DNS check
on the cell being asked for and if the DNS upcall reports an error it will
report an error back to userspace (typically ENOENT).
However, if a failed DNS upcall returns a new-style result, it will return
a valid result, with t... | ```diff
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 34474a061654..1f656005018e 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -114,6 +114,7 @@ static int afs_probe_cell_name(struct dentry *dentry)
struct afs_net *net = afs_d2net(dentry);
const char *name = dentry->d_name.name;
size_t len = den... |
71f8b55bc30e82d6355e07811213d847981a32e2 | Analyze and fix the following issue in the Linux kernel code: afs: Fix the dynamic root's d_delete to always delete unused dentries | Problem Details:
Fix the afs dynamic root's d_delete function to always delete unused
dentries rather than only deleting them if they're positive. With things
as they stand upstream, negative dentries stemming from failed DNS lookups
stick around preventing retries.
Fixes: 66c7e1d319a5 ("afs: Split the dynroot stuff ... | ```diff
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 1fa8cf23bd36..34474a061654 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -252,20 +252,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags)
return 1;
}
-/*
- * Allow the VFS to enquire as to whether a dentry shou... |
00bb152d62825b5f659d9b4ff87d49637e44eea0 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: xilinx: Rename *gpio to *gpio-grp | Problem Details:
Anything ending with gpio/gpios is taken as gpio phande/description which
is reported as the issue coming from gpio-consumer.yaml schema.
That's why rename the gpio suffix to gpio-grp to avoid name collision.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Krzysztof Kozlowski <krzyszto... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.yaml
index b85f9e36ce4b..d2676f92ef5b 100644
--- a/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zyn... |
bd7f77dae69532ffc027ee50ff99e3792dc30b7f | Analyze and fix the following issue in the Linux kernel code: net: stmmac: fix incorrect flag check in timestamp interrupt | Problem Details:
The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
flag is set.
Fixes: aa5513f5d95f ("net: stmmac: replace the ext_snapshot_en field with a flag")
Cc: <stable@vger.kernel.org> # 6.6
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Lai Peter Jun Ann <... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
index 540f6a4ec0b8..f05bd757dfe5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
@@ -237,7 +237,7 @@ static vo... |
41ef75c848e33beb1f7b981866b62b0066f744c7 | Analyze and fix the following issue in the Linux kernel code: x86/asm: Replace magic numbers in GDT descriptors, preparations | Problem Details:
We'd like to replace all the magic numbers in various GDT descriptors
with new, semantically meaningful, symbolic values.
In order to be able to verify that the change doesn't cause any actual
changes to the compiled binary code, I've split the change into two
patches:
- Part 1 (this commit): everyt... | ```diff
diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index 40031a614712..0361b5307bd8 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -11,6 +11,7 @@
*/
#include "boot.h"
+#include <asm/desc_defs.h>
#include <asm/segment.h>
/*
diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/... |
0ae8e4cca78781401b17721bfb72718fdf7b4912 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: set transport offset from mac header for netdev/egress | Problem Details:
Before this patch, transport offset (pkt->thoff) provides an offset
relative to the network header. This is fine for the inet families
because skb->data points to the network header in such case. However,
from netdev/egress, skb->data points to the mac header (if available),
thus, pkt->thoff is missing... | ```diff
diff --git a/include/net/netfilter/nf_tables_ipv4.h b/include/net/netfilter/nf_tables_ipv4.h
index 947973623dc7..60a7d0ce3080 100644
--- a/include/net/netfilter/nf_tables_ipv4.h
+++ b/include/net/netfilter/nf_tables_ipv4.h
@@ -30,7 +30,7 @@ static inline int __nft_set_pktinfo_ipv4_validate(struct nft_pktinfo *p... |
3f5f63adeea7e7aa715e101ffe4b4ac9705f9664 | Analyze and fix the following issue in the Linux kernel code: clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks | Problem Details:
To be compatible with SCU firmware based on 1.15 a different clock
routing for LVDS is needed.
Signed-off-by: Oliver F. Brown <oliver.brown@oss.nxp.com>
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Abel... | ```diff
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 41f0a45aa162..7d8883916cac 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -66,6 +66,22 @@ static const char * const lcd_pxl_sels[] = {
"lcd_pxl_bypass_div_clk",
};
+static const char *const l... |
21c0efbcb45cf94724d17b040ebc03fcd4a81f22 | Analyze and fix the following issue in the Linux kernel code: clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() | Problem Details:
In cases where imx_clk_is_resource_owned() returns false, the code path
does not handle the failure gracefully, potentially leading to a memory
leak. This fix ensures proper cleanup by freeing the allocated memory
for 'clk_node' before returning.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Rev... | ```diff
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index be89180dd19c..e48a904c0013 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -886,8 +886,10 @@ struct clk_hw *__imx_clk_gpr_scu(const char *name, const char * const *parent_na
return ERR_PTR(-EINVAL);
}
- if ... |
023e6aad7e5e7f2e086c399abd0675589c123728 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: s3c2410: fix Excess struct member description kernel-doc warnings | Problem Details:
Delete 2 lines to prevent warnings from scripts/kernel-doc:
s3c2410.c:117: warning: Excess struct member 'mtd' description in 's3c2410_nand_mtd'
s3c2410.c:168: warning: Excess struct member 'freq_transition' description in 's3c2410_nand_info'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Report... | ```diff
diff --git a/drivers/mtd/nand/raw/s3c2410.c b/drivers/mtd/nand/raw/s3c2410.c
index 3d3d5c9814ff..48c1d0eb66ca 100644
--- a/drivers/mtd/nand/raw/s3c2410.c
+++ b/drivers/mtd/nand/raw/s3c2410.c
@@ -105,7 +105,6 @@ struct s3c2410_nand_info;
/**
* struct s3c2410_nand_mtd - driver MTD structure
- * @mtd: The MTD... |
d605ba72e9c04efc35fcf225df59d4ccb1d4061f | Analyze and fix the following issue in the Linux kernel code: w1: ds2490: support block sizes larger than 128 bytes in ds_read_block | Problem Details:
The current ds_read_block function only supports block sizes up to
128 bytes, which is the depth of the 'data out' fifo on the ds2490.
Reading larger blocks will fail with a: -110 (ETIMEDOUT) from
usb_control_msg(). Example:
$ dd if=/sys/bus/w1/devices/43-000000478756/eeprom bs=256 count=1
yield... | ```diff
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index 5f5b97e24700..e1cac0730cbb 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -98,6 +98,8 @@
#define ST_EPOF 0x80
/* Status transfer size, 16 bytes status, 16 byte result flags */
#define ST_SIZE 0x2... |
82a8903a9f9f3ff31027b9a0b92f7505f981f09c | Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix the sparse warnings | Problem Details:
Fix the following warnings reported
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: warning: invalid assignment: |=
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: left side has type restricted __le16
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: right side has type unsigned long
...
... | ```diff
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
index 967c6691e413..7fd4506b3584 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
@@ -632,7 +632,7 @@ static inline u16 bnxt_qplib_calc_ilsize(struct bnxt_qplib_sw... |
9248f363d0791a548a9c7711365b8be4c70bd375 | Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix the offset for GenP7 adapters for user applications | Problem Details:
User Doorbell page indexes start at an offset for GenP7 adapters.
Fix the offset that will be used for user doorbell page indexes.
Fixes: a62d68581441 ("RDMA/bnxt_re: Update the BAR offsets")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1702987900-5363-1-gi... | ```diff
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index eb03ebad2e5a..f022c922fae5 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -108,12 +108,14 @@ static void bnxt_re_set_db_offset(struct bnxt_re_dev *rdev)
dev_info(rde... |
a971ed8002110f211899279cd7295756d263b771 | Analyze and fix the following issue in the Linux kernel code: virtio_blk: remove the broken zone revalidation support | Problem Details:
virtblk_revalidate_zones is called unconditionally from
virtblk_config_changed_work from the virtio config_changed callback.
virtblk_revalidate_zones is a bit odd in that it re-clears the zoned
state for host aware or non-zoned devices, which isn't needed unless the
zoned mode changed - but a zone mod... | ```diff
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index aeead732a24d..a28f1687066b 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -722,27 +722,6 @@ fail_report:
return ret;
}
-static void virtblk_revalidate_zones(struct virtio_blk *vblk)
-{
- u8 model;
-
- vi... |
441c725ed592cb22f2a82f2827dccd045356cc81 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Close cgrp fd before calling cleanup_cgroup_environment() | Problem Details:
There is error log when htab-mem benchmark completes. The error log
looks as follows:
$ ./bench htab-mem -d1
Setting up benchmark 'htab-mem'...
Benchmark 'htab-mem' started.
......
(cgroup_helpers.c:353: errno: Device or resource busy) umount cgroup2
Fix it by closing cgrp fd before invoking cleanup_... | ```diff
diff --git a/tools/testing/selftests/bpf/benchs/bench_htab_mem.c b/tools/testing/selftests/bpf/benchs/bench_htab_mem.c
index 9146d3f414d2..926ee822143e 100644
--- a/tools/testing/selftests/bpf/benchs/bench_htab_mem.c
+++ b/tools/testing/selftests/bpf/benchs/bench_htab_mem.c
@@ -335,6 +335,7 @@ static void htab_... |
0a0ffcac92d5b41133c97d260ad1f320572783a5 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: add global subprog annotation tests | Problem Details:
Add test cases to validate semantics of global subprog argument
annotations:
- non-null pointers;
- context argument;
- const dynptr passing;
- packet pointers (data, metadata, end).
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https:/... | ```diff
diff --git a/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c b/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
index bd696a431244..9eeb2d89cda8 100644
--- a/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
+++ b/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
@... |
b0c279ff6cc97a34d8caaf28381e72bb111b5e16 | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix BCH_FSCK_ERR enum | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h
index d167d65986e0..fec17d1353d1 100644
--- a/fs/bcachefs/error.h
+++ b/fs/bcachefs/error.h
@@ -157,6 +157,7 @@ void bch2_flush_fsck_errs(struct bch_fs *);
#define fsck_err_on(cond, c, _err_type, ...) \
__fsck_err_on(cond, c, FSCK_CAN_FIX|FSCK_CAN_IGN... |
247ce5f1bb3ea90879e8552b8edf4885b9a9f849 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_alloc_sectors_start_trans() error handling | Problem Details:
When we fail to allocate because of insufficient open buckets, we don't
want to retry from the full set of devices - we just want to retry in
blocking mode.
But if the retry in blocking mode fails with a different error code, we
end up squashing the -BCH_ERR_open_buckets_empty error with an error
that... | ```diff
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c
index 1ba0eeb7552a..0e6157982607 100644
--- a/fs/bcachefs/alloc_foreground.c
+++ b/fs/bcachefs/alloc_foreground.c
@@ -1374,8 +1374,17 @@ retry:
goto alloc_done;
/* Don't retry from all devices if we're out of open buckets: */
... |
85dbfe47d07cddeac959ccc9352c4b0f1683225b | Analyze and fix the following issue in the Linux kernel code: drm/xe: Invalidate TLB also on bind if in scratch page mode | Problem Details:
For scratch table mode we need to cover the case where a scratch PTE might
have been pre-fetched and cached and used instead of that of the newly
bound vma.
For compute vms, invalidate TLB globally using GuC before signalling
bind complete. For !long-running vms, invalidate TLB at batch start.
Also do... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gpu_commands.h b/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
index 0f9c5b0b8a3b..1a744c508174 100644
--- a/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
+++ b/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
@@ -73,6 +73,7 @@
#define PIPE_CONTROL_STORE_DATA_INDEX (1<<21)
#define... |
f1a5a9bf14182ae659cb3b5331021662c1ee1d9a | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Read HXG fields from DW1 of G2H response | Problem Details:
The HXG fields are DW1 not DW0, fix this.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 137c184df487..615cc4d4ad69 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -790,13 +790,13 @@ static int parse_g2h_response(struct xe_guc_ct *ct, u32 *msg, u32 len)
if (type == GUC_HXG_TYPE_R... |
a0385a840ca02585d16a1ed4b10b501d17853d33 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix some formatting issues in uAPI | Problem Details:
Fix spacing, alignment, and repeated words in the documentation.
Reported-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 7d317b9564e9..83868af45984 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -105,16 +105,16 @@ struct xe_user_extension {
#define DRM_IOCTL_XE_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_CREATE, struct drm... |
433002ca3670769270a2f8f3a5073e9f370b0562 | Analyze and fix the following issue in the Linux kernel code: drm/xe: REBAR resize should be best effort | Problem Details:
The resizing of the PCI BAR is a best effort feature. If it is
not available, it should not fail the driver probe.
Rework the resize to not exit on failure.
Fixes: 7f075300a318 ("drm/xe: Simplify rebar sizing")
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matthew Auld <matthew.a... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 475b14fe4356..f7a7f996b37f 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -47,7 +47,7 @@ mask_err:
return err;
}
-static int
+static void
_resize_bar(struct xe_device *xe, int resno, resource_si... |
08516de501fae647fb29bf3b62718de56cc24014 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add kerneldoc description of multi-tile devices | Problem Details:
v2:
- Fix doubled word. (Lucas)
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-32-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/Documentation/gpu/xe/index.rst b/Documentation/gpu/xe/index.rst
index 2fddf9ed251e..5c4d6bb370f3 100644
--- a/Documentation/gpu/xe/index.rst
+++ b/Documentation/gpu/xe/index.rst
@@ -21,3 +21,4 @@ DG2, etc is provided to prototype the driver.
xe_wa
xe_rtp
xe_firmware
+ xe_tile
diff --g... |
08dea7674533cfd49764bcd09ba84de7143361ab | Analyze and fix the following issue in the Linux kernel code: drm/xe: Move migration from GT to tile | Problem Details:
Migration primarily focuses on the memory associated with a tile, so it
makes more sense to track this at the tile level (especially since the
driver was already skipping migration operations on media GTs).
Note that the blitter engine used to perform the migration always lives
in the tile's primary G... | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index f933e5df6c12..5309204d8d1b 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -35,7 +35,7 @@ static int ccs_test_migrate(struct xe_gt *gt, struct xe_bo *bo,
/* Optionally clear bo *and... |
f79ee3013ad57021f4557cd3aa964a14b5c94bd4 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add backpointer from gt to tile | Problem Details:
Rather than a backpointer to the xe_device, a GT should have a
backpointer to its tile (which can then be used to lookup the device if
necessary).
The gt_to_xe() helper macro (which moves from xe_gt.h to xe_gt_types.h)
can and should still be used to jump directly from an xe_gt to
xe_device.
v2:
- F... | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 6075f12a1962..8f3afdc6cca6 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -90,7 +90,7 @@ static int ccs_test_migrate(struct xe_gt *gt, struct xe_bo *bo,
}
/* Check last CCS value... |
a5edc7cdb3875115d1798f4d2057569cf257e7d2 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Introduce xe_tile | Problem Details:
Create a new xe_tile structure to begin separating the concept of "tile"
from "GT." A tile is effectively a complete GPU, and a GT is just one
part of that. On platforms like MTL, there's only a single full GPU
(tile) which has its IP blocks provided by two GTs. In contrast, a
"multi-tile" platform ... | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 9bd381e5b7a6..6075f12a1962 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -174,7 +174,7 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni
struct xe_... |
dbc4f5d15a8eecf0f5e7ba1a8e563c31237f6adb | Analyze and fix the following issue in the Linux kernel code: drm/xe/mtl: Disable media GT | Problem Details:
Xe incorrectly conflates the concept of 'tile' and 'GT.' Since MTL's
media support is not yet functioning properly, let's just disable it
completely for now while we fix the fundamental driver design. Support
for media GTs on platforms like MTL will be re-added later.
v2:
- Drop some unrelated code... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index d3b57669c9a7..ef2353eef6fe 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -340,8 +340,6 @@ static void xe_mmio_probe_tiles(struct xe_device *xe)
mtcfg = xe_mmio_read64(gt, XEHP_MTCFG_ADDR);
adj_ti... |
dbd6c64c99a8eb5ed85adec5a24e30a62ace7b91 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: fix double list add | Problem Details:
It looks like the driver only wants to track one vma for each external
object per vm. However it looks like bo_has_vm_references_locked() will
ignore any vma that is marked as vma->destroyed (not actually destroyed
yet). If we then mark our externally tracked vma as destroyed and then
create a new vma ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index ffa102870d1f..5af370640fb1 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -964,7 +964,7 @@ bo_has_vm_references_locked(struct xe_bo *bo, struct xe_vm *vm,
struct xe_vma *vma;
list_for_each_entry(vma, &b... |
3af4365003971946fdd2cca44858d6d16929f2d3 | Analyze and fix the following issue in the Linux kernel code: drm/xe: keep pulling mem_access_get further back | Problem Details:
Lockdep is unhappy about ggtt->lock -> runtime_pm, where it seems
to think this can somehow get inverted. The ggtt->lock looks like a
potentially sensitive driver lock, so likely a sensible move to never
call the runtime_pm routines while holding it. Actually it looks like
d3cold wants to grab this, so... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 98903354b436..1ed22b5f89ad 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -142,12 +142,14 @@ static void xe_ggtt_initial_clear(struct xe_ggtt *ggtt)
u64 start, end;
/* Display may have allocated... |
9922bb40e2ef98c17fb142d22843c0c70ba35e5b | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix the migrate selftest for integrated GPUs | Problem Details:
The TTM resource cursor was set up incorrectly.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index 0f4371ad1fd9..f8ee9b9fca99 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -303,9 +303,14 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *t... |
87c299fa3a97740ddc0fa9b19ee4054004686f76 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Port Wa_14014475959 to xe_wa and fix it | Problem Details:
Port Wa_14014475959 to xe_wa fixing its condition. The workaround should
only be applied on the primary GT, not on media. So just checking by
MTL platform is not enough: checking GT is of the right type is also
needed.
Since the GRAPHICS_STEP() does checks the GT type, we could leave the
first check a... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 3ed460d3b6ca..ecc843d91f62 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -142,9 +142,7 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
if (XE_WA(gt, 16011759253))
flags |= GUC_WA_GAM_CREDITS;
-... |
9616e74b796c752ec29c3c83f3e33277d2b25b8e | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add support for OOB workarounds | Problem Details:
There are WAs that, due to their nature, cannot be applied from a
central place like xe_wa.c. Those are peppered around the rest of the
code, as needed. Now they have a new name: "out-of-band workarounds".
These workarounds have their names and rules still grouped in xe_wa.c,
inside the xe_wa_oob arr... | ```diff
diff --git a/drivers/gpu/drm/xe/.gitignore b/drivers/gpu/drm/xe/.gitignore
index 81972dce1aff..8778bf132674 100644
--- a/drivers/gpu/drm/xe/.gitignore
+++ b/drivers/gpu/drm/xe/.gitignore
@@ -1,2 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
*.hdrtest
+/generated
+/xe_gen_wa_oob
diff --git a/drivers/gpu/drm/... |
a9bd807eb16be11e11f6c6d3921119381cc43135 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix Wa_22011802037 annotation | Problem Details:
It was missing one digit, so not showing up as a proper WA number. Add
the missing number and annotate it with a FIXME as there are more to be
implemented to consider this WA done: ensure CS is stop before doing a
reset, wait for pending.
Also, this WA applies to platforms up to graphics version 1270 ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 71f18b32d09b..a8e249205bff 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -160,9 +160,11 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
flags |= GUC_WA_DUAL_QUEUE;
/*
- * Wa_2201180203
+ * Wa... |
1b1d3710380d5f0517dcaabe1b96b6401f68ec37 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Apply upper limit to sg element size | Problem Details:
The iommu_dma_map_sg() function ensures iova allocation doesn't
cross dma segment boundary. It does so by padding some sg elements.
This can cause overflow, ending up with sg->length being set to 0.
Avoid this by halving the maximum segment size (rounded down to
PAGE_SIZE).
Specify maximum segment siz... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 4693372ec82e..7a5118bf4dc0 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -251,9 +251,11 @@ static int xe_tt_map_sg(struct ttm_tt *tt)
if (xe_tt->sg)
return 0;
- ret = sg_alloc_table_from_pages(&xe_tt-... |
82f428b627607cd4ae0355c09b3164961b041505 | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix kernel-doc issues | Problem Details:
drivers/gpu/drm/xe/xe_guc_submit_types.h:47: warning: cannot understand
function prototype: 'struct guc_submit_parallel_scratch '
drivers/gpu/drm/xe/xe_devcoredump_types.h:38: warning: Function
parameter or member 'ct' not described in 'xe_devcoredump_snapshot'
CI doesn't appear to be running BAT any... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_devcoredump_types.h b/drivers/gpu/drm/xe/xe_devcoredump_types.h
index 350b905d1797..c0d711eb6ab3 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump_types.h
+++ b/drivers/gpu/drm/xe/xe_devcoredump_types.h
@@ -27,7 +27,7 @@ struct xe_devcoredump_snapshot {
ktime_t boot_time;
/... |
5013ad8dd75fdc035ff068980c91cf2ea821d142 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Move Media GuC register definition to regs/ | Problem Details:
This GuC register can be moved together with the rest of the
GuC register definitions and be named in a similar way.
v2: fix placement
Bspec: 63363
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> #v1
Cc: Lucas De Marchi <lucas.demarch... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_guc_regs.h b/drivers/gpu/drm/xe/regs/xe_guc_regs.h
index 37e0ac550931..b4f27cadb68f 100644
--- a/drivers/gpu/drm/xe/regs/xe_guc_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_guc_regs.h
@@ -119,6 +119,8 @@ struct guc_doorbell_info {
#define VF_SW_FLAG(n) XE_REG(0x190240 + (n... |
1825c492daafc39e2eaeacc0f05372aca4ab6f7f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Introduce guc_submit_types.h with relevant structs. | Problem Details:
These structs and definitions are only used for the guc_submit
and they were added specifically for the parallel submission.
While doing that also delete the unused struct guc_wq_item.
v2: checkpatch fixes.
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.c... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_fwif.h b/drivers/gpu/drm/xe/xe_guc_fwif.h
index 20155ba4ef07..27d132ce2087 100644
--- a/drivers/gpu/drm/xe/xe_guc_fwif.h
+++ b/drivers/gpu/drm/xe/xe_guc_fwif.h
@@ -46,35 +46,6 @@
#define GUC_MAX_ENGINE_CLASSES 16
#define GUC_MAX_INSTANCES_PER_CLASS 32
-/* Work item fo... |
513260dfd150a49ad117f1b7c50097a1d74c0085 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Convert GuC CT print to snapshot capture and print. | Problem Details:
The goal is to allow for a snapshot capture to be taken at the time
of the crash, while the print out can happen at a later time through
the exposed devcoredump virtual device.
v2: Handle memory allocation failures. (Matthew)
Do not use GFP_ATOMIC on cases like debugfs prints. (Matthew)
v3: checkp... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index eb4af4c71124..b72407e24d09 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -857,6 +857,6 @@ void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p)
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
... |
656d29506ca89b4af1d2380ff4cab15f40ae9e19 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not take any action if our device was removed. | Problem Details:
Unfortunately devcoredump infrastructure does not provide and
interface for us to force the device removal upon the pci_remove
time of our device.
The devcoredump is linked at the device level, so when in use
it will prevent the module removal, but it doesn't prevent the
call of the pci_remove callbac... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index 561db73a3c8c..00b9cc44c773 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -57,6 +57,10 @@ static ssize_t xe_devcoredump_read(char *buffer, loff_t offset,
struct drm_print... |
e799485044cb3c0019a226ff3a92a532ca2a4e7e | Analyze and fix the following issue in the Linux kernel code: drm/xe: Introduce the dev_coredump infrastructure. | Problem Details:
The goal is to use devcoredump infrastructure to report error states
captured at the crash time.
The error state will contain useful information for GPU hang debug, such
as INSTDONE registers and the current buffers getting executed, as well
as any other information that helps user space and allow lat... | ```diff
diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 62f54e6d62d9..0a4854a59c90 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -23,6 +23,7 @@ config DRM_XE
select DRM_TTM_HELPER
select DRM_SCHED
select MMU_NOTIFIER
+ select WANT_DEV_COREDUMP
help
Ex... |
75a6aadb9ae71a046534fb781b7c832c6586131b | Analyze and fix the following issue in the Linux kernel code: drm/xe: Introduce GT oriented log messages | Problem Details:
While debugging GT related problems, it's good to know which GT was
reporting problems. Introduce helper macros to allow prefix GT logs
with GT identifier. We will use them in upcoming patches.
v2: use xe_ prefix (Lucas)
v3: use correct include
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_printk.h b/drivers/gpu/drm/xe/xe_gt_printk.h
new file mode 100644
index 000000000000..0b801429cf1a
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_gt_printk.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef _XE_GT_PR... |
85635f5d47d7304a44bc45b419f8f31423712ef8 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Load HuC on Alderlake P | Problem Details:
Alderlake P uses TGL HuC and it was not added together with ADL-S,
because it was failing for unrelated reasons. Now that those are fixed,
allow it to load HuC.
# cat /sys/kernel/debug/dri/0/gt0/uc/huc_info
HuC firmware: i915/tgl_huc.bin
status: RUNNING
version: wanted 0.0, found 7.9
uCode: 58... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index 609ca3f2ffa4..5703213bdf1b 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -111,6 +111,7 @@ struct fw_blobs_by_type {
fw_def(TIGERLAKE, major_ver(i915, guc, tgl, 70, 5))
#define XE_HUC_FIRMWAR... |
a2db3192115d8cafa3dcae024873957929a4eae0 | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix tlb_invalidation_seqno_past() | Problem Details:
Checking seqno_recv >= seqno looks like it will incorrectly report true
when the seqno has wrapped (not unlikely given
TLB_INVALIDATION_SEQNO_MAX). Calling xe_gt_tlb_invalidation_wait() might
then return before the flush has been completed by the GuC.
Fix this by treating a large negative delta as an ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index 9e7fe8d9bca4..c815a42e2cdb 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -251,14 +251,15 @@ int xe_gt_tlb_invalidation_vma(struct xe_gt *gt... |
50f1f0591638ec43eb041e27ab5e4eae47882cbc | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix indent in xe_hw_engine_print_state() | Problem Details:
Fix the indent to align with open parenthesis, following the coding
style.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20230508225322.2692066-5-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 696b9d949163..751f6c3bba17 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -580,70 +580,70 @@ void xe_hw_engine_print_state(struct xe_hw_engine *hwe, struct drm_printer *p)
retur... |
a56d8dabf134e30ed898128aae6ca830c03b6abb | Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not sleep in atomic | Problem Details:
Set atomic in xe_mmio_wait32() otherwise we would
be scheduling in atomic context.
Fixes: 7dc9b92dcfef ("drm/xe: Remove i915_utils dependency from xe_pcode.")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
S... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index 02afb313bfea..125c63bdc9b5 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -424,7 +424,7 @@ static void mcr_lock(struct xe_gt *gt)
*/
if (GRAPHICS_VERx100(xe) >= 1270)
ret = xe_mmio_wai... |
215bb2ce605bb182939e4dee445b6d95e0d1b843 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix comment on Wa_22013088509 | Problem Details:
On i915 the "see comment about Wa_22013088509" referred to the comment
in the graphics version >= 11 branch, where there were more details
about it. From the platforms supported by xe, only PVC needs
Wa_22013088509, but as the comment says, it's simpler to do it for all
platforms as there is no downsid... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index 55b240a5eaa7..02afb313bfea 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -461,9 +461,16 @@ static u32 rw_with_mcr_steering(struct xe_gt *gt, struct xe_reg_mcr reg_mcr,
}
/*
- * Always ... |
dbeb2bd25350c7e771547638e266ce16030ba91c | Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not mark 1809175790 as a WA | Problem Details:
Additional programming annotated with Wa_<number> should be reserved to
those that have a official workaround. Just pointing to a bug or
additional reference can be done with something else. Copy what i915
does and refer to it as "hsdes: ....".
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
index 4c5f46f89241..c1b738e033c7 100644
--- a/drivers/gpu/drm/xe/xe_ring_ops.c
+++ b/drivers/gpu/drm/xe/xe_ring_ops.c
@@ -199,7 +199,8 @@ static void __emit_job_gen12_video(struct xe_sched_job *job, struct xe_lrc *lrc,
bool decod... |
116d32515214910d8a34538dbd09ef26a878d5ae | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix splat during error dump | Problem Details:
Allow xe_bo_addr without lock to print debug information, such
as from xe_analyze_vm.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 9a565203deac..4693372ec82e 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1545,15 +1545,18 @@ bool xe_bo_is_xe_bo(struct ttm_buffer_object *bo)
return false;
}
-dma_addr_t xe_bo_addr(struct xe_bo *bo, u... |
ad799e4ace0dd8b81ff698dc92d6f1419fc49d4f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix media detection for pre-GMD_ID platforms | Problem Details:
Reading the GMD_ID register on platforms before that register
became available is not reliable. The assumption was that since the
register was not allocated, it would return 0. But on PVC for example it
returns garbage (or a very specific number), triggering the following
error:
xe 0000:8c:00.0: [drm... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index c1f2f63548d3..473ee8df2db2 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -38,7 +38,9 @@ struct xe_gt_desc {
};
struct xe_device_desc {
+ /* Should only ever be set for platforms without GMD_ID */
c... |
5f230a144a33d9a33448063a23d65c53b6d84cea | Analyze and fix the following issue in the Linux kernel code: drm/xe: Use REG_FIELD/REG_BIT for all regs/*.h | Problem Details:
Convert the macro declarations to the equivalent GENMASK and
and bitfield prep for all registers.
v2 (Matt Roper):
- Fix wrong conversion of RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_MASK
- Reorder fields of XEHP_SLICE_UNIT_LEVEL_CLKGATE for consistency
- Simplify CTC_SOURCE_* by only defining CTC_SOURCE_D... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_engine_regs.h b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
index 9d61f5941289..f1e75703e4bc 100644
--- a/drivers/gpu/drm/xe/regs/xe_engine_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
@@ -22,7 +22,7 @@
#define RING_CTL_SIZE(size) ((size) - PAGE_SIZE) /* in byt... |
1bd4db39dee51161c48e8669e410fff0a0f69be1 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Remove extra xe_mmio_read32 from xe_mmio_wait32 | Problem Details:
Commit 7aaec3a623ad ("drm/xe: Let's return last value read on
xe_mmio_wait32.") mentions that we should return the last value read,
but we never actually return it. This breaks display which depends on
the value being actually returned where needed.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index be7ba2813d58..b72a0a75259f 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -93,9 +93,6 @@ static inline int xe_mmio_wait32(struct xe_gt *gt, u32 reg, u32 val, u32 mask,
u32 read;
for (;;) {
- if... |
56492dacee943dd8241e29fe6a2d698d0029035c | Analyze and fix the following issue in the Linux kernel code: drm/xe: Rename instruction field to avoid confusion | Problem Details:
There was both BLT_DEPTH_32 and XY_FAST_COLOR_BLT_DEPTH_32 - also add
the prefix to the first to make it clear this is about the FAST_**COPY**
operation. While at it, remove the GEN9_ prefix.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gpu_commands.h b/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
index 9d6508d74d62..05531d43514f 100644
--- a/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
+++ b/drivers/gpu/drm/xe/regs/xe_gpu_commands.h
@@ -55,8 +55,8 @@
#define XY_FAST_COLOR_BLT_MOCS_MASK GENMASK(27, 21)
#de... |
bb36f4b4ed279c7deed936957f733b2af0d3d78f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Rename RC0/RC6 macros | Problem Details:
Follow up commits will mass-remove the gen prefix/suffix. For GEN6_RC0
and GEN6_RC6 that would make the variable too short and easy to
conflict. So, add "GT_" prefix that is also part of the register name.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.rop... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index c1d73f3e7bc3..fb91f04c3c6c 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -345,8 +345,8 @@
#define GEN6_GT_CORE_STATUS _MMIO(0x138060)
#define RCN_MASK REG_G... |
58e19acf0cdf3f18c1c868165f45d3ea626b9c3f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Cleanup page-related defines | Problem Details:
Rename the following defines to lose the GEN* prefixes since they don't
make sense for xe:
GEN8_PTE_SHIFT -> XE_PTE_SHIFT
GEN8_PAGE_SIZE -> XE_PAGE_SIZE
GEN8_PTE_MASK -> XE_PTE_MASK
GEN8_PDE_SHIFT -> XE_PDE_SHIFT
GEN8_PDES -> XE_PDES
GEN8_PDE_MASK -> XE_PDE_MASK
GEN8_64K_PTE_SHIFT -> XE_64K_PTE_... | ```diff
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index cdcecf8d5eef..0f4371ad1fd9 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -265,7 +265,7 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *te... |
9d3c8fb98ba31873c0ebbc42c5d8133fa59f7ac7 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix print of RING_EXECLIST_SQ_CONTENTS_HI | Problem Details:
On xe_hw_engine_print_state we were printing:
value_of(0x510) + 4 instead of
value_of(0x514) as desired.
So, let's properly define a RING_EXECLIST_SQ_CONTENTS_HI
register to fix the issue and also to avoid other issues
like that.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_engine_regs.h b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
index 2aa67d001c34..a1e1d1c206fa 100644
--- a/drivers/gpu/drm/xe/regs/xe_engine_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
@@ -84,7 +84,8 @@
RING_FORCE_TO_NONPRIV_DENY)
#define RING_MAX_NONPRIV... |
fdb3abcebba5d4a647739bb79a3818bd81956f64 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix build without CONFIG_PM_SLEEP | Problem Details:
Build without CONFIG_PM_SLEEP (such as for riscv) was failing due
to unused xe_pci_runtime_* functions.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index df7590b7dc2c..5f750edce542 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -702,7 +702,6 @@ static int xe_pci_resume(struct device *dev)
return 0;
}
-#endif
static int xe_pci_runtime_suspend(struct... |
d33dc1dc29cab7871f9b0adee7b94b4dc5de5cb1 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix xe_mmio_rmw32 operation | Problem Details:
xe_mmio_rmw32 was failing to invert the passed in mask, resulting in a
register update that wasn't the expected RMW operation. Fortunately the
impact of this mistake was limited, since this function isn't heavily
used in Xe right now; this will mostly fix some GuC PM interrupt
unmasking.
v2:
- Renam... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index 354be6fae0d4..be7ba2813d58 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -42,13 +42,13 @@ static inline u32 xe_mmio_read32(struct xe_gt *gt, u32 reg)
return readl(gt->mmio.regs + reg);
}
-static... |
fa4fe0db0885b089200cc336207e40f6902ebbb2 | Analyze and fix the following issue in the Linux kernel code: drm/xe/tlb: fix expected_seqno calculation | Problem Details:
It looks like when tlb_invalidation.seqno overflows
TLB_INVALIDATION_SEQNO_MAX, we start counting again from one, as per
send_tlb_invalidation(). This is also inline with initial value we give
it in xe_gt_tlb_invalidation_init(). When calculating the
expected_seqno we should also take this into accoun... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index f279e21300aa..604f189dbd70 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -319,7 +319,12 @@ int xe_guc_tlb_invalidation_done_handler(struct ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.